ofir1080
ofir1080

Reputation: 145

Using SIFT algorithm on cv2 version above 3.4.2.0 (Python 3)


I have used Sift in cv2 v3.4.2 a while ago.
I tried today to run that code on a different machine using python v3.8.3 and cv2 v4.0.1, and I recieved the following error (at line sift = cv2.xfeatures2d.SIFT_create()):

error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration; Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'cv::xfeatures2d::SIFT::create'

I tried to downgrade to lower version but using pip raises:

ERROR: Could not find a version that satisfies the requirement opencv-contrib-python==3.4.2.17 (from versions: 3.4.8.29, 3.4.9.31, 3.4.9.33, 4.1.2.30, 4.2.0.32, 4.2.0.34)
ERROR: No matching distribution found for opencv-contrib-python==3.4.2

I than tried to downgrade to the lowest version suggested and the error still raises.

Any Ideas?
Thanks

Upvotes: 0

Views: 467

Answers (1)

Ted
Ted

Reputation: 136

opencv-python 3.4.2.17 just support up to python 3.7 but you are using python3.8

https://pypi.org/project/opencv-python/3.4.2.17/

try to create python 3.7 environment then reinstall them because i am using python 3.7 and everything is fine

Upvotes: 2

Related Questions