0

using the opencv sift feature in my python3 script gives me:

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 'create'

But this option was set and the cmake output said

Non-free algorithms: YES"

therefore I assume the flag was correct. The output regarding python3 is:

-- Interpreter: /Users/andre/.virtualenvs/dl4cv/bin/python (ver 3.7.6) -- Libraries: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin/libpython3.7.dylib (ver 3.7.6) -- numpy: /Users/andre/.virtualenvs/dl4cv/lib/python3.7/site-packages/numpy/core/include (ver 1.18.0) -- packages path: lib/python3.7/site-packages

which looks fine to me. Everything is set up and running in a virtualenv but I can't figure out while I can't use sift. Can anyone provide some guidance?

thatandre
  • 23
  • 1
  • 3
  • I think that `sift` is in the contrib modules, did your opencv has compiled with contrib? – Saeed Masoomi Jan 02 '20 at 19:36
  • yes, the cmake output includes: `-- Extra modules: -- Location (extra): /Users/andre/opencv_contrib/modules` – thatandre Jan 02 '20 at 22:07
  • Are you sure your virtual env is using the OpenCV you built and not from PyPI or similar? You can check the version and path of `cv2` and make sure it matches your build. – alkasm Jan 02 '20 at 22:20

0 Answers0