How to remove the found image from the original image?
1 次查看(过去 30 天)
显示 更早的评论
Hi, I am a beginner to MATLAB image processing.
I have an original fundus image as shown. And i have found the vessel tree as attached which I need to remove from the fundus image.
My question is how can I remove the vessel tree from the original image?
Thank you.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1020300/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1020305/image.png)
0 个评论
采纳的回答
Image Analyst
2022-6-3
You can invert the mask to get everything except the vessels, then mask:
% Get fundus mask, which is the opposite of the vessel mask
mask = ~vesselMask;
% Mask image by multiplying each channel by the mask.
maskedRgbImage = rgbImage .* cast(mask, 'like', rgbImage); % R2016b or later. Works for gray scale as well as RGB Color images.
% For R2016a or earlier, mask the image using bsxfun() function to multiply the mask by each channel individually. Works for gray scale as well as RGB Color images.
% maskedRgbImage = bsxfun(@times, rgbImage, cast(mask, 'like', rgbImage)); % R2016a or earlier.
5 个评论
Image Analyst
2022-6-4
If you want to "fill in" the vessels with the weighted average of the nearby non-vessel gray levels, you can use regionfill.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Optics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!