This function automatically detects the angle of the 1-bit document referenced by hIGear, and rotates it so that it is straight (i.e., de-skews it).
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_IP_deskew_auto ( HIGEAR hIGear, DOUBLE dblAngleThresh, AT_MODE nExpand_clip_option ); |
Name | Type | Description |
---|---|---|
hIGear | HIGEAR | HIGEAR handle of image to be decoded. |
dblAngleThresh | DOUBLE | Do not de-skew if the skew angle is less than this parameter. |
nExpand_clip_option | AT_MODE | An AT_MODE type variable, either: IG_ROTATE_CLIP or IG_ROTATE_EXPAND. |
Returns the number of ImageGear errors that occurred during this function call.
Indexed RGB – 1 bpp;
Grayscale – 1 bpp.
Copy Code
|
|
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ DOUBLE angle_thresh;/* max angle above which should not perform skew */ AT_MODE nExpand_clip_option;/* expand image or clip doc */ AT_ERRCOUNT nErrcount; /* will tally returned IG errors */ nErrcount = IG_IP_deskew_auto ( hIGear, 3.0, IG_ROTATE_CLIP); |
If the skew angle is less than dblAngleThresh, then the image is not de-skewed. If nExpand_clip_option is set to IG_ROTATE_EXPAND, the size of image width or height will be enlarged as necessary to accommodate the document when it has been rotated. Otherwise, any areas of the document that now fall outside the borders of the original width and height of the image, will be cropped.