How can I clean up this image?

6 次查看(过去 30 天)
Tiffany Mao
Tiffany Mao 2017-6-23
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