abidrahmank / OpenCV2-Python-Tutorials

This repo contains tutorials on OpenCV-Python library using new cv2 interface
1.25k stars 888 forks source link

SIFT #211

Open Rahmanzia3 opened 4 years ago

Rahmanzia3 commented 4 years ago

import cv2 cv2.SIFT()

error: Exception has occurred: AttributeError module 'cv2.cv2' has no attribute 'SIFT'

I am using Opencv 4.1.1 python 3.7

Mauhing commented 4 years ago

It seems that SIFT have been removed. I solve this problem with pip install opencv-python==3.4.2.17 pip install opencv-contrib-python==3.4.2.17 and change cv2.SIFT to cv2.xfeatures2d.SIFT_create()

This works for me. Tell me it it works for you too.

dombroks commented 3 years ago

I replaced cv2.SIFT() to cv2.SIFT_create()