Click here to Skip to main content
15,900,418 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can I rename random files? Pin
Antti Keskinen10-Jan-04 2:36
Antti Keskinen10-Jan-04 2:36 
AnswerRe: How can I rename random files? Pin
Ernesto D.10-Jan-04 14:54
Ernesto D.10-Jan-04 14:54 
GeneralNeed Help (detecting file open dialog popup) Pin
Zee man9-Jan-04 22:17
Zee man9-Jan-04 22:17 
GeneralRe: Need Help (detecting file open dialog popup) Pin
Monty210-Jan-04 1:43
Monty210-Jan-04 1:43 
Generalneuronal network Pin
andreas.schaerer9-Jan-04 22:14
andreas.schaerer9-Jan-04 22:14 
GeneralRe: neuronal network Pin
Daniel Turini9-Jan-04 23:13
Daniel Turini9-Jan-04 23:13 
GeneralRe: neuronal network Pin
abc87610-Jan-04 18:36
abc87610-Jan-04 18:36 
GeneralRe: neuronal network Pin
Daniel Turini10-Jan-04 22:23
Daniel Turini10-Jan-04 22:23 
M.Shoaib Khan wrote:
Can u please elaborate more how u did OCR???
Geez, this deserves an article series, but I'll try Smile | :)

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.

Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier


By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
Generalclass member have no valid adress!!please help! Pin
andreas.schaerer9-Jan-04 21:36
andreas.schaerer9-Jan-04 21:36 
GeneralRe: class member have no valid adress!!please help! Pin
valikac10-Jan-04 5:31
valikac10-Jan-04 5:31 
GeneralRe: class member have no valid adress!!please help! Pin
andreas.schaerer10-Jan-04 6:03
andreas.schaerer10-Jan-04 6:03 
GeneralRe: class member have no valid adress!!please help! Pin
valikac10-Jan-04 7:39
valikac10-Jan-04 7:39 
GeneralRe: class member have no valid adress!!please help! Pin
andreas.schaerer10-Jan-04 9:45
andreas.schaerer10-Jan-04 9:45 
GeneralRe: class member have no valid adress!!please help! Pin
Daniel Turini11-Jan-04 2:01
Daniel Turini11-Jan-04 2:01 
GeneralRe: class member have no valid adress!!please help! Pin
DaFrawg11-Jan-04 8:17
DaFrawg11-Jan-04 8:17 
QuestionGetOpenFileName options? Pin
Randy Trulson9-Jan-04 21:02
Randy Trulson9-Jan-04 21:02 
GeneralLooking for an IDE/Editor with source code Pin
Jagadeesh VN9-Jan-04 19:28
Jagadeesh VN9-Jan-04 19:28 
GeneralRe: Looking for an IDE/Editor with source code Pin
John R. Shaw10-Jan-04 8:57
John R. Shaw10-Jan-04 8:57 
GeneralRe: Looking for an IDE/Editor with source code Pin
John R. Shaw10-Jan-04 9:09
John R. Shaw10-Jan-04 9:09 
GeneralSetting focus on the control Pin
Member 7383649-Jan-04 18:54
Member 7383649-Jan-04 18:54 
GeneralRe: Setting focus on the control Pin
Prakash Nadar10-Jan-04 1:06
Prakash Nadar10-Jan-04 1:06 
GeneralRe: Setting focus on the control Pin
Ernesto D.10-Jan-04 15:01
Ernesto D.10-Jan-04 15:01 
GeneralFile Size Pin
picasso29-Jan-04 18:01
picasso29-Jan-04 18:01 
GeneralRe: File Size Pin
Jijo.Raj9-Jan-04 18:44
Jijo.Raj9-Jan-04 18:44 
GeneralRe: File Size Pin
2249179-Jan-04 21:15
2249179-Jan-04 21:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.