Please answer about this error
显示 更早的评论
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
2015-1-25
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));
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!