Is it possible to achieve OCR through learning alone?

39 views
Skip to first unread message

Steve

unread,
Sep 5, 2014, 9:49:47 AM9/5/14
to accor...@googlegroups.com
Hi all, firstly, I am a proficient programmer but you must forgive my ignorance regarding Machine Vision, Accord / Aforge capabilities and anything Neural Net. I am hoping for some pointers to set me away in the right direction.

Problem...
I have a process that scribes an ident onto a panel then the production part is moved to the next process checked by man.

I wish to automate the checking process.

I wonder if this library has the capability of learning & eventually understanding what it sees with minimal pre-processing?


Conditions...
Image - snap shot of metalic panel
string - 17 character alpha numeric scribed into steel
Font - non standard (company developed)


Proposal...
1. Camera takes a snap shot of the 17 character string
2. The application gets the expected value from the machine PLC
3. Operator verifies OK / NG
4. System learns & eventually can read the string automated

Is this possible?


What I do know, if I do some pre-processing, I can split the string into 17 characters, add some effects to remove noise / reduce size / edge find etc but I'd rather not. This means I'd alos have to develop a front end editor or code in some logic to know where to start & end and split the image up. My thoughts are - is it not possible to develop a system that can simply see the almost identical images (bar 1 or 2 character changes each cycle) and eventually learn to read. Utopia?

Any pointers would be greatly appreciated.

Steve.

César

unread,
Sep 9, 2014, 7:30:54 AM9/9/14
to accor...@googlegroups.com
Hi Steve,

Unfortunately the library doesn't offers anything to make this completely automatic as it would be desirable :-(

However, if you could at least do some minimum processing to ensure images are properly aligned (i.e. pixels are always more or less at the same place on each picture), then perhaps this would make the problem easier. If you could at least identify roughly a rectangle where your points of interest are, you can put every pixel of this rectangle in a feature vector. For example, you could do this by cropping the suitable region from your image and then apply the ImageToArray converter, transforming your Bitmap picture into a single double[] array.

After you do that, you could assign a label to each double[] array, indicating whether the image was good (+1) or not (-1). This could be assigned by the operator, for example, through some kind of system. In the end, you will have a collection of double[] images, and corresponding int[] labels. Once you have those two, you can try to create a classifier, such as a support vector machine, that effectively learns how to assign a +1 or -1 to the double[] you give to it. Please take a look at the example on the bottom of this page so you can get an idea on how this could work.

However, whether this would work or not depends heavily on your problem, how your images are gathered, luminosity conditions, whether you would like to apply some pre-processing first, etc. This is also the simplest possible way one could do about it, which might likely not lead to the best results ever, but could be a start.

Hope it helps!

Best regards,
Cesar
Reply all
Reply to author
Forward
0 new messages