问题
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