How to remove unwanted object from an image?
조회 수: 6 (최근 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!