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.