web cam image recognition

I want to write a program that will have my web cam be able to interpret how many fingers I am holding up in front of it.  Any ideas where I would start?
Who is Participating?
Most likely what you will want to do is discard as much useless information from the image as possible. I think an edge-detection algorithm would be a good first step, reducing it from a complex color image to something that resembles simple shapes (like fingers) in a bitmap:


Of course, there are many edge detection algorithms and there is still active research in developing better ones, so find one that works best for you.

Once you've found the edges, the next step would be to pattern match the shape of a finger somewhere in the image. You could do that by having a prototype bitmap for the expected edges a finger would form and then doing an alignment to the edges found from your original image.

Once again, image alignment is an area of active research and there are a number of algorithms to do it. I can't find a readily available web resource for it, unfortunately, and it really is a lot more complicated than can be described, here.
RoboRealm is a great environment to work on developing computer vision systems.


To get started, I would just play around with different filters using some test images.  There is no doubt that this will be a challenging undertaking, so I wish you luck!

Considered using a simple neural network? They're relatively easy to implement, I would use VB.NET or C#. The concept is the same for any programming language, however.

To implement this there are a number of approaches you could take.

1. First, you'd need to capture the web cam image into your application.
2. You'd want to 'normalise' it. I.E., you need some code to ensure that every image the cam captures is rotated the same way around, and resized to roughly the same proportions. I.E. Loading the image into a grid, of say 16 x 16 squares.
3. You then train your neural network to identify what a finger looks like. There is a ton of stuff you can read up on about neural nets. They're fun to play with and should get the job done for you.

Good luck!
kevinvw1Author Commented:
Thanks for all the tips!
No problem.  Good luck!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.