08-09-2010 08:21 AM
Hi,
I have problem with OCR app.
My task is to recognize letters on photos. For example a picture of one letter printed on whitesheet. The problem is that those photos are taken from different angles, rotation and in different illumination.
I'm quite a begginer if we mean Vision and OCR. How it should be done?
I understand that different illumination can be bypassed by threshold.
But I have no idea how to bypass diffrenet angle and rotation.Do you have any ideas?
08-11-2010 07:25 AM
Hello,
there is no simple mechanism designed for that in OCR, however you could try using IMAQ OCR Train VI to train you application to recognize letters after rotation. You just have to prepare a training set.
http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/ocr_pal/
http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/imaq_ocr_train/
I hope that helps.
08-11-2010 07:26 AM
Please post a few images so that we can try it.
08-11-2010 07:59 AM
Hi
The fastest and easiest way to get to know OCR training is to go to:
1. Select from you start menu -> Programs -> National Instruments -> Vision -> OCR Training ( or where you installed NI Vision )
2. After running the trainer go to help -> Tutorial
There you have described how to teach your application to recognize unusual types of letters.
08-31-2010 09:25 AM
Thanks for quick answers!
@muks: In general I was said that it should work with USB camera, but I thought that it will be easier to try with some pictures. So any at any angle it should recognize a letter(s). Simple letter is photographed for different angles e.g.. 90, 75 and 60 degrees. I will upload some example letters, now I'm trying with letters rotated in Paint 🙂
@TRSns: Thanks, your answers was very helpful. Now I understand how OCR works in LV. But still I have some questions 🙂
1. I'm able to make a VI to recognize letters, but still I can't find out how to recognize rotated letters (only rotated, angle is 90) with only one reference image. I was trying many options in OCR Training using some rotated letters and still it's a mystery for me. Is there any option that program will be looking for rotated ones or should I make training so long that program will recognize all types of rotation?
2. How different angle issue could be solved? I saw that there is a Calibration tool in Vision module. But the only example that I found is using two files for recognizing patterns. One with pattern itself and second that shows calibration grid for this particular picture. Is there a possibility to calibrate an image on the same picture? For example: there is a calibration grid (CG) next to image? In this case next question comes to my mind: how to set different ROI for CG and for a letter itself?
Is it possible to make ROI automatically accordingly to 3 points on a picture. Like in photocodes there are 3 squares that inform where is beginning and end of information.
The worst thing is that many solutions comes to my mind, but I have no idea how to make it in LV.
09-06-2010 03:38 AM
Dear smdxxx,
Normally you would have to perform image pre-processing before, that would calculate text's angle, and then use the information to perform correct OCR.
The preprocessing is dependant on the image, therfore it is quite difficult to be described in text. What I would recommend you would be to post on forum one example image, and also mail it to me:
emil.stremtan@ni.com
And I will offer you an example of preprocessing.
Regarding the second question, is it related to the first "rotation" problem, or you just want to elliminate perspective view from the image?
Regards,
Emil
P.S. Are you using LV with Vision or Vision Builder for Automated Inspection?