We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Recognizing letters in an image
Page Index Toggle Pages: 1
Recognizing letters in an image (Read 4449 times)
Recognizing letters in an image
May 6th, 2010, 6:27pm
 
Good evening people,

First of all sorry for my English, it isn't my first language.

I'm looking for some tips because I need to develop a program and I feel lost regarding what algorithm I should use.

The goal of the program is to correctly recognize different letters in an image and color them differently from each other.

My question is, how can I regonize letters in an image (I just need to recognize "A" and "D"? I've looked around but so far I couldn't find any algorithm which allows this kind of thing.

Thanks in advance for your help.
Re: Recognizing letters in an image
Reply #1 - May 7th, 2010, 12:42am
 
That's OCR (optical character recognition) you are talking about, a difficult topic when generic.
Fortunately, your goal seems much more limited, so it should be easier to handle.
You have to tell us more. Where the image comes from? From a file? It is always the same (always fixed shapes for these letters?) From a scanner or a camera? Might be harder, with noise, potential rotation, etc.
Re: Recognizing letters in an image
Reply #2 - May 27th, 2010, 7:26am
 
I am also interested in this topic although i am particularly interested in recognizing numbers/digits rather than letters. I hope this would be easier as their are only 10 digits rather than 26+ characters.

I have recently started using the opencv library and face detection, which has been great. Can this be adapted for this purpose?

What about QR codes or Augmented Reality? Could those techniques be used with numbers rather than patterns?

Thanks for any guidance on this.
Re: Recognizing letters in an image
Reply #3 - May 27th, 2010, 8:08am
 
check out this library. http://inthistogram.altervista.org/
you can use it find images, patterns, also letters i guess in other images.
Should be a good way to go.

Re: Recognizing letters in an image
Reply #4 - Jun 3rd, 2010, 4:40pm
 
thanks i'll check it out.
Re: Recognizing letters in an image
Reply #5 - Jun 4th, 2010, 12:23pm
 
Another open source character recognition  tool  is tesseract see report on wikipedia http://en.wikipedia.org/wiki/Tesseract_(software).
Created by HP currently developed by google, and there is apparently a java gui http://vietocr.sf.net/, which might not be so useful since it is developed for Vietnamese Tongue
Re: Recognizing letters in an image
Reply #6 - Jun 6th, 2010, 12:11pm
 
first of all you need a pad of paper and a pen to draw the letters you want to detect. then you need to represent this in an array or a grid or any other "data structure".

then you need to scan your image looking for edge detection possibly? or at least places where the pixel value changes then you record this  info into a duplicate data structure pre filled with dummy data or void or null values , doesn't matter how you term these initial values, dummy void initial whatever. After the scan the duplicate data structure  will have initial values and overwritten values (probably zeroes and ones true or false).

now you can scan the data structure containing the record of pixel changes and compare with whatever letter you are looking for stored in another data structure in the same manner and indexes. and whenever there is a match or a true within say one two or 3 indexes either side of the letter that is stored in a "data structure" you give it a score .

then when you have finished going through "nested loops" or nested "while loops" or something similar you add up the score and if the score is high you PROBABLY have found your letter now you can change the corresponding pixels on the screen.

what you are looking for is very early 1970's artificial intelligence techniques that can be easily written in even a basic language.

the above will need refining with a lot of trial and error.
and probably isn't worth it today just find someones libray or open source code and learn how to use and implement this.

Re: Recognizing letters in an image
Reply #7 - Jun 8th, 2010, 1:50am
 
I have seen in http://herecomethelizards.co.uk/mu_captcha/ (actually first on UserScripts.org) an amazing JavaScript program to decipher (too simple) captchas on a site, doing OCR...
Of course, it uses canvas component to access the pixels of the image.
Whatever, the interesting part, which I have only glanced over, seems to use a neural network to perform the letter identification.
That's a domain where I have very little knowledge (alas) but it seems promising and well adapted to original problem (even if OP seems to have lost interest in it...). Or maybe it is overkill, as I stated, if the letters will always have the same shape.
Page Index Toggle Pages: 1