- 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 ?
조회 수: 5 (최근 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!