Not getting correct character top & left
Not getting correct character top & left
See the attached project, I am calling oGdPictureImaging.OCRTesseractGetCharTop & oGdPictureImaging.OCRTesseractGetCharLeft and the red box that gets put on the image is way lower and to the left of were the character is.
- Attachments
-
- RedactTaxLiens.zip
- (481.55 KiB) Downloaded 447 times
Re: Not getting correct character top & left
Figured it out, you have to use oGdPictureImaging.OCRTesseractGetCharCode instead of looking at the return string to get the characters.
for (Int32 iCount = 0; iCount < oGdPictureImaging.OCRTesseractGetCharCount(); iCount++) //loop each line -NC KE 8/3/2011
{
if (oGdPictureImaging.OCRTesseractGetCharCode (iCount) == 73 &&
oGdPictureImaging.OCRTesseractGetCharCode (iCount + 1) == 100 &&
oGdPictureImaging.OCRTesseractGetCharCode (iCount+2) == 101 &&
oGdPictureImaging.OCRTesseractGetCharCode (iCount+3) == 110)
{
Int32 iTop = oGdPictureImaging.OCRTesseractGetCharTop(iCount);
Int32 iLeft = oGdPictureImaging.OCRTesseractGetCharLeft(iCount);
for (Int32 iCount = 0; iCount < oGdPictureImaging.OCRTesseractGetCharCount(); iCount++) //loop each line -NC KE 8/3/2011
{
if (oGdPictureImaging.OCRTesseractGetCharCode (iCount) == 73 &&
oGdPictureImaging.OCRTesseractGetCharCode (iCount + 1) == 100 &&
oGdPictureImaging.OCRTesseractGetCharCode (iCount+2) == 101 &&
oGdPictureImaging.OCRTesseractGetCharCode (iCount+3) == 110)
{
Int32 iTop = oGdPictureImaging.OCRTesseractGetCharTop(iCount);
Int32 iLeft = oGdPictureImaging.OCRTesseractGetCharLeft(iCount);
Who is online
Users browsing this forum: No registered users and 0 guests