I'm new to OpenCV and trying to use SIFT and SURF for a project.
On my laptop I have OpenCV version= 4.5.1.48 and also added OpenCV-contrib-python of version 4.5.1.48
currently the problem I'm facing is the error I'm getting after following the documentation SIFT works perfectly after following documentation but SURF isn't working and giving me error for following codes
code 1
surf = cv.xfeatures2d.SURF_create()
AttributeError: module 'cv2.cv2' has no attribute 'xfeatures2d'
code 2
surf = cv2.SURF_create()
AttributeError: module 'cv2.cv2' has no attribute 'SURF_create'
After reading many answers on Stack overflow I changed version of OpenCV and did many things but nothing is working for me
I'm new to this please someone guide me through this
I read about the patent expiring too but nothing is working in my case pls tell me if im wrong somewhere
Thanks in advance