필터 지우기
필터 지우기

remove wanted portions in binary image

조회 수: 3 (최근 30일)
Elysi Cochin
Elysi Cochin 2013년 11월 30일
댓글: Elysi Cochin 2013년 12월 2일
i wanted to extract only the white portion from the image
i get more than one region... i should get only one region.... please do reply.....

채택된 답변

Image Analyst
Image Analyst 2013년 11월 30일
There is a function for removing blobs smaller than a specified size. It's called bwareaopen():
cleanedBinaryImage = bwareaopen(binaryImage, 40); % Remove blobs smaller than 40.
Alternatively you can use a function I wrote to keep, or eliminate, the N largest, or smallest (whichever you specify), blobs. See attached demo in blue text below. This is more general and flexible than bwareaopen, but more complicated.
  댓글 수: 1
Elysi Cochin
Elysi Cochin 2013년 12월 2일
편집: Elysi Cochin 2013년 12월 2일
thank you so much sir for the reply... it helped me a lot.... thank u sir....

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jeremy Wurbs
Jeremy Wurbs 2013년 11월 30일
If you wish to remove small regions from the binary image itself, you could start by looking at morphological operations ( help bwmorph), specifically erode and dilate.
You could also just remove the small regions from your bounding box list, or just take the largest one. I.e. only take bounding boxes where boundingBox(3)*boundingBox(4) >= minSize.

카테고리

Help CenterFile Exchange에서 Biomedical Imaging에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by