i have an image . its a pupil image of an optical system. If i use a large aperture in front of my source ( 200 um-so a finite source), then my image at pupil looks uniform and i can easily see defects/contamination in the image. however if i use a much smaller apertur right in front of my source ( 6um), then in my pupil I see lots of laser speckle shape features . The algorithm I use for detecting defects works based on intensity drop, so the problem i have is that now algorithm gets confused and also takes speckles too as defects. i have example images ( please look at attached images, i have circled what i mean by defects and i want to only detect those). I think this phenomenan happens due to diffraction and nature of light. since small aperture makes my light source work light somewhat coherent light and causes diffraction so all features in the lens system can be seen. I hve averaged several images too but didnt work.
i have asked suport in matlab that what they told me but i am still not successful. I am not that good at matlab and am struggling. I would appreciate any help
"After reviewing the images, it seems that a a lot of the specks you mention can be handled by using morphological operations:
In addition, you can get a full list of all types of morphological filters available here:
The exact sequence of commands needed is hard to predict and it's something you will have to experiment with.
As a recommendation thresholding along with "imerode" and "imdilate" could help in the process.
With that being said, here is a page with a list of all available feature extractors that you can use:
thanks very much