#include "BIVISION.H"
WORD ** CALLBACK FilterCentroidLRG( HANDLE hDIB,
int iMaxDiff,
NormOperator lpNormOpFunc,
WORD * lpRegNum,
int * lpWidth,
int * lpHeight)
Description
Segments the input image with the Centroid-Linkage Region Growing algorithm. Probably this adaptive algorithm generates the best results from the implemented region growing algorithms.
Parameters
|
HANDLE |
hDib |
The input image to be segmented. |
|
int |
iMaxDiff |
The maximum difference between two neighbouring pixels in the same region. If iMaxDiff less than zero, Bryant difference will be used (square mean of all adjacent pixel differences normalized to |
|
NormOperator |
lpNormOpFunc |
If the input DIB is a color image, one pixel’s Red, Green and Blue values must be transformed to only one value. This parameter is a pointer to a function retrieving the 3 BYTE type color value and returning one BYTE value. See the formal definition of this function below at programming notes. If this pointer is NULL, the default transformation function will be used (square mean of the 3 values). |
|
WORD * |
lpRegNum |
It’s an output parameter. If this pointer is not NULL, the function returns the number of generated regions. |
|
int * |
lpWidth |
It’s an output parameter. If this pointer is not NULL, the function returns the width of the generated region matrix (same as the width of the input image). |
|
int * |
lpHeight |
It’s an output parameter. If this pointer is not NULL, the function returns the height of the generated region matrix (same as the height of the input image). |
Return values
Handler of the generated region matrix or NULL on error.
Programming notes
typedef BYTE (CALLBACK *NormOperator)(BYTE nRedValue, BYTE nGreenValue, BYTE nBlueValue);
Requirements
Header : Declared in BiVision.h; include BiVision.h.
Library : Use BiVision.lib.
DLLs : BiVision.dll.