I am using surf features detector on an image.i applied the correct procedure as matlab described but get following error
Error using imageDisplayValidateParams
Expected input number 1, I, to be one of these types:
numeric, logical
Instead its type was SURFPoints.
Error in imageDisplayValidateParams (line 12)
validateattributes(common_args.CData, {'numeric','logical'},...
Error in imageDisplayParseInputs (line 79)
common_args = imageDisplayValidateParams(common_args);
Error in imshow (line 220)
[common_args,specific_args] = ...
Error in Untitled (line 24)
imshow( I);
my code :
I=imread('Image21.jpg');
I=rgb2gray(uint8(I));
I=detectSURFFeatures(I);
imshow( I);

답변 (1개)

Geoff Hayes
Geoff Hayes 2015년 1월 25일

2 개 추천

Hassan - your I, after the call to detectSURFFeatures(I), is no longer an image but a SURFPoints object (see detectSURFeatures output for details) and so the error message makes sense (since this is an incompatible input to the imshow function). Instead, what you could try (based on the example in the given link) is something like
I=imread('Image21.jpg');
I=rgb2gray(uint8(I));
points=detectSURFFeatures(I);
imshow(I);
plot(points.selectStrongest(10));

태그

아직 태그를 입력하지 않았습니다.

질문:

2015년 1월 25일

답변:

2015년 1월 25일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by