YoshiRi / ImRegPOC

FFT based image registration tool for Python and MATLAB
Other
83 stars 26 forks source link

This algorithm is patented and is excluded in this configuration #5

Closed LS4203 closed 3 years ago

LS4203 commented 4 years ago

When I execute your example that you have on read me I get

# read monocular image
ref = cv2.imread('video//frames//0.png')
cmp = cv2.imread('video//frames//1.png')

# initialization (SIFT can be changed to other descriptor)
matcher = imregpoc.TempMatcher(ref,'SIFT')

I get

error: OpenCV(4.2.0) ..\opencv_contrib\modules\xfeatures2d\src\sift.cpp:1210: 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'

YoshiRi commented 4 years ago

Thank you for your comment. This is because the SIFT algorithm was patented. So you need to rebuild your opencv environment so that the package includes the patented package.

If you are using pip, I think you can try pip install opencv-contrib-python. But I am not sure because I have never tried opencv 4.2.