Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to run Tracking on Open CV 3.4.1 on Python 3.6.6

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.

like image 855
Aditya Singh Avatar asked Sep 08 '18 05:09

Aditya Singh


1 Answers

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!

like image 112
Aditya Singh Avatar answered Nov 05 '22 07:11

Aditya Singh