3

I have this image:

enter image description here

I am trying to find the spots (defects) as shown in the image. I have tried thresholding, but that only helps for the really bright ones. Any suggestions on how to do it?

cifz
  • 1,078
  • 7
  • 24
efn
  • 55
  • 6
  • well you will have to tell us more about these spots, their properties , how are they generated ? – Nishant Jun 30 '14 at 18:27
  • can you compute the normalized cross correlation of every say 11x11 patch with its 21x21 neighbors? – Shai Jun 30 '14 at 18:33
  • @Nishant I can provide the actual image if you want to have a look.The image is basically a microscopic view of a chip. – efn Jun 30 '14 at 19:35
  • What is the exact definition of a "defect", and how exactly does it stand out from the designed features? – Rody Oldenhuis Jul 01 '14 at 08:21
  • Do you have the wavelet toolbox? Spot detection is fairly easy and and pretty robust in noisy images when you use wavelet transforms – Rody Oldenhuis Jul 01 '14 at 08:24
  • Have you tried local adaptive thresholding ? .. if not, have a look here : http://www.mathworks.com/matlabcentral/fileexchange/8647-local-adaptive-thresholding – Ibrahim Amer Jul 02 '14 at 00:07

2 Answers2

0

I don't know which threshold did you use for your image, but it seems that your image is noisy and in Black and white colors. My suggestion is to use noise removal methods such as Morphological operators before applying threshoulding ("Opening" removes small objects, while "closing" removes small holes depend on you noise type). another suggestion of mine is using mean or median filters to avoid noises then apply threshoulding.

you can look at imopen or imclose for more info.

0

Your image is highly structured, and I think that given the difficulty of the problem (i.e. wanting to remove both light and dark spots, and the subtle nature of some of these) you will have to exploit that. Specifically, your image appears to consist of multiple 'traces', where each trace at a given point in time has a gaussian luminance profile. In some traces, e.g. #4 but less so in #3, there is considerable jitter. So I would divide the image into five horizontal strips centered on the trace, and then fit the luminance function to a time-varying gaussian function. I.e. divide each strip vertically into many thin vertical strips and fit a gaussian to these. (These vertical strips can overlap.)

Once you have this, you can generate a 'model' image which should look like a super-clean version of the original (but which will retain all its structure). Then go and remove those points from the original which deviate from the model by some absolute threshold. Replace them with model or interpolated values, and you're done. This is a bit of work but if your data is consistently structured as it appears to be this should do it.

Matt Phillips
  • 9,465
  • 8
  • 44
  • 75