Object tracking in python


Question

I'm working on a program in PYTHON which is able to do the following:

A webcam is watching a movement, where an object is moving on a path. The object to be tracked is marked with a big yellow spot. I have to find this yellow spot, then calculate the center-point of this spot, and then make some calculations with it. It would be awesome, if the centerpoint would draw on the picture, and it remains there the whole time.

How would you make it happen? I1ve already looked at PIL, pygame and OpenCV but i can't find any working solution, only half-solutions. In what steps would you do it?

Thanks for your help, D

1
3
8/31/2011 12:07:05 PM

Here's a nice demo (using Python and OpenCV) that seems to be what you're looking for: video, code

Whether this will work for you without modification depends on the details of your spot. The example uses cvHoughCircles to identify the circle, and if your object isn't a circle, you'll need to replace this.

2
9/6/2011 1:49:42 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon