-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Feature2D.compute() error #23263
Copy link
Copy link
Closed
Description
System Information
OpenCV python version: 4.7.0-83
Operating System / Platform: Ubuntu 20.04.5 LTS
Python version: 3.8.10
Detailed description
When I attempt to call the compute method of a class derived from Feature2D, I receive an error:
> Overload resolution failed:
> - descriptors data type = 17 is not supported
> - Expected Ptr<cv::UMat> for argument 'descriptors'
> - Can't parse 'descriptors'. Sequence item with index 0 has a wrong type
> - Can't parse 'descriptors'. Sequence item with index 0 has a wrong type```
### Steps to reproduce
import cv2 as cv
import numpy as np
img = np.random.randn(1024,128).astype(np.uint8)
keypoints=[]
keypoints.append(cv.KeyPoint(x=100,y=100,size=1.0))
keypoints.append(cv.KeyPoint(x=500,y=50,size=1.0))
sift = cv.SIFT_create()
keypoints, descriptors = sift.compute(img, keypoints)
### Issue submission checklist
- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable