Help with cropping a binary image?

Risposte (1)

Spandan Tiwari
Spandan Tiwari il 8 Feb 2014

0 voti

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 Commenti

Thank you! But can you show me how bwboundaries works?
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?
No, I just want the outline! How do I crop it after getting the coordinates? imcrop(?)?

Accedi per commentare.

Richiesto:

il 8 Feb 2014

Commentato:

il 8 Feb 2014

Community Treasure Hunt

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

Start Hunting!

Translated by