Handwriting recognition

Miscellaneous Forums/General Discussion/Handwriting recognition

How would you go about creating a program which recognises handwritten symbols?
The problem is, humans have many styles and methods of writing the same symbol/character. Take a look at this image for example:


The RED dot is the starting point in all of the symbols. Looking at the number 5, you can see there are at least two ways to draw out this number. Then there is the possiblility of iit being mistaken for 's'

The number '2' also has at least two styles and could be mistaken for 'z'

This example shows variantions in wrting '3'
The user will no doubt write in different sizes and styles again:




1 vs 7 - Again, how would you determine which is which?




Ok, so you could restrict the way in which a user must write a symbol. I think mobile phones do this. They tend to be very picky how you write. Even doing that, how would you tackle all the variations in the writing styles?

(I think the Nintendo DS 'Brain' game handles input fairly well)

I think with handwriting recognition people have to accept that they need to conform to certain styles and that if they have a weird way of doing a particular symbol it wont necessarily be catered for.

I don't know how well it would work but one way could be to record the directions of the strokes.

1 is down.
2 is right, left, right
3 is right, left, right, left

I've only played Brain training once or twice but it seems as though the games only deal with either letters of numbers so 5 looking like an s doesn't matter.

The way id do it, is to first have, as you suggest, a few different styles of letters. Now, you could store these letters as a vectored drawing in code, for resizing purposes, but you'd probably down/upscale the character your checking to the size height as the one your checking against.

Then compare pixels against each letter you have. Give each comparison a score, based on whether a pixel is filled or blank, and pick the character which has the best score.

..man..on such simple things, is easy to realize how much computers suck in comparison with human brain..pihh...

There are programs that do handwriting recognition quite well.

Newly born humans on the other hand are very bad at handwriting recognition. It takes them many many years. :)

Maybe this would be of any use?
http://www.gamedev.net/reference/articles/article2039.asp

Sometimes it's easy to forget what a computer is and what it's not. :P

If you want to recognise all styles, the way microsoft did it for the tablet pc was the most impressive I've seen so far. As far as I can remember, they don't care too much about the shape of individual strokes, but the order in which they're done, which they then compare to a very big database of handwriting samples. Clearly, as there are so many different ways of writing letters, you're going to need a lot of samples.

On the other hand, if you want to restrict users to a certain way of writing each symbol, something like that gamedev article linked to by deps is your best bet.

the humans at work really hate reading my hand writing so i think machines will quake with fear ;)

i started typing up stuff for school and became more comfy with a keyboard than a pen and currently at work all i use a pen for is to tick items in my list or write some garbled message to myself as to whats missing

what i got into the habbit of doing was writing all caps on 5mm square paper so i could read what i was writing in the pub when ratted (and why i got that mini OLPC type laptop)

what i have used re hand writing asks you to submit samples so it can check how you do your 5 and check it against S' like in the visual example
my H's kinda look like the crylic reverse N

Warpy is correct. How far and in what direction. Nearest error. And there you have it.

Microsoft TabletPC recognition is the best I've tried, even though it never seems to get my o's right. It uses word lists to help it guess words, so only works with English...or very carefully written text where there is no doubt what each letter is.

Besides that you could look at CellWriter http://risujin.org/cellwriter/ It's an open-source handwriting recognition projects, so you can look at the code and see how they did it.

You could use the Palm graffiti stuff as reference for easy to recognize character symbols

image

The Postal Service usually has to have some kind of OCR device which is pretty good at recognising postal codes.

failing that they stick em to a human ;)

Plus you could build in a dictionary, that you could compare the words against, which will help elimate spelling errors, and complete any word, where the code recognised the wrong letter(s).

Thanks all. Good stuff
I will play around with the code linked to by deps

Very interesting topic, i always wanted to do that but never found time to really implement something useful.