This function performs the edge detection operation specified by the edge_detection_type argument.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_IP_edge_detection( HIGEAR hIGear, const LPAT_RECT lpRect, const AT_MODE edge_detection_type ); |
Name | Type | Description |
---|---|---|
hIGear | HIGEAR | Handle of the input image. |
lpRect | const LPAT_RECT | Far pointer to an AT_RECT structure specifying the rectangular portion of the image on which to operate. If NULL, this operation will be performed on the entire image. Before ImageGear performs this operation it will check to see if an internal flag has been set to TRUE to make a mask active for this HIGEAR image. If a mask is active, and a valid pointer to a mask can be found, ImageGear will override the settings passed to this structure in favor of the non-rectangular ROI defined by the mask. |
edge_detection_type | const AT_MODE | Type of edge detection method to perform. Constants IG_EDGE_DETECTION_* are listed in file accucnst.h. |
Returns the number of ImageGear errors that occurred during this function call.
Grayscale – 8 bpp.
Image Processing
Copy Code
|
|
---|---|
HIGEAR hIGear; /* Handle of the image */ AT_RECT lpRect; /* Rectangle to process */ ... IG_IP_edge_detection(hIGear, lpRect, IG_EDGE_DETECTION_MAXGRADIENT); ... |
This function, like other ImageGear Image Processing and Clipboard API calls, takes an AT_RECT structure as an argument, so that you can process a rectangular sub-region of an image. However, before ImageGear performs the operation specified by this function, it will check to see if an internal flag has been set to TRUE, indicating that a mask HIGEAR should be used with the image. If the flag is set to TRUE, and a valid pointer to a mask image has been assigned, ImageGear will override the settings passed to the AT_RECT structure and use the non-rectangular ROI defined by the mask HIGEAR. To create a non-rectangular region of interest, call IG_IP_NR_ROI_to_HIGEAR_mask().