python中的对象跟踪 [英] Object tracking in python

查看:108
本文介绍了python中的对象跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在PYTHON中开发一个程序,该程序能够执行以下操作:

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.

您将如何实现它?我已经看过PIL,pygame和OpenCV,但是我找不到任何可行的解决方案,只有一半解决方案.您将按照什么步骤进行操作?

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?

感谢您的帮助, D

推荐答案

这是一个不错的演示(使用Python和OpenCV),似乎正是您想要的:

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

这是否对您有效而无需修改取决于您现场的详细信息.该示例使用cvHoughCircles标识圆,如果您的对象不是圆,则需要替换它.

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.

这篇关于python中的对象跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆