 | OcrApiGetTextFromImage(String, Point, Size) 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(
string filename,
Point location,
Size size
)
Public Function GetTextFromImage (
filename As String,
location As Point,
size As Size
) As String
public:
String^ GetTextFromImage(
String^ filename,
Point location,
Size size
)
member GetTextFromImage :
filename : string *
location : Point *
size : Size -> string public String GetTextFromImage(
String filename,
Point location,
Size size
)
function GetTextFromImage(filename, location, size);
Parameters
- filename String
- Parth to image file
- location Point
- LeftTop corner of the rectangle.
- size Size
- Size of 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