在代码中,函数bilinear_interpolation的参数列表中缺少heightwidth两个参数。因此,在调用bilinear_interpolation函数时,需要传入这两个参数。

解决方法是,在函数subpixel_edge中调用bilinear_interpolation函数时,将heightwidth作为参数传递给它。修改代码如下:

edgeStrength(y, x) = bilinear_interpolation(subpixelX, subpixelY, edgeImg(y1:y2, x1:x2), height, width);

将此修改应用到代码中的相应位置后,再次运行程序即可解决该错误。

matlab中此段代码的错误提示为:输入参数的数目不足。出错 subpixel_edgebilinear_interpolation 第 45 行 y2 = minheight y2;出错 subpixel_edge 第 30 行 edgeStrengthy x = bilinear_interpolationsubpixelX subpixelY edgeIm

原文地址: http://www.cveoy.top/t/topic/hDeJ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录