how to remove the tiny white pixels around the rectangles
1 回表示 (過去 30 日間)
古いコメントを表示
Pravindkumaran Baskaran
2022 年 9 月 29 日
回答済み: Image Analyst
2022 年 9 月 29 日
How can i remove the tiny pixels around the rectangles in the image attached. attached images.
0 件のコメント
採用された回答
Kevin Holly
2022 年 9 月 29 日
Img = imread('originalImage.png');
imshow(Img)
You can also filter based on area of objects
Img = bwareafilt(imbinarize(Img),4,'largest'); % keep the 4 largest objects
imshow(Img)
その他の回答 (2 件)
Image Analyst
2022 年 9 月 29 日
Depends on exactly what that means.
- Do you want to simply remove small blobs?
- Or do you also want to remove a small protrusion that is sticking out of the side of a much larger rectangle.
For case 2 you might try imopen, though be careful for changes to the shape you don't want, especially near the corners or protruding blobs.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!