Retaining the largest blob in an image
by Ani
16 Jul 2007
(Updated 16 Jul 2007)
No BSD License
'bwlargestblob' reads in a 2-d binary image and outputs a binary image, retaining only the largest b
Download Now
|
Watch this File
|
| File Information |
| Description |
'bwlargestblob' reads in a 2-d binary image and outputs a binary image, retaining only the largest blob.
Usage: [outim] = bwlargestblob(im,connectivity)
im - 2-d binary image
conenctivity - Accepts 4/8 connectivity
outim - Output binary image (with 1s and 0s)
Example:
im = imread('text.png');
outim = bwlargestblob(im,8);
figure;
subplot(1,2,1); imshow(im);
subplot(1,2,2); imshow(255*outim); |
| Required Products |
Image Processing Toolbox
|
| MATLAB release |
MATLAB 7.0.1 (R14SP1)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (3) |
| 16 Jul 2007 |
D S
|
|
|
| 16 Jul 2007 |
D S
|
|
|
| 07 Mar 2008 |
manoj rao
|
|
|
|
Contact us at files@mathworks.com