Posts

I have become very interested in using webcams to track objects and calculate their relative position in a space. My trusty friend OpenCV 2.4 came in handy. I used Harpia on Ubuntu 10.04 to generate some old, flaky code to track the green LED on an Arduino Mega. I pulled all the functions out of the Harpia code and put them in my own C program. (Code on Github shortly) Since LEDs have a pretty steady color, I took a photo of the LED with the webcam I was using, and then calculated the color value the LED was emitting. From this, I can output X,Y coordinates for the LED in the frame. Below is a quick video I made showing the tracking interface: