how to remove glare of an image with matlab code?
16 views (last 30 days)
Show older comments
I scanned a filament fuse with scanner. My requirement is measure the diameter of the filament. But during process, I found out that fuse image contains a lot of glare or shadow effect and this causes trouble during Image Preprocessing. Any matlab code can use to remove or reduce the glare effect?? Thank You. Below is the image that I get.

0 Comments
Answers (2)
Image Analyst
on 24 Oct 2015
It's best if you can use crossed polarizers to eliminate the glare in the first place. One polarizer on the lamp and one over the lens.
For a worse way, you can do it in software, but like I said, it will be worse and inaccurate. You can threshold and use regionfill()
mask = grayImage > 230; % whatever value works.
fixedImage = regionfill(grayImage, mask);
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!