Solve Issue 19761#19762
Merged
alalek merged 3 commits intoopencv:masterfrom Mar 24, 2021
lukasalexanderweber:master
Merged
Conversation
In OpenCV 4.5.1 import cv2 as cv cv.xfeatures2d_SURF.create will not create an AttributeError, even if the function is excluded (no nonfree option) In Line 305 (now 306) however ´finder = FEATURES_FIND_CHOICES[args.features]()´ will raise an error: OpenCV(4.5.1) ..\opencv_contrib\modules\xfeatures2d\src\surf.cpp:1029: 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::SURF::create' So we should check with cv.xfeatures2d_SURF.create() correctly if SURF is available
When the user works with his own data, this throws an error.
Contributor
Author
|
Please forgive me if I'm not fulfilling all requirements on your pull requests. To be honest this is the first one I've ever done in any popular Repo. Please give any information on how I can improve them |
alalek
reviewed
Mar 22, 2021
samples/python/stitching_detailed.py
Outdated
| is_compose_scale_set = False | ||
| for name in img_names: | ||
| full_img = cv.imread(cv.samples.findFile(name)) | ||
| full_img = cv.imread(name) |
Contributor
Author
There was a problem hiding this comment.
You're right, sorry I updated the file
My mistake, it works also with images not being in a samples folder
alalek
approved these changes
Mar 24, 2021
Merged
a-sajjad72
pushed a commit
to a-sajjad72/opencv
that referenced
this pull request
Mar 30, 2023
* Error Message for SURF if not implemented In OpenCV 4.5.1 import cv2 as cv cv.xfeatures2d_SURF.create will not create an AttributeError, even if the function is excluded (no nonfree option) In Line 305 (now 306) however ´finder = FEATURES_FIND_CHOICES[args.features]()´ will raise an error: OpenCV(4.5.1) ..\opencv_contrib\modules\xfeatures2d\src\surf.cpp:1029: 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::SURF::create' So we should check with cv.xfeatures2d_SURF.create() correctly if SURF is available
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #19761
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
This is a Pull Request for the Issue 19761
In OpenCV 4.5.1
will not create an AttributeError, even if the function is excluded (no nonfree option)
In Line 305 (now 306) however, if
surfis passed to the parameterfeaturesfinder = FEATURES_FIND_CHOICES[args.features]()aka
cv.xfeatures2d_SURF.create()will raise an
error: OpenCV(4.5.1) ..\opencv_contrib\modules\xfeatures2d\src\surf.cpp:1029: 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::SURF::create'So we should check with cv.xfeatures2d_SURF.create() correctly if SURF is available