Unable to run Tracking on Open CV 3.4.1 on Python 3.6.6

…衆ロ難τιáo~ 提交于 2019-12-12 13:51:01

问题


I tried running tracking using open CV on python 3.6.6, but it shows:

AttributeError: module 'cv2' has no attribute 'TrackerKCF_create'

I also tried the python 2.7 API, but the same result:

AttributeError: module 'cv2' has no attribute 'Tracker_create'

The Open CV version is 3.4.1.

Any idea how to resolve this?

Thanks in advance.

Edit:

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.


回答1:


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!



来源:https://stackoverflow.com/questions/52232165/unable-to-run-tracking-on-open-cv-3-4-1-on-python-3-6-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!