1

I am trying to implement image stitching using opencv. specifically, I'm following this tutorial.

The problem I have is that the sift algorithm is not accessible. After looking around on the web, I found that the algorithm was patented or something and now it is not anymore and it was moved in the repo, and now I can't seem to find any useful tutorial for installing the correct things for using this algorithm.

Can anyone please explain what should be installed so that this line passes without errors? (line 54)

descriptor = cv2.xfeatures2d.SIFT_create()

Note: tried opencv 4 with opencv-contrib 4, working on windows.
Note 2: Other answers on stack overflow are not updated to the change that is mentioned above.

GalSuchetzky
  • 785
  • 5
  • 21
  • 1
    Does this answer your question? [Can't use SIFT in Python OpenCV v4.20](https://stackoverflow.com/questions/60065707/cant-use-sift-in-python-opencv-v4-20) – Grillteller Oct 19 '20 at 11:48
  • no, the version there is not found on pip – GalSuchetzky Oct 19 '20 at 15:03
  • Another try - more recent: Is this useful? https://stackoverflow.com/questions/62601766/using-sift-or-an-alternative-in-python-opencv-4-2-0-in-2020 – Grillteller Oct 20 '20 at 08:58

1 Answers1

1

The sift algorithm is now free since March 2020, it has been transferred from OpenCV-Contrib (Non free) to the main repository of OpenCV (Free)

Sources:

https://piero.dev/2019/04/the-sift-patent-has-expired/#:~:text=As%20of%20March%207th%20of,on%201999-03-08

https://github.com/opencv/opencv/wiki/GSoC_2020#idea-better-sift-in-the-main-repository

https://github.com/opencv/opencv/issues/16736

The syntax changes from descriptor = cv2.xfeatures2d.SIFT_create () to descriptor = cv.SIFT_create ()

RashidLadj_Winux
  • 810
  • 1
  • 6
  • 17