GetCharTop & GetCharLeft

Discussions about machine vision support in GdPicture.
Post Reply
heard
Posts: 78
Joined: Wed Jan 02, 2008 11:55 pm

GetCharTop & GetCharLeft

Post by heard » Tue Nov 04, 2008 10:46 pm

Hi Loic,
I am trying to test the OCR tools but I am having a problem.
I would like to hightlight on the image where specific text is found. To do this, after DoOCR, I call GetCharTop and GetCharLeft for a given position of a string of text. This should return the starting top and left position of the text in pixels. I then call DrawFillRectangle using these coordinates. It appears that GetChar is not very accurate. Do you have any suggestions?

Thanks,
Heard

heard
Posts: 78
Joined: Wed Jan 02, 2008 11:55 pm

Re: GetCharTop & GetCharLeft

Post by heard » Wed Nov 05, 2008 4:06 pm

Loic,
I solved it. I was counting the spaces also which was throwing off the character offset. Once I condensed the ocr output to a single string with no spaces, it works fine.

Heard

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest