 | OcrApiGetTextFromImage(Bitmap, Int32, Int32, Int32, Int32) 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(
Bitmap bitmap,
int left,
int top,
int width,
int height
)
Public Function GetTextFromImage (
bitmap As Bitmap,
left As Integer,
top As Integer,
width As Integer,
height As Integer
) As String
public:
String^ GetTextFromImage(
Bitmap^ bitmap,
int left,
int top,
int width,
int height
)
member GetTextFromImage :
bitmap : Bitmap *
left : int *
top : int *
width : int *
height : int -> string public String GetTextFromImage(
Bitmap bitmap,
int left,
int top,
int width,
int height
)
function GetTextFromImage(bitmap, left, top, width, height);
Parameters
- bitmap Bitmap
- The image
- left Int32
- Left point of the rectangle.
- top Int32
- Top point of the rectangle.
- width Int32
- Width of the rectangle.
- height Int32
- Height 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