API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Recognition Image Preprocessing Functions > IG_REC_image_deskew |
Performs immediate deskewing on the given image.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_REC_image_deskew( HIG_REC_IMAGE hImage, AT_INT Slope ); |
Name | Type | Description |
---|---|---|
hImage | HIG_REC_IMAGE | Handle of the image. |
Slope | AT_INT | Integer 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. The Slope parameter must be in the range -577 to 577; that means the maximal slope value is 30 degrees. |
See IG_REC_image_import.
Copy Code
|
|
---|---|
AT_ERRCOUNT ErrCount = 0; AT_INT nSlope = 0; enumIGRecImgRotate eImgRotate = IG_REC_IMG_ROTATE_AUTO; HIGEAR higImage = 0; HIG_REC_IMAGE higRecImage = 0; ErrCount += IG_load_file("Image.tif", &higImage); ErrCount += IG_REC_image_import(higImage, &higRecImage); ErrCount += IG_REC_image_skew_detect(higRecImage, &nSlope, &eImgRotate); ErrCount += IG_REC_image_deskew(higRecImage, nSlope); //... ErrCount += IG_REC_image_delete(higRecImage); ErrCount += IG_image_delete(higImage); |