am getting an error on filter function using this image called _ *sweets.png*_

2 次查看(过去 30 天)
am getting error on using this image called _ sweets.png_ if true % code
J =filter2(fspecial('sobel'),I); end
Error:
Undefined function 'conv2' for input arguments of type 'double' and attributes 'full 3d real'.
Error in filter2 (line 59) y = conv2(hcol, hrow, x, shape);
Error in last (line 15) J=filter2(fspecial('sobel'),I); end

回答(1 个)

Rik
Rik 2018-1-18
In Matlab, a color image is 3D, the third dimension being the color channels. You need to convert it to a grayscale image (e.g. with rgb2gray).

类别

Help CenterFile Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by