M.Shoaib Khan wrote: Can u please elaborate more how u did OCR??? Geez, this deserves an article series, but I'll try :) M.Shoaib Khan wrote: one big benfefit i have is that i know color of text so i can seperate text from other image.. This is great. Don't forget to allow some small variations on the color to get the full char. To separate chars, a simple scan for an empty vertical space is enough. If they are 'glued' together, the algorithm is a bit more complicated, and you'll need to add vertical lines to the char until the network can recognize something. M.Shoaib Khan wrote: Which ANN did u used?? Back propagation?? counter propagation or radial basis? This was the scariest part, I was afraid that I would need a very good NN, but in the end, it was just a simple perceptron, with some hidden layers and had a very good performance (it was both fast and accurate). I noticed that the first steps were much more determinant on the OCR's performance than the NN itself. For the feature extraction, I don't remember the algorithm name right now. It was not invented by me, and seems to be used by several omnifont OCRs. The algorithms I used both reduced the resolution and the size of the chars (all of them need to be the same, normally). So, I created a grid like this:
...|...|...|... ...|...|...|...
..1|..2|..3|... ...|.xxXxx.|...
...|...|...|... ...X...|.xx|...
---+---+---+--- --x+---+---X---
...|...|...|... ..x....|...X...
..4|..5|..6|... ...XxxxxxxxX...
...|...|...|... ...Xxxx|.xxX...
---+---+---+--- ---XX--+---X---
...|...|...|... ...X...|...X...
..7|..8|..9|... ...XX..|..XX...
...|...|...|... ...|...|...|...
The numbers are IDs of the segments, and you can do this on the horizontal segments too (I just didn't to make the text more clear). Basically, you get the image and draw those imaginary segments. You then mark if (or how many times) those segments have been crossed, so you can detect horizontal, vertical and diagonal line features and each feature is an input node of the NN. Add some hidden layers (this will need tweaking, but I had success with sizes x, x/2, x/4) and the output layer is just a sequential ID for the char (0 for 'A', 1 for 'B'...) Unfortunately, this code is part of my product now, so I can't give you a copy. I didn't need to do image vectorization, so I don't have any experience with it