I am evaluating GdPicture Light Imaging Toolkit Ver. 4.12.5, ActiveX. I develop in Visual DataFlex.
I am trying to use the functions SetROI and OCRTesseractDoOCR to set specific areas in the picture (pdf or TIFF) and OCR those areas.
I show the image in GdViewer and use the left hand tool to draw a rectangle to OCR. I can read those coordinates without trouble, I setROI to those coordinates and the call OCRTesseractDoOcr. However the return value is empty (string). I am using the following code (maybe Visual DataFlex is not known to you but I hope perhaps you can help me anyway):
Code: Select all
Send ComGetRectValues of Self (&iLeft) (&iTop) (&iWidth) (&iHeight) //pixels (self is the GdViewer object)
Get ComIsRectDrawed of Self to bOK
If (bOK) Begin //this one is always true
Send ComSetROI of oComImaging1 iLeft iTop iWidth iHeight //pixels - the values are here integers and are all OK
Get ComOCRTesseractDoOCR of oComImaging1 OLETesseractDictionaryEnglish "C:\Program Files\GdPicture ToolKit Pro Edition\redist\optional\ocrdata" "" to sOK
Send Info_Box sOK "" //the string sOK is always empty here
End
sincerely
/Leif Angestam
Sweden