Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
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

Respuestas (1)

Rik
Rik el 18 de En. de 2018
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).

Categorías

Más información sobre 3-D Volumetric Image Processing en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by