| Contents | Index |
CH = bwconvhull(BW)
CH = bwconvhull(BW, method)
CH = bwconvhull(BW, 'objects', conn)
CH = bwconvhull(BW) computes the convex hull of all objects in BW and returns CH, a binary convex hull image.
CH = bwconvhull(BW, method) specifies the desired method for computing the convex hull image.
CH = bwconvhull(BW, 'objects', conn) specifies the desired connectivity used when defining individual foreground objects. The conn parameter is only valid when the method is 'objects'.
CH |
A logical, convex hull image, containing the binary mask of the convex hull of all foreground objects in BW. |
Display the binary convex hull of an image:
subplot(2,2,1);
I = imread('coins.png');
imshow(I);
title('Original');
subplot(2,2,2);
BW = I > 100;
imshow(BW);
title('Binary');
subplot(2,2,3);
CH = bwconvhull(BW);
imshow(CH);
title('Union Convex Hull');
subplot(2,2,4);
CH_objects = bwconvhull(BW,'objects');
imshow(CH_objects);
title('Objects Convex Hull');

bwconncomp | bwlabel | labelmatrix | regionprops

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |