How to remove unwanted object from an image?

4 ビュー (過去 30 日間)
Animesh Biswas
Animesh Biswas 2022 年 1 月 30 日
コメント済み: Image Analyst 2022 年 3 月 22 日
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

採用された回答

Image Analyst
Image Analyst 2022 年 1 月 30 日
Assuming you have a binary image
mask = bwareafilt(~mask, 1); % Take largest blob only.
  6 件のコメント
Animesh Biswas
Animesh Biswas 2022 年 3 月 22 日
Yes all the images are same. The object and and the boudary have same color (black in this case). According to you, I can mask only the boarder to make it white right? Could you please help how to mask diffeent parts of the image with different colors? Thanks
Image Analyst
Image Analyst 2022 年 3 月 22 日
To whiten:
backgroundMask = imread('mask.png') > 128;
grayImage(backgroundMask) = 255; % Whiten

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by