简体   繁体   English

通过OpenCV跟踪对象

[英]Tracking an object via OpenCV

I am trying to track an object and mask or Hide it (a CODE in this case) using OpenCV and Python. 我正在尝试使用OpenCV和Python跟踪对象并遮罩或隐藏它(在这种情况下为CODE)。 As example I am using this video , the code will showing on 1min19s : https://www.dropbox.com/s/eu01hxoxmd3ns5f/capture-3.mp4?dl=0 例如,我正在使用此视频,代码将在1min19s上显示: https ://www.dropbox.com/s/eu01hxoxmd3ns5f/capture-3.mp4 ? dl =0

What I need is to keep track on the CODE and mask or Hide it as the video without detecting other parts of the video as the code. 我需要的是保持对CODE的跟踪,并将其掩盖或隐藏为视频,而不将视频的其他部分检测为CODE。 Tracking by colour doesn't work here. 按颜色跟踪在这里不起作用。

Any idea for a good approach on this problem? 有什么想法可以解决这个问题吗?

Tracking is much more complex than searching the similar colour. 跟踪比搜索相似颜色要复杂得多。 OpenCV has implemented some tracking algorithms, what you need to do is to use the existing apis to solve the problem. OpenCV已经实现了一些跟踪算法,您需要做的就是使用现有的api解决问题。 Here is an introduction to OpenCV tracker. 是OpenCV跟踪器的介绍。

If you do not stick to OpenCV, dlib is also a c++ library with python interface which also implements object tracking algorithms. 如果您不坚持使用OpenCV,则dlib也是具有python接口的c ++库,该库还实现了对象跟踪算法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM