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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169093/image.png)
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
0 件のコメント
回答 (1 件)
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).
0 件のコメント
参考
カテゴリ
Help Center および File 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!