ImageGear for C and C++ on Windows v19.10 - Updated
IG_REC_slope_set
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Image Processing Functions > IG_REC_slope_set

Specifies the value of the skew (slope) for the deskew preprocessing operation.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_slope_set(
   AT_INT iSlope
);

Arguments:

Name Type Description
iSlope AT_INT Slope value for deskewing. The value given here is the number of pixels of vertical ascent on 1000 horizontal pixels. That is, the tangent of the deskew angle multiplied by 1000. Its range should be between -577 and 577; that means the max. slope value is 30 degrees.

Return Value:

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

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
AT_INT nSlope = 10; 
ErrCount = IG_REC_slope_set(nSlope);

Remarks:

This value is used during the IG_REC_PID_IMGPREPROCESS process when the Image deskewing mode is set to IG_REC_IMG_DESKEW_SET.

Use IG_REC_image_skew_detect to detect the skew of an image containing machine printed text.

A value of half a degree or less will be ignored.