Ask Your Question
0

I need a character recognition program to sort parts please

asked 2013-06-11 01:46:35 -0600

Looker gravatar image

Introduction: I am a retired mechanical engineer. I love all things robotic. I know enough C to get frustrated. I know some SQL and Python like scripting language. I have searched a bit Sourceforge and such for a character recognition example to no avail. Then I found this site. I thought I would ask for some help on a pet project.

Problem: I have thousands of small metal parts that have numbers stamped on them. I need to sort them into bins for recycle and reuse.

Scope: I can write all the motion control code, but vision for me is black magic. I would like to have a example code that could be compiled and ran for testing but also so it can be called from another control program.

My thought is to place the parts on a stepper motor driven belt roll them in front of a camera station with a close up lense to make the number fill the screen of the USB webcam. if no char then advance the motor 1 step if char then place it into a string. loop until all numbers are read.

I'm guessing I would need maybe 5 global variables for if then else statements. I haven't coded in 12 years. Sheesh I'm getting rusty. I'm just starting to read about C# 2012, so what follows may look a little silly.

For example;

ischar(0)     //scan is not a recognised char False 
while ischar(0)    // while false avance belt till something is starting to look like a char                     step(1)                              // move stepper motor 1 pulse or 1/2  char distance 
read frame(0)             //scan frame for char, "magic happens" and a char is identified if
read.frame(1)                     //if true copy the value to a variable
set var read.char = to magic happens  //  

set var modelstring = read.char //create model string to compare against table value

// if model = badpart move to bin recycle // if model = good1 move to bin good1 // if model = good2 then move to bin good2

I am fascinated by computer vision but at this moment the learning curve is very steep for me but I am eager to understand more.

If someone can please help me out I would be willing to make a small donation to the cause of your choice.

edit retag flag offensive close merge delete

Comments

a small example pic of your numbers would be definitely helpful.

berak gravatar imageberak ( 2013-06-11 02:00:04 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-06-11 22:52:09 -0600

The sample Letter Recognition, in CPP could be a good start for letter recognition and training. You could also look at the chapter 5 of Mastering OpenCV with Practical Computer Vision Projects book, which used OCR for plate recognition.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-06-11 01:46:35 -0600

Seen: 557 times

Last updated: Jun 11 '13