Closed fybaft2012 closed 5 years ago
You forgot to imread
the image, rather than passing the path as a string you must use the actual image.
im = imread('image.png');
...
Sorry, I wrote the wrong code in the issues, but I did use imread in my original code. Actually, my original code is as following:
im = imread('image.png');
detector = cv.FeatureDetector('ORB'); % 1
keypoints2 = detector.detect(im); % 2
extractor = cv.DescriptorExtractor('ORB'); % 3
descriptors2 = extractor.compute(im, keypoints2); % 4
out = cv.drawKeypoints(im, keypoints2); % 5
So could you help me out this error?
Hi, @amroamroamro , I just found the problem is the 'im' format problem, my original code saved im as cell structure, therefore the OpenCV cannot recognize it. Now, I modified the im format, now it works! You give me a hint about im format. Thank you very much amroamroamro, I think I will close this issue.
Hi @amroamroamro,
My code is like this:
It worked fine line1-line4, when I call
cv.drawKeypoints
, it throw the error:I don't know what is the problem, could you help me to figure it out? Thanks!