ubantu16.04+python2.7+opencv3.2:报错cv2 'module' object has no attribute 'Tracker_create'

在ubantu16.04+python2.7+opencv3.2环境下运行opencv库里的跟踪器程序时,语句:tracker = cv2.TrackerKCF_create()

报错:cv2 'module' object has no attribute 'Tracker_create'

解决办法:需要安装opencv-contrib-python

                    打开终端,执行语句:pip install opencv-contrib-python

                     安装完成后重新运行程序即可。

你可能感兴趣的:(Python)