title: SIFT & SURF : "module 'cv2.cv2' has no attribute 'xfeatures2d'" Set OPENCV_ENABLE_NONFREE CMake ==> Solution OpenCV 3 & OpenCV 4
body: <p>I try to use the SIFT and SURF function with some of the versions of OpenCV 3 and openCV 4 (after having installed opencv-contrib-python) with:</p>
  <pre><code>pip install opencv-contrib-python
  </code></pre>
  <p>i try version 3.4.3 and 3.4.9 and 4.1.0, but have same probleme:</p>
  <pre><code>sift = cv2.xfeatures2d.SIFT_create()
  surf = cv2.xfeatures2d.SURF_create()
  ==&gt; 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'
  </code></pre>
  <p>but in version 3.4.2, it's work fine.</p>
  <p>So how to make SIFT and SURF work in the different versions of OpenCV? Thank you.</p>
  <p>A detailed explanation will be welcome</p>