1.3.2
CCC
 
Label the connected component of a BImage

Functions

GSTLEARN_EXPORT VectorDouble morpho_labelling (int option, int flag_size, const BImage &imagin, double ccvoid, bool verbose=false)
 
GSTLEARN_EXPORT VectorInt morpho_labelsize (int option, const BImage &imagin)
 

Detailed Description

Parameters
imaginPointer to the BImage containing the one input image
optionDescription of the structuring element: 1 for BLOCK and 0 for CROSS (see remarks for more information)
flag_size1 if output information is labeled in volume of the connected component 0 if output information contains the rank of the connected component
ccvoidValue assigned to pixels which do not belong to any connected component
verboseVerbose flag
Remarks
In 2-D, if the central cell is denoted (i,j) and the radius is set to 1, the structuring element contains:
  • for CROSS: (i+1,j); (i-1,j); (i,j+1); (i,j-1)
  • for BLOCK: (i-1,j-1); (i-1,j); (i-1,j+1); (i,j-1); (i,j+1); (i+1,j-1); (i+1,j); (i+1,j+1)

Function Documentation

◆ morpho_labelling()

GSTLEARN_EXPORT VectorDouble morpho_labelling ( int  option,
int  flag_size,
const BImage imagin,
double  ccvoid,
bool  verbose 
)

Labels the connected components for a BImage

Remarks
The labels are sorted by decreasing sizes and an optional message is issued for displaying the component sizes

◆ morpho_labelsize()

GSTLEARN_EXPORT VectorInt morpho_labelsize ( int  option,
const BImage imagin 
)

Returns the array of dimensions of the connex components

Remarks
The labels are sorted by decreasing sizes and an optional message is issued for displaying the component sizes