1.2.3
CCC
 
Performs some miscellaneous operations on BImages

Functions

GSTLEARN_EXPORT void morpho_distance (int option, const VectorInt &radius, bool flagDistErode, BImage &imagin, VectorDouble &dist, bool verbose=false)
 
GSTLEARN_EXPORT VectorInt gridcell_neigh (int ndim, int option, int radius, bool flag_center=true, bool verbose=false)
 

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)
radiusVector giving the extensions of the structuring element along each direction of the Space.
flagDistErodeInflate the grain; 0 Reduce the grain
distContains the vector of returned distances
iptr0UID where the angle calculation will be calculated
flag_centerTrue to omit the center
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

GSTLEARN_EXPORT VectorInt gridcell_neigh ( int  ndim,
int  option,
int  radius,
bool  flag_center,
bool  verbose 
)

Create the array of index shifts (relatively to the center cell) for a dilation by 'radius' of a regular grid

GSTLEARN_EXPORT void morpho_distance ( int  option,
const VectorInt radius,
bool  flagDistErode,
BImage imagin,
VectorDouble dist,
bool  verbose 
)

Returns the vector of distances from the grain to the edge