Skip to content

Transfer SIFT to the main repository #16736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ychechik opened this issue Mar 5, 2020 · 11 comments
Closed

Transfer SIFT to the main repository #16736

ychechik opened this issue Mar 5, 2020 · 11 comments
Labels
category: contrib Target patches to **opencv_contrib** repository: https://github.com/opencv/opencv_contrib category: features2d effort: few weeks Contribution / porting of a new/existed algorithm. With samples / tests / docs / tutorials feature GSoC
Milestone

Comments

@ychechik
Copy link

ychechik commented Mar 5, 2020

As of the day after tomorrow (7.3.20) the patent on SIFT will expire and so it should be free to use.

Moving it out of the non-free folder will enable all to compile opencv with default flags and still get SIFT (will also help for the python binding as it doesn't compile the non-free folder).

@vpisarev
Copy link
Contributor

vpisarev commented Mar 6, 2020

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

@alalek
Copy link
Member

alalek commented Mar 6, 2020

As a quick step in this way we can remove #ifdef guards with OPENCV_ENABLE_NONFREE for SIFT source code in opencv_contrib repository (without moving the code).

@saskatchewancatch
Copy link
Contributor

@alalek @vpisarev , I attempted this in PR 2449 in opencv_contrib repository. It implements the "quick step" by moving SIFT out of non-free into free. I suppose the rest of the work involving moving it into opencv could be a later work for GSoC as per Vadim's suggestion.

@flokixdev
Copy link

Can I ask, when we can expect it to be included in a new release?
Thank you!

@alalek
Copy link
Member

alalek commented Apr 24, 2020

#17119 backlog:

  • 2 disabled SIFT tests
  • fix C++ compatibility? cv::xfeatures2d::SIFT::create() (problem is due MSVS ambiguous errors)
  • fix Java bindings compatibility? org.opencv.features2d.SIFT.create()

@Austral-IV
Copy link

If SIFT is now included in the packages, why do i get a module 'cv2.cv2' has no attribute 'xfeatures2d' error when using the opencv-python pip package and a DEPRACATED error when trying with the opencv-contrib-python package? which should I use?

@towr
Copy link

towr commented Jun 1, 2021

@Zenos-Paradox
It looks like it's been moved. You should use cv2.SIFT_create() instead of cv2.xfeatures2d.SIFT_create() now. (xfeatures2d only exists in the contrib package, but sift is part of the main package now.)

@Austral-IV
Copy link

Austral-IV commented Jun 1, 2021 via email

@HaiderAbasi
Copy link

For anyone still stuck...

SIFT was not working for me in OpenCV-contib-python (Version 4.2.0.34) either.
Both of methods cv2.xfeatures2d.SIFT_create() and cv2.SIFT_create() Did not work!

What did work:
pip install opencv-contrib-python==4.4.0.46

OS = Windows 10
Python Version = 3.8.10

@Byte247
Copy link

Byte247 commented Jun 5, 2023

@HaiderAbasi what exactly did you do after installing opencv-contrib-python==4.4.0.46? Did you still use cv2.xfeatures2d.SIFT_create() or cv2.SIFT_create() ?

@danielagam
Copy link

@HaiderAbasi what exactly did you do after installing opencv-contrib-python==4.4.0.46? Did you still use cv2.xfeatures2d.SIFT_create() or cv2.SIFT_create() ?

cv2.xfeatures2d.SIFT_create() show warning so I use cv2.SIFT_create() and the warning disappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: contrib Target patches to **opencv_contrib** repository: https://github.com/opencv/opencv_contrib category: features2d effort: few weeks Contribution / porting of a new/existed algorithm. With samples / tests / docs / tutorials feature GSoC
Projects
None yet
Development

No branches or pull requests

10 participants