<< return to Pixycam.com

Using CMUCam5 to track street vehicle

Hi,
I am brand new to Pixy but I have knowledge of C programming and did some hobby work with Arduino before. I am looking at Pixy now as I want to use CMUCam5 to track vehicles driving at night (I am thinking the headlight is a good tracking object). After some time digging up the Pixy, now I have a couple of questions. Not sure if anyone here ever met them before.

  1. From the tutorial, to get Pixy function, the training is required. In my case, there is no way to train the Pixy to recognize vehicle headlights as they are all different (shape/brightness/color). I simply just want to detect white spots in the dark background (maybe a bit white noise from other light source. E.g. street light or moon light)
  2. Pixy is originally designed for colors so I am afraid it doesn’t track white blobs (light in the darkness). I noticed there is method in a post in this forum has solved the issue of object tracking with IR light source but I am not looking for IR in my case

I am not sure if Pixy is a good fit for my application (or it is a overkill?). If not, would someone recommend something else? thanks.

Hi Jack,

I’m not sure I’d call it overkill since using Pixy would make something like this a lot easier, but unfortunately it might not be the right application. You’re right that Pixy does best with color. There have been others on this forum that have modified the firmware to track luminance instead of hue, which might be right up your ally. I’d search for that first.

I can’t really recommend anything else without trying. If you’re talking strictly computer vision techniques then maybe one possibility is to use a simple “kernel method”:http://en.wikipedia.org/wiki/Kernel_(image_processing)#Convolution for detecting drastic circular variation in luminance. There have been quite a few research papers published on tracking cars, specifically by their headlights, so there is some good reference material to look at.

Good luck!

Scott

Thanks Scott, now I am thinking if I can only use Pixy as a camera capture device, then access each frame it captured. Maybe I can write a simple snippet code to examine each pixel in the frame to tell if it is a white spot or black spot.

then, 1. can Pixy see white light in the dark?
2. does Pixy allows user to access its image (digitized .jpg)?
3. can i write the code and execute it on Pixy (i don’t think another Arduino would be useful in this case)

thanks.

Hi Jack,

  1. If the light is in the visible spectrum then yes, Pixy can see it
  2. Unfortunately no. Pixy is meant to send you data on objects it sees, not stream video. Although you could modify the source yourself to provide this capability.
  3. Yes. All of the required files are “open source”:https://github.com/charmedlabs/pixy, and we’re working on a gcc port to make this even easier.

Scott