Help with cropping a binary image?
2 次查看(过去 30 天)
显示 更早的评论
I have this binary image:
How do I crop exactly to the outline of the fist?
0 个评论
回答(1 个)
Spandan Tiwari
2014-2-8
Use IMCOMPLEMENT to invert the polarity of the binary images so that the object (fist) is white. Then use BWBOUNDARIES to get the boundary pixels of the object.
3 个评论
Image Analyst
2014-2-8
boundaries = bwboundaries(~binaryImage);
but that gets you the outline coordinates of the fist. Is that what you want, or do you want the bounding box?
Anjana Rao
2014-2-8
No, I just want the outline! How do I crop it after getting the coordinates? imcrop(?)?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!