无法在Python 3.6.6的Open CV 3.4.1上运行跟踪 [英] Unable to run Tracking on Open CV 3.4.1 on Python 3.6.6
问题描述
我尝试在python 3.6.6上使用Open CV运行跟踪,但显示:
I tried running tracking using open CV on python 3.6.6, but it shows:
AttributeError:模块'cv2'没有属性'TrackerKCF_create'
AttributeError: module 'cv2' has no attribute 'TrackerKCF_create'
我也尝试了python 2.7 API,但结果相同:
I also tried the python 2.7 API, but the same result:
AttributeError:模块'cv2'没有属性'Tracker_create'
AttributeError: module 'cv2' has no attribute 'Tracker_create'
Open CV版本是3.4.1.
The Open CV version is 3.4.1.
有什么办法解决这个问题吗?
Any idea how to resolve this?
提前谢谢.
问题不同于在此处所问的问题一个>.我试过了,但是对我没用.但是,我解决了这个问题,并在下面给出了解决方案.
The problem is different to the one asked here. I tried this but it wasn't working for me. However, I solved it and I have given a solution below.
推荐答案
问题是我先安装了opencv-python,然后又安装了opencv-contrib-python,这导致它们发生冲突.我完全删除了它们,然后重新安装了opencv-contrib-python.解决了!
The issue was that I had installed opencv-python first, and then opencv-contrib-python, which led to them clashing. I removed both of them completely, and reinstalled opencv-contrib-python. That solved it!
这篇关于无法在Python 3.6.6的Open CV 3.4.1上运行跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!