Matlab detectSURFFeatures()错误:"预期的输入数字1,I,是二维的."

Dou*_*ull 1 matlab computer-vision matlab-cvst

我正在关注Matlab>帮助指南"使用点特征匹配在杂乱场景中进行对象检测"和detectSURFFeatures()获取错误,因为它需要一个二维输入参数..png也不起作用.

boxImage = imread('C:\ WORK\images for feature matching\iPhone6p_back_clean.JPG');

boxPoints = detectSURFFeatures(boxImage);

使用detectSURFFeatures时出错预期输入数1,I为二维.

detectSURFFeatures> checkImage(第124行)validateattributes(I,{'logical','uint8','int16','uint16',...

detectSURFFeatures出错(第81行)checkImage(I);

Dou*_*ull 5

这是修复:

boxPoints = detectSURFFeatures( rgb2gray( boxImage ));
Run Code Online (Sandbox Code Playgroud)