How to remove glare on an object edge?

4 views (last 30 days)
Abdels
Abdels on 27 Oct 2015
Commented: Image Analyst on 29 Oct 2019
Hei, I am processing the attached picture using Matlab to detect the bubbles. I can detected most of the bubbles when the edge is well distinguished, but in a number of bubbles there are glare points on the edges.
This makes the edge surrounding the bubble open and then impossible for the code to consider it as a bubble. I used a number of methods (grayscale after background removal, H-minima, extended H-minima, etc.) but still having the same problem. I also tried to use dilate and erode functions to make up the parts in the glare but this magnifies the noise and results in creating some other fake bubbles. Any recommendations are appreciated.

Answers (1)

Image Analyst
Image Analyst on 27 Oct 2015
This is like Optics 101. Use two linear polarizers. One in front of the light source, and one in front of the lens. Rotate them both until you find an orientation where there is no glare. It's SO much easier to prevent the problem than to try to fix it afterwards.
Alternatively you might try to see if you can increase the glare to see if it can help you find the bubble easier.
  2 Comments
Aleksandr Bashkatov
Aleksandr Bashkatov on 28 Oct 2019
Dear Image Analyst,
Can I kindly ask you, to explain it in a little bit more details? I would like to increase the glare spot of my bubbles, I would very happy if I can do so in the way you mentioned 4 years ago=/
Best regards,
Aleksandr
Image Analyst
Image Analyst on 29 Oct 2019
To increase the glare, he could make the surface smoother (glossier) and use a broad source light and put the camera at the same angle, but opposite, to the surface as the light source is.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!