0

I have taken on a project to automatically analyse images taken from a microscope of a specific type micro fractures. The problem is that the camera used was on an "auto" setting and so the micro fractures (which look like pin pricks) are a variety of shades from one photo to the next.

The background is also at various saturation levels and there are some items (which appear very bright in the photos) which look like fractures but are something different which I need to discount.

Could anyone recommend a technique I could investigate to help me solve this issue?

Chris Headleand
  • 6,003
  • 16
  • 51
  • 69
  • Hi, I don't have permission to release the images I'm afraid. But they are gray-scale, gray background with light gray specs (around 2px across - this is what I need to count/measure), there are also some white specs which (like the background) need to be ignored. – Chris Headleand Oct 09 '12 at 14:36
  • 3
    If you can't post, we cannot help. Try to post something artificial that does not compromise your intellectual property, that is similar to your data – Andrey Rubshtein Oct 09 '12 at 16:10
  • I'll second Andrey's suggestion: please create some artificial images that present the problem in the simplest way. I'll make a few suggestions below anyway. – Rethunk Oct 12 '12 at 03:12

2 Answers2

0

This is quite a normal situation in image recognition -- different lighting conditions, different orientation of objects, different scale, different image resolution. Methods have been developed to extract useful features out of such images. I am not an expert in that area, but I suspect that any general book on the subject contains at least a brief review of image normalization and feature extraction methods.

Qnan
  • 3,714
  • 18
  • 15
0

If the micro fractures are sharp edge transitions, then a combination of simple techniques may allow you to find connected regions of strong edge points that correspond to those fractures. If the fractures also appear dark, then you should be able to distinguish them from the bright fracture-like features.

Briefly:

  1. Generate an edge map
  2. (If necessary) Remove edge pixels corresponding to bright features.
  3. Select an edge strength that separates the fractures from the background
  4. Clean up the edge map image
  5. Find connected regions in the edge map image

If you want to find thin features with strong edges in a background, then one step could be to generate an edge map (or edge image) in which each pixel represents the local edge strength. A medium gray pixel surrounded by other medium gray pixels would have relatively low edge strength, whereas a black pixel surrounded by light gray pixels would have relatively high edge strength. Various edge-finding techniques include Sobel, Prewitt, Canny, Laplacian, and Laplacian of Gaussian (LoG); I won't describe those here since Wikipedia has entries on them if you're not familiar with them.

Once you have an edge map, you could use a binary threshold to convert the edge map into black and white pixels. If you have evidence that fractures have an edge strength of 20, then you would use the value 20 as a binarization threshold on the image. Binarization will then leave you with a black and white edge map with white pixels for strong edges, and black pixels for the background.

Once you have the binarized edge map, you may need to perform a morphological "close" operation to ensure that white pixels that may be close to one another become part of the same connected region.

Once you've performed a close on the binarized edge map you can search for connected components (which may be called "contours" or "blobs"). For most applications it's better to identify 4-connected regions in which a pixel is considered connect to pixels to the top, left, bottom, and right, but not to its neighbors at the top left and other corners. If the features are typically single-pixel lines or meandering cracks, and if there isn't much noise, then you might be able to get away with identifying 8-connected regions.

Once you've identified connected regions you can filter based on the area, length of the longest axis, and/or other parameters.

If both dark and light features can have strong edges, and if you want to eliminate the bright features, then there are a few ways to eliminate them. In the original image you might clip the image by setting all values over a threshold brightness to that brightness. If the features you want to keep are darker than the median gray value of the image, then you could ignore all pixels brighter than the median gray value. If the background intensity varies widely, you might calculate a median for some local region.

Once we see your images I'm sure you'll get more suggestions. If the problem you're trying to solve turns out to be similar to one I worked on, which was to find cracks in highly textured surfaces, then I can be more specific about algorithms to try.

Rethunk
  • 3,976
  • 18
  • 32