Tuesday, January 09, 2007

Webcam color tracking

So this is a VERY rough attempt at tracking objects based on color. Again, you need a webcam.

1) Fill the middle circle with a nice bright high contrast color
2) Click the COLOR button
3) Little crosshairs track the color (er, somewhat)

Color Tracking

A brightly lit room helps. This actually worked worse and worse the later/darker it became.

With my best efforts I don't think this could be viable for a released product but it was an ejoyable experiment. What I was really hoping to do was track the color and then add some gesture recognition. Then I could cast spells a la Harry Potter or something silly.

A number of people have contact me about the code for this. I must warn you, IT WORKS POORLY EVEN UNDER THE BEST CONDITIONS! But you asked so here is the source.


Anonymous pin3appl3 said...

we are from singapore nanyang poly students... we are currently working on a project which require the skill of color tracking in flash... so we are asking u can kindly send us ur source for our reference pls reply asap

our email is :

thank you.

2:22 AM  
Blogger Stefan said...


I'm a student of Informations Management in Graz and need some code like yours for a project.
It would be nice if you could sent it to me!

email: stefan.lambauer@gmail.com

best regards

8:55 AM  
Blogger Eric said...


I have plans on building an open source webcam API for color tracking. Do you think you can share your source with me? The good will come back at you.

erkalanger [at] gmail.com

3:01 AM  

Post a Comment

<< Home