How can I clean up this image?
조회 수: 6 (최근 30일)
이전 댓글 표시
Why does bwareaopen not work on this image? It gives me seemingly arbitrary chunks of white at the bottom of the image. All help is appreciated.
댓글 수: 0
답변 (1개)
Image Analyst
2017년 6월 24일
Are they always in the same location and of the same size? If so, simply create a mask and mask it. Demo attached.
If the regions are in different locations and different sizes and brightnesses, then you'll have to create a mask from the image which means you'll have to do a better job of explaining what you want to keep, especially for the 3 slivers of white - I still don't know what pixels you're referring to there.
댓글 수: 2
Walter Roberson
2017년 6월 24일
Threshold the image with a relatively high threshold? For example, at (say) 80% of the maximum brightness ?
Image Analyst
2017년 6월 24일
That didn't answer my question as to whether your blobs are always the same size and location. Please answer.
The big blob on the left is pretty easy. Simply use imclose(), then threshold and use bwareafilt() to extract the largest blob.
But I still don't know where the edges of the small slivers are. Have you looked at the histogram? Where would you want to threshold it? What if some small noise specks are brighter than the "slivers"? Keep those instead? Do you need to filter based on shape? Like aspect ratio?
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!