Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Plotting position of text in an image in visual foxpro

ravicoder

Programmer
Apr 29, 2006
28
0
1
IN
Hello

I have developed a data capture application which captures data from handwritten forms. My requirement is as below:
I need a way to highlight the relevant text field in the form (TIFF image) so that it makes for a more efficient way to capture data instead of scrolling the image to get to the required field - annotations in short.
Can anyone help or guide in how to go about this i.e. plotting coordinates of a portion of text on the image to move a highlight when the user is at the relevant field in the data entry screen?

Thanks
Ravi
 
Hi,

If I understand it you have a TIFF image which you want to show and highlight parts of it when the user enters (gotfocus) a text field ?

Do you a) need to OCR the TIFF to find text in the document or b) do you have coordinates (X,Y) in the image and want to position a highlight ?
For b) a shape positioned on the imagecontrol showing the image might do it. Depending what coordinates you have a calculation coordinates -> pos in image will be neccessary, exspecial if image control is in container.

or
Viscoms imageviewer (not free) should be able to show and overlay :
(OCR is an option, too. Not sure on handwriting)


For those searching and finding this thread :
You press a hotkey and optionally select a region on screen, it does OCR in different languages and puts result to clipboard.
For example : ALT+WIN+E - STRG+C = OCR actual "line" (mousepos), put to keyboard and paste. Its free, portable.
 
As well as Tom's suggestion, there are several on-line OCR tools available. You upload the image (TIFF in this case), and the tool extracts the text, which you then download. At least, that's what they claim. I have no personal experience of these.

I quick Google search threw up these possibilities:


Mike
 
Hi,

. . .
Viscoms imageviewer (not free) should be able to show and overlay :
(OCR is an option, too. Not sure on handwriting)
The viscomsoft product looks nice. But - arrrggh! - I can't understand why folks want to make ordering difficult. They call it "Image Viewer CP Pro SDK ActiveX." Then you look at the purchase page and you see "PDF Viewer" which is more limiting than "Image Viewer" (PDF is a single format, whereas there are lots if Image formats, as you know) and "CP Pro" is not found in any of the product names. Bugs the hell out of me when a product is called one thing on the page to tell you all about it and another thing on the page where you order. Why make people encounter the obvious problem of "is this what I order, because nothing here matches the name they call it elsewhere." People can't figure out this is a problem? It's all on the same page, really, so I guess that makes it more clear, but, still, why one name one place and a different name in another place?
 
Hi Mike,

just to be sure, both tools I mentioned are offline tools.
The viscomsoft product looks nice. But - arrrggh! - I can't understand why folks want to make ordering difficult. They call it "Image Viewer CP Pro SDK ActiveX." Then you look at the purchase page and you see "PDF Viewer" which is more limiting than "Image Viewer" (PDF is a single format, whereas there are lots if Image formats, as you know) and "CP Pro" is not found in any of the product names. Bugs the hell out of me when a product is called one thing on the page to tell you all about it and another thing on the page where you order. Why make people encounter the obvious problem of "is this what I order, because nothing here matches the name they call it elsewhere." People can't figure out this is a problem? It's all on the same page, really, so I guess that makes it more clear, but, still, why one name one place and a different name in another place?
Hello,

I do not know why in the forum its shown as PDF Viewer, the link is hxxps://www.viscomsoft.com/products/imageviewercppro
or maybe hxxps://www.viscomsoft.com/products/imageviewercp
(xx=tt)

PDF Viewer and image viewers are different products.
On the purchase page you find the image viewer pro in the 9th row, a dark blue picture with fotos on it, when you hover over it , you see name , with click you goto order page.

I agree , good software, bad web page
 
I think your strategy is cutting out rectangles of handwriting and OCRing these small parts. Any form where users write over box edges would need reprocessing, but the majority should be doable.

So all you need is a map of the regions in your scans. Hopefully the scans are all aligned well enough but then the problem boils down to cutting a rectangle out of an image, which the gdiplusx library is able to do, no matter if images are JPG, or TIFF.

Then there might be a benefit of not trying to do this mapping yourself and process the whole forms with OCR. It's not the only job of OCR to recognize written letters, they may offer a feature to "understand" forms, if they are "trained" by an empty form.
 
Last edited:

Part and Inventory Search

Sponsor

Back
Top