How can I clean up this image?

조회 수: 6 (최근 30일)
Tiffany Mao
Tiffany Mao 2017년 6월 23일
편집: Tiffany Mao 2017년 7월 7일
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.

답변 (1개)

Image Analyst
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
Walter Roberson 2017년 6월 24일
Threshold the image with a relatively high threshold? For example, at (say) 80% of the maximum brightness ?
Image Analyst
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?

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

카테고리

Help CenterFile Exchange에서 Get Started with Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by