Gary Regent Edge Detection

#include "BIVISION.H"

 

HANDLE CALLBACK  FilterEdgeGR( HANDLE          hSrcDIB,
int                       iMaxDiff,
NormOperator    lpNormOp,
BOOL                bShowDialog)

Description

This function will find edges on the input image by the Gary Regent edge detection method. This function works for 8 and 24 bit per pixel images. Gary Regent edge-detection is a region growing based edge detection method. Detected edges are usually topologically circles (closed arcs without intersections). Region growing can be tuned with iMaxDiff parameter. The smaller the iMaxDiff parameter is, the more regions rise. In case of color images, the Red, Green and Blue values of a pixel should be transformed to only one value. The lpNormOp parameter is a handler of a transformator function implemented by the user, or NULL. In this case a default transformator function is used (square mean values). If the input image has too sawtooth local distributions, a high number of regions can be rised, and too much edges will be found. In this case, choose a larger iMaxDiff value. If iMaxDiff is negative, Bryant difference will be used (square means normalized to .

Examples

color                  edgegr

Parameters

HANDLE

hSrcDIB

Source DIB

int

iMaxDiff

Maximum different during region growing. See Description for further information.

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).

BOOL

bShowDialog

This parameter specifies the displaying of the parameter dialog.

IMPORTANT:                                                              The parameter dialog will only display, if there is BiDlgs.dll installed.

Return values

Handle of the newly created DIB on success or NULL on failure.

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.