bwareaopen
Remove small objects from binary image
Description
Examples
Input Arguments
Output Arguments
Algorithms
The basic steps are
Determine the connected components:
CC = bwconncomp(BW, conn);
Compute the area of each component:
S = regionprops(CC, 'Area');
Remove small objects:
L = labelmatrix(CC); BW2 = ismember(L, find([S.Area] >= P));
Extended Capabilities
Version History
Introduced before R2006a