 | OcrApiGetTextFromImage(OcrPix, Rectangle) Method |
Recognize a rectangle from an image and return the result as a string.
Namespace: Patagames.OcrAssembly: Patagames.Ocr (in Patagames.Ocr.dll) Version: 4.6.411
Syntaxpublic string GetTextFromImage(
OcrPix pix,
Rectangle rect
)
Public Function GetTextFromImage (
pix As OcrPix,
rect As Rectangle
) As String
public:
String^ GetTextFromImage(
OcrPix^ pix,
Rectangle rect
)
member GetTextFromImage :
pix : OcrPix *
rect : Rectangle -> string public String GetTextFromImage(
OcrPix pix,
Rectangle rect
)
function GetTextFromImage(pix, rect);
Parameters
- pix OcrPix
- The leptonica image
- rect Rectangle
- The rectangle.
Return Value
StringThe 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 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