opencv 4.x版本在使用Tracker_create等Tracker*方法时,可能会出现"module 'cv2.cv2' has no attribute 'Tracker_create'"
的问题,这时安装opencv-contrib-python
即可解决:
pip install opencv-contrib-python
切记是pip
不是pip3
,如果不起作用就卸载opencv-contrib-python
重装。
python opencv找不到Tracker_create的解决办法
opencv 4.x版本在使用Tracker_create等Tracker*方法时,可能会出现"module 'cv2.cv2' has no attribute 'Tracker_create'"
的问题,这时安装opencv-contrib-python
即可解决:
pip install opencv-contrib-python
切记是pip
不是pip3
,如果不起作用就卸载opencv-contrib-python
重装。