Click or drag to resize

OcrApiGetTextFromImage(OcrPix) Method

Recognize a rectangle from an image and return the result as a string.

Namespace: Patagames.Ocr
Assembly: Patagames.Ocr (in Patagames.Ocr.dll) Version: 4.6.411
Syntax
public string GetTextFromImage(
	OcrPix pix
)

Parameters

pix  OcrPix
The leptonica image

Return Value

String
The recognized text which is coded as UTF8.
Remarks
May be called many times for a single Init. Currently has no error checking. Greyscale of 8 and color of 24 or 32 bits per pixel may be given. Palette color images will not work properly and must be converted to 24 bit. Binary images of 1 bit per pixel may also be given but they must be byte packed with the MSB of the first byte being the first pixel, and a 1 represents WHITE. For binary images set bytes_per_pixel= 0.
Note  Note
Note that TesseractRect is the simplified convenience interface. For advanced uses, use SetImage, (optionally)Rectangle, Recognize, and one or more of the Get*Text functions.
See Also