loading
 
OCR problem
Jan from United States  [2 posts]
3 years
Hello everybody,

Total n00b here trying to get OCR to work but no luck so far. went through a gallon of coffee, all the tutorial I could find and can't figure out what I am doing wrong here.

I want to try the OCR function to read the text in the attached image but whatever I try, the OCR-Result variable does not show anything at all. I am using the Adaptive Threshold, followed by OCR and then Display Variables but I can't get anything to show in the little red box on the screen.

Anybody out here that can help me to get going with this? Any help would be appreciated.

Thanks in advance,

JB

 
Steven Gentner from United States  [1371 posts] 3 years
JB,

Thanks for the image. Attached to this is a robofile that almost works on the image you provided. The trick is that you CANNOT allow the letters to touch as the OCR does not yet have the ability to split letters apart. Etched text is actually quite tricky esp if you don't have control over the lighting. The reason for this is the lighting inverts across the letter. So after using a adaptive threshold technique most of the letters parts are not touching ... this can be fixed with a dilation more in the vertical way as too much horizontal will cause the letters to touch.

This almost works as the first digit 4 is actually recognized as an A. This is because the digits are allowed a bit of rotation when matching and the 4 looks more like an A when slightly rotated.

If this appears to work for you we can make some updates to the module to restrict this rotation which will correct this error ... or if you know that the first letter will always be a digit we can provide a matching mask.

Either way, you will need MANY more images to test on to ensure this segmentation technique works across all images. I'd highly recommend at least 50 and more like 100 just to be sure.

STeven.

program.robo
Jan from United States  [2 posts] 3 years
Thanks a lot Steven, this works fine but as you said, it all depends greatly on the lighting conditions. I took some more pictures and got a great variance in results due to the lighting not being consistent enough. I will work on a better fixed camera position with fixed lighting and try again. so far the results look good. The sequence of the serial number is always the same, 3 digits, a letter followed by 4 digits so this may help us getting things a little more reliable.

I will let you know the outcome when we have tried it.

Thanks for your quick response and more later,

JB
Anonymous 3 years
Hi Jb,

I would do a quick google search on photograhing coins as it looks like they have similar issues toyours see http://coinimaging.com/photography.html as an example

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index