help me solve this error detectSURFFeatures
7 次查看(过去 30 天)
显示 更早的评论
i am having following sample code: I = imread('box.jpg'); points = detectSURFFeatures(I);
imshow(I); hold on;
plot(points.selectStrongest(10));
i am getting this error:
Error using detectSURFFeatures
Expected input number 1, I, to be two-dimensional.
Error in detectSURFFeatures>parseInputs (line 130) validateattributes(I,{'logical', 'uint8', 'int16', 'uint16', ...
Error in detectSURFFeatures (line 81) [Iu8, params] = parseInputs(I,varargin{:});
Error in Untitled3 (line 2) points = detectSURFFeatures(I); pls help me solve this.
0 个评论
采纳的回答
Dima Lisin
2016-3-12
编辑:Dima Lisin
2016-3-12
detectSURFFeatures only works on grayscale images. Use rgb2gray to convert I to grayscsle.
3 个评论
Dima Lisin
2016-3-13
编辑:Dima Lisin
2016-3-13
It is about the size. The image may look gray, but if its size is MxNx3, it is still RGB, as far as function is concerned.
更多回答(1 个)
Anand
2016-3-12
What does class(I) return? If it does not return one of the following, your image is not of the right type:
'logical', 'uint8', 'int16', 'uint16', 'single', 'double'
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!