!pip install opencv-python && pip install opencv-contrib-python
Requirement already satisfied: opencv-python in /usr/local/lib/python3.6/dist-packages Requirement already satisfied: numpy>=1.11.3 in /usr/local/lib/python3.6/dist-packages (from opencv-python) Requirement already satisfied: opencv-contrib-python in /usr/local/lib/python3.6/dist-packages Requirement already satisfied: numpy>=1.11.3 in /usr/local/lib/python3.6/dist-packages (from opencv-contrib-python)
import cv2
cv2.xfeatures2d_SURF
AttributeError: module 'cv2.cv2' has no attribute 'xfeatures2d_SURF'
Why does not it work?
xfeatures2d_SURF
is not a proper function.
Try: cv2.xfeatures2d.SURF_create()
to test your installation.
Here is an tutorial showing how to use SURF in python.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.