Skip to main content
gamedev.net
🔒 Locked

Number recognition?

Started by -=Code=- Aug 25, 2000 at 9:55 PM 4 replies 500+ views
Original Post
-=Code=-
-=Code=-
I need to know how to recognize numbers that are represented by a pattern of *''s. That is the number zero would be, *** ** ** ** ** *** and if it could be as simple as possible. Also if you have any good links on this matter that would also be of help. Thanks.
CobraA1
CobraA1
So, what''s the problem? Can you be more specific? Is this something like OCR (Optical Character Recognition)?



"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away"--Henry David Thoreau
-=Code=-
-=Code=-
Yeah its like OCR and I have to write it in Java. I can't write it with neural networks because I don't have time to learn that if it will take too long. Possibly with statistical pattern recogntion.

At the moment I'm open to any suggestions.

Edited by - -=Code=- on August 25, 2000 12:28:37 AM
bishop_pass
bishop_pass
If a number is a 2 dimensional array of 1''s and zeros (a bitmap) then it is a vector. (An array is a vector).

Normalize the vector (sum the squares of the elements and divide each element by this sum).

Do a dot product of the input normalized vector with a reference vector representing the number.

The closer the dot product is equal to 1 the closer the input number matches the reference number.

_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in
milo
milo
Well, you could use Bayesian Classifiers, but you want simple.

I assume your talking about actually capturing a picture of the number(s).

I have some questions.

Is it one character per picture or a string of numbers per picture? The first is a lot easier.

Will the pictures be oriented fairly closely to straight up and down and not rotated? Shifting left-right or up-down is fine. Rotation is more painful to deal with.

Will the pictures be up close so that the whitespace between characters is easily distinguishable?

Answer those first and then I''ll tell you more. Plus, think about what Yes answers to those last two mean to solving your problem. This is probably a good place for a heuristic solution instead of a mathematical one.

Mike Roberts
aka milo
mlbobs@telocity.com
-=Code=-
-=Code=-
"Is it one character per picture or a string of numbers per picture? The first is a lot easier."

It's one character per picture, but i also need to recognize a string of numbers per picture.

"Will the pictures be oriented fairly closely to straight up and down and not rotated? Shifting left-right or up-down is fine. Rotation is more painful to deal with."

Don't know exactly what you mean. If you mean how the numbers will be oriented in the picture they can touch each other. Numbers, however will only be presented in upright position. No italics although some numbers will be slightly tilted.

"Will the pictures be up close so that the whitespace between characters is easily distinguishable?"
If you mean that the characters will touch each other, then yes some might but its not essential at the moment that I cover that possibility.

In case there is some mis-communication, what I have to do is input an 2D array that contain '*' and from that deduce what number is being presented.

Edited by - -=Code=- on August 26, 2000 5:12:13 AM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.