ImageGear for C and C++ on Windows v20.5 - Updated
IG_IP_edge_map
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Processing Functions > IG_IP_edge_map

This function performs the image processing operation specified by the nEdgeMapTypeargument.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_IP_edge_map ( 
        HIGEAR hIGear, 
        const LPAT_RECT lpRect, 
        const AT_MODE nEdgeMapType 
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of an 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.
nEdgeMapType const AT_MODE Type of edge map operation to perform, such as IG_EDGE_OP_LAPLACIAN, IG_EDGE_OP_ROBERTS, etc. The list of available types is in the accucnst.h.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

FlashPix

Example:

 
Copy Code
HIGEAR   hIGear;   /* HIGEAR handle of an image *?
IG_IP_edge_map ( hIGear, NULL, IG_EDGE_OF_ALPLACIAN ):

Remarks:

The operation is performed upon the rectangular portion of the image specified by lpRect.

An edge map is an image that shows where there are changes in contrast in the original image. Where there are no changes, the resulting image is black. The stronger the contract change, the brighter the resultant image. The different types of edge maps are slight variations of the algorithm used, and produce slightly different results.

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

See the descriptions of IG_IP_NR_ROI_mask_associate() and IP_IP_NR_ROI_to_HIGEAR_mask () functions for more details.
Is this page helpful?
Yes No
Thanks for your feedback.