- https://www.mathworks.com/help/images/ref/fspecial.html (Official documentation on "fspecial")
- https://www.mathworks.com/help/images/ref/imfilter.html (Official documentation on "imfilter")
How to remove unsteady reflections in images ?
3 ビュー (過去 30 日間)
古いコメントを表示
Hi. I have TIF format gray images with some particles. There are some reflections that are inevitable during the experiments. Unfortunatley, these unsteady reflections change their intensity and locations in every frame. I want to convert these gray images to binary images after removing the reflections. If I do not remove these glares and reflections then the binarized images are very noisy.
I have tried imreducehaze and some other operations but unfortunatley, it does not result in satisfactory result. Any help is highly appreciated.
0 件のコメント
回答 (1 件)
Ayush Anand
2024 年 4 月 5 日
Hi,
You can achieve the sliding average operation in MATLAB using the "fspecial" and "imfilter" functions:
kernel = fspecial('average', [3 3]); % You can adjust the size as per requirement
img_filtered = imfilter(img_gray, kernel, 'replicate');
You can read more on "fspecial" and "imfilter" here:
5 件のコメント
DGM
2024 年 4 月 9 日
編集済み: DGM
2024 年 4 月 9 日
Perhaps they are doing some sort of frame averaging process. If the artifacts are short-lived compared to the objects of interest, a moving average of frames will subdue the artifacts enough that they might not interfere with segmentation, while only blurring objects of interest to a minor degree. If the objects of interest are truly static across all frames, there are plenty of routines used for background extraction which would also be applicable. Otherwise, interframe mean (or maybe median) filtering would work. It's really not clear what's appropriate given a single frame.
DGM
2024 年 4 月 10 日
I really don't know what to say. The reflections seem to move almost as much as the particles do. Averaging doesn't seem to be helpful. My attempts at background extraction and removal weren't really any more helpful either. I don't know what they could be doing unless they're incorporating some sort of optical flow magic into the works. That's something I'm not familiar with.
There is one thing I can recommend that's only tangential. Don't save images by taking screenshots of figures. Save the images with imwrite(), and avoid JPG when appropriate. It's not going to be a grave problem for this task, but it's something you should avoid before you paint yourself into a corner.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!