开发者

Object tracking in python

开发者 https://www.devze.com 2023-04-01 04:58 出处:网络
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'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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消