how to extract a region of white pixel bounded by black pixel from white background

1 次查看(过去 30 天)

采纳的回答

Image Analyst
Image Analyst 2016-6-10
It looks like a binary image. If it is, call imclearborder
binaryImage = imclearborder(binaryImage);
This will get rid of all white/1/true regions touching the edge of the image.
  3 个评论
Image Analyst
Image Analyst 2016-6-11
When you say that you want to "extract a region of white pixel bounded by black pixel" I'm assuming that you want to get rid of the white surrounding region that is touching the border. To do that you use imclearborder. I show proof with the attached m-file and this image that is creates. So explain why you said it's "not working" because the white blob is surrounded by black.

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by