The text detection worked when i used the Tesseract Tool:
When i executed it in script, it returned an empty string:
Code:
procedure getText;
const
myTesseractFilter: TTesseractFilter = [1, 1, [False, 0, TM_Mean]];
const
area: TBox = [396, 643, 428, 665];
var
bmp: integer;
begin
bmp:= BitmapFromClient(area.x1, area.y1, area.x2, area.y2);
DisplayDebugImgWindow(100, 100);
ClearDebugImg;
DrawBitmapDebugImg(bmp);
writeln(Tesseract_GetText(area.x1, area.y1, area.x2, area.y2, myTesseractFilter));
end;
result:
In the Tesseract_GetText function, Tesseract_GetUTF8Text is throwing an access violation which caused the except block to be executed. Any idea what's causing this?
Code:
try
textPtr := Tesseract_GetUTF8Text(__tesseractPtr, textLen);
except
TextPtr := nil;
end;