Nicomsoft OCR: Developer's Guide


Img_GetSkewAngle


Syntax

C++:int Img_GetSkewAngle(HIMG ImgObj)
C#:int Img_GetSkewAngle(int ImgObj)
Visual Basic:Function Img_GetSkewAngle(ByVal ImgObj As Integer) As Integer
Java:int Img_GetSkewAngle(HIMG ImgObj)
Delphi:function Img_GetSkewAngle(ImgObj:HIMG):integer;


Description

Retrieves the detected image skew angle, in degrees, multipled by 1000. For instance, if the skew angle is 2.4 degrees, this function will return 2400. The deskewing algorithm is applied at the OCRSTEP_PREFILTERS step, so that step must be executed before calling this function. This function also returns the page rotation angle (90/180/270 degrees) if the page orientation was incorrect and the page was rotated automatically.


Parameters

ImgObj [IN] – the Image object.


Return value

If success, the skew angle; otherwise, an error code.


Remarks

None.


Example

See the sample code for the Img_GetPixLineCnt function.