Nicomsoft OCR: Developer's Guide


Img_CalcPointPosition


Syntax

C++:int Img_CalcPointPosition(HIMG ImgObj, int* Xpos, int* Ypos, int Mode)
C#:int Img_CalcPointPosition(int ImgObj, ref int Xpos, ref int Ypos, int Mode)
Visual Basic:Function Img_CalcPointPosition(ByVal ImgObj As Integer, ByRef Xpos As Integer, ByRef Ypos As Integer, ByVal Mode As Integer) As Integer
Java:int Img_CalcPointPosition(HIMG ImgObj, NSInt Xpos, NSInt Ypos, int Mode)
Delphi:function Img_CalcPointPosition(ImgObj:HIMG; var Xpos, Ypos:integer; Mode:integer):integer


Description

Converts point positions before and after the OCRSTEP_PREFILTERS step. For the best recognition quality, the rescaling and deskewing algorithms are applied at the OCRSTEP_PREFILTERS step. This function converts coordinates on the original image to the ones on the processed image, and vice versa. The OCRSTEP_PREFILTERS step must be executed before calling this function.


Parameters

ImgObj [IN] – the Image object.
Xpos [IN, OUT] – the X coordinate for conversion.
Ypos [IN, OUT] – the Y coordinate for conversion.
Mode [IN] – the direction of conversion. 0 – convert XY on the original image to XY on the processed image; 1 – convert XY on the processed image to XY on the original image.


Return value

Zero if success, otherwise an error code.


Remarks

None.


Example

None.