【问题标题】:Matlab detectSURFFeatures() error: "Expected input number 1, I, to be two-dimensional."Matlab detectSURFFeatures() 错误:“预期输入数字 1,I,是二维的。”
【发布时间】:2015-10-19 14:13:48
【问题描述】:

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

boxImage = imread('C:\WORK\用于特征匹配的图像\iPhone6p_back_clean.JPG');

boxPoints = detectSURFFeatures(boxImage);

使用 detectSURFFeatures 时出错 预期输入数字 1 I 是二维的。

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

detectSURFFeatures 中的错误(第 81 行) checkImage(I);

【问题讨论】:

    标签: matlab computer-vision matlab-cvst


    【解决方案1】:

    解决方法如下:

    boxPoints = detectSURFFeatures( rgb2gray( boxImage ));
    

    【讨论】:

    • 你能解释一下为什么会这样吗?
    • @AsimRazaKhan, detectSURFFeatures 仅适用于灰度图像。它不使用任何颜色信息,因此允许该函数获取 RGB 图像会产生误导。
    猜你喜欢
    • 1970-01-01
    • 2019-03-28
    • 2016-06-23
    • 2020-10-13
    • 2022-01-22
    • 2018-01-15
    • 2016-06-01
    • 2020-01-23
    • 2020-05-11
    相关资源
    最近更新 更多