Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Error with sift.detectAndCompute() in OpenCV 4.5.1 #1

Open
kgdthomas opened this issue Jan 12, 2021 · 0 comments
Open

Error with sift.detectAndCompute() in OpenCV 4.5.1 #1

kgdthomas opened this issue Jan 12, 2021 · 0 comments

Comments

@kgdthomas
Copy link

Can this be run on OpenCV 4.5.1? I'm having an error pointing back at
#detect sift features for both images
sift = cv2.SIFT_create()

kp1, des1 = sift.detectAndCompute(img1 , None)
kp2, des2 = sift.detectAndCompute(img2 , None)

This area of the code.

The error is as follows:

Traceback (most recent call last):
File "C:\Users\Kent-ROG\PycharmProjects\pythonProject\venv\lib\site-packages\IPython\core\interactiveshell.py", line 3418, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 33, in
kp1, des1 = sift.detectAndCompute(img1 , None)
cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-i1s8y2i1\opencv\modules\features2d\src\sift.dispatch.cpp:477: error: (-5:Bad argument) image is empty or has incorrect depth (!=CV_8U) in function 'cv::SIFT_Impl::detectAndCompute'

I hope you can assist me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant