Can not use SURF


I’m new to OpenCV, i tried to use SURF to capture features of an image.

i installed OpenCV with version 4.8.1. I also installed “opencv-contrib-python”.

When i create a SURF object with below code, i faced error.

import cv2 as cv
s= cv.SURF_create()

error: AttributeError: module ‘cv2’ has no attribute ‘SURF_create’

that is probably the problem.

ONE package may be installed. not multiple.

i realized that the problem may be caused by the patent of SURF.

In this case, i just forget SURF and use SIFT instead. thank you for your time.