Opencv4.1.1 SIFT is not working

I am trying to use SIFT in opencv4.1.1 but to know it is patented and need to compile from source to install Opencv-contrib-python.

I followed the instructions from below link

downloaded the install script

and changed cmake line 47 to add the flag to turn patented source

but still get following error

cv2.error: OpenCV(4.1.1) /home/xavier/Desktop/opencv_contrib-4.1.1/modules/xfeatures2d/src/sift.cpp:1207: 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’


Please file your problem on opencv forum. We are not openCV expert so may not help much about this issue.

Actually I would suspect whether opencv-python and opencv-contrib-python are really getting this feature enabled.