Picture Recongnition Software of Words to ASCII Code

Does anyone no if there is any software technology that can take an jpeg picture of say some words or numbers and convert the picture of those words to ASCI code that could be then outputted to text file? Thanks

I believe the technology you are looking for is called "optical character recognition", or OCR. Wikipedia has a good introduction:

http://en.wikipedia.org/wiki/Optical_character_recognition

-- The Flexible MIDI Shield: MIDI IN/OUT, stacking headers, your choice of I/O pins

Yep OCR, been around for probably 30 years. But don't expect to run it on an Arduino.


Rob

Do you want to know about this type of software(as you asked) or you want to do this task on Arduino???

I'd be surprised to see any software that can take a jpeg and do OCR on it without first converting to a bit map representation.

if you want to know about software which can do this sort of task for you so i have used MATLAB for this. it can convert pictures to its color codes(numbers) and you can do vice versa, converting those numbers back to picture.

Have a look at - http://www.freeocr.net/ - for some software

The quality of OCR depends greatly on the resolution of the bitmap:

200 dpi (fax) is the absolute minimum, computer send faxes @200 dpi can be recognized quite good (90+%) but paper faxes (<60%) Problem is mostly that characters have merged /smeared together and become unrecognizable. Computer send faxes (aka print :slight_smile: dont have this problem.

300 dpi and up will recognize better. although the OCR engines I worked with seemed to be optimized for 300dpi bitmaps as 400 and 500 dpi were worse and 600 dpi was better again.

Another factor of importance is fonts:
OCR works best on simple fonts like Times or Courier but the more “graceful” a font becomes the more difficult it is to recognize.

Also character lookalikes are often a problem e.g. - {o O 0} - { l I 1} -

Modern OCR often use dictionaries and trigram filtering to help improve the result. Dictionaries look if a word exist, this prevents placing a zero instead of an O in the middle of a word, or an O in themiddle of a number. Trigrams is a statistics method and it looks at exisiting 3 letter combinations in a language and its frequency distribution. It is considered faster as dictionaries and consume less resources without serious degradation in accuracy.

Also modern OCR engines try to rebuild the layout of a text as much as possible, e.g. word or excel as output.

More see - http://en.wikipedia.org/wiki/Optical_character_recognition -


That said, It is possible for an Arduino with 2K to recognize (compare bitmaps) very simple fonts (e.g. 8x5 LCD fonts).

One could have a progmem array with the alphabet + important chars (assume an 8x8 matrix per char) => 100 x 8B = approx 1KB

The recognition would be comparing the character under test with all chars in memory and calculate a matching function (how many pixels do match). A simple matching function would give every matching pixel one point. Maximum score (assuming an 8x8 matrix) is 64 points. A more elaborated version would give 2 points for black matching pixels and 1 for the white matching pixels. Other weights are possible.

Would be a nice (school) project.

Thank you for the detailed replies

Hello,

My company sells a product for such purpose, and it's based on Tesseract. Google about it, once you've trained it it's amazing how accurate it is (Assuming you're wanting to recognize "machine" printed code, not handwritten).

Hope that helps, Pierre.