ImageGear for C and C++ on Linux v20.0 - Updated
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Processing Functions > IG_IP_deskew_angle_find

This function determines the skew angle of a 1-bit document image.


Copy Code
AT_ERRCOUNT ACCUAPI IG_IP_deskew_angle_find (
        HIGEAR hIGear, 
        LPDOUBLE lpAngle


Name Type Description
hIGear HIGEAR HIGEAR handle of image.
lpAngle LPDOUBLE Far pointer to a DOUBLE variable that will receive the skew angle.

Return Value:

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

Supported Raster Image Formats:

Indexed RGB – 1 bpp;
Grayscale – 1 bpp.


Copy Code
HIGEAR hIGear;  /* HIGEAR handle of image    */
DOUBLE dblDeskewAngle;  /* Amount of skew in lpRect returned  */
AT_ERRCOUNT  nErrcount;  /* will tally any IG errors  */
nErrcount = IG_IP_deskew_angle_find ( hIGear, &dblDeskewAngle );


The angle is returned via the pointer lpAngle. You may then use the value of lpAngle with IG_IP_rotate_any_angle() function in order to straighten the image.

Is this page helpful?
Yes No
Thanks for your feedback.