How to remove unwanted object from an image?
4 次查看(过去 30 天)
显示 更早的评论
In my attached image, I want to remove all the black dots on the right side of the image. I want to keep the object on the left side (long filament object.) How could I do without changing the threshold value? Changing threshold values I am actually loosing some pixel from the long object. Please help, I am new in Image analysis.
Thank you

0 个评论
采纳的回答
Image Analyst
2022-1-30
Assuming you have a binary image
mask = bwareafilt(~mask, 1); % Take largest blob only.
6 个评论
Image Analyst
2022-3-22
To whiten:
backgroundMask = imread('mask.png') > 128;
grayImage(backgroundMask) = 255; % Whiten
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!