How to create a KCF tracker in cv2 without 'TrackerKCF_create' attribute error?

更新于
2026-08-07 16:01:56
12阅读来源:SEO资源
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计117个文字,预计阅读时间需要1分钟。

How to create a KCF tracker in cv2 without 'TrackerKCF_create' attribute error?

报错:AttributeError: module 'cv2.cv2' has no attribute 'TrackerKCF_create'解决方法:

1.首先卸载旧的opencv-contrib-python包:

pip uninstall opencv-contrib-python

2.然后重新安装opencv-contrib-python:

pip install opencv-contrib-python

报错

AttributeError: module ‘cv2.cv2’ has no attribute ‘TrackerKCF_create’
类似AttributeError: module ‘cv2.cv2’ has no attribute “xxxx"

解决方法

先卸载:pip uninstall opencv-contrib-python
再重新安装:pip install opencv-contrib-python

成功:

How to create a KCF tracker in cv2 without 'TrackerKCF_create' attribute error?


本文共计117个文字,预计阅读时间需要1分钟。

How to create a KCF tracker in cv2 without 'TrackerKCF_create' attribute error?

报错:AttributeError: module 'cv2.cv2' has no attribute 'TrackerKCF_create'解决方法:

1.首先卸载旧的opencv-contrib-python包:

pip uninstall opencv-contrib-python

2.然后重新安装opencv-contrib-python:

pip install opencv-contrib-python

报错

AttributeError: module ‘cv2.cv2’ has no attribute ‘TrackerKCF_create’
类似AttributeError: module ‘cv2.cv2’ has no attribute “xxxx"

解决方法

先卸载:pip uninstall opencv-contrib-python
再重新安装:pip install opencv-contrib-python

成功:

How to create a KCF tracker in cv2 without 'TrackerKCF_create' attribute error?