Obtaining the largest object in an image
조회 수: 4 (최근 30일)
이전 댓글 표시
Say that I have an image with a big object, and then small objects spread apart.
How can I retrieve only that big object?
I think we can use "bwconncomp"?
But, how exactly can we do that here?
Thanks.
댓글 수: 0
채택된 답변
Image Analyst
2014년 11월 28일
I thought I've given this to you before. Oh well, maybe it was someone else. I've posted it lots and lots of times. Here it is again. The function inside the attached demo will let you extract the N largest or smallest blobs in a binary image.
댓글 수: 2
Image Analyst
2014년 12월 1일
Yes. But you might want to multiply it by 255 first so you can see it without scaling, like if you want a nice thumbnail image in your operating system
imwrite(uint8(255*binaryImage), filename);
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!