Nicomsoft OCR: Developer's Guide


Img_GetPixLine


Syntax

C++:int Img_GetPixLine(HIMG ImgObj, int LineInd, int* X1pos, int* Y1pos, int* X2pos, int* Y2pos, int* Width)
C#:int Img_GetPixLine(int ImgObj, int LineInd, out int X1pos, out int Y1pos, out int X2pos, out int Y2pos, out int Width)
Visual Basic:Function Img_GetPixLine(ByVal ImgObj As Integer, ByVal LineInd As Integer, ByRef X1pos As Integer, ByRef Y1pos As Integer, ByRef X2pos As Integer, ByRef Y2pos As Integer, ByRef Width As Integer) As Integer
Java:int Img_GetPixLine(HIMG ImgObj, int LineInd, NSInt X1, NSInt Y1, NSInt X2, NSInt Y2, NSInt Width)
Delphi: function Img_GetPixLine(ImgObj:HIMG; LineInd:integer; out X1pos:integer; out Y1pos:integer; out X2pos:integer; out Y2pos:integer; out Width:integer):integer


Description

Retrieves the parameters of the detected line. The "line" can be a table frame, a frame around text, and so on.


Parameters

ImgObj [IN] – the Image object.
LineInd [IN] – the line index. Use the Img_GetPixLineCnt function to get the total number of detected lines.
X1pos [OUT] – the X coordinate of the first point of the line, in pixels.
Y1pos [OUT] – the Y coordinate of the first point of the line, in pixels.
X2pos [OUT] – the X coordinate of the second point of the line, in pixels.
Y2pos [OUT] – the Y coordinate of the second point of the line, in pixels.
Width [OUT] – the line width, in pixels.


Return value

Zero if success, otherwise an error code.


Remarks

The lines removal algorithm is applied at the OCRSTEP_REMOVELINES step, so this step must be executed before calling this function.


Example

See the sample code for the Img_GetPixLineCnt function.