查看单个帖子
旧 2010-03-02, 00:00   #1
Juicy
初级会员
 
注册日期: 2008-10-08
帖子: 24
声望力: 17
Juicy 正向着好的方向发展
微笑 为什么用conv2的时候提示出错?

??? Undefined function or method 'conv2' for input arguments of type 'double' and attributes 'full 3d real'.


程序如下:

img = double((imread('Sample.jpg')));

x = [floor(-3.0*sigma+0.5):floor(3.0*sigma+0.5)];
G = exp(-x.^2/(2*sigma^2));
G = G/sum(sum(G));
D = -2*(x.*exp(-x.^2/(2*sigma^2)))/(sqrt(2*pi)*sigma^3);

img1 = conv2(img,D,'same');
__________________
:ft:
Juicy 当前离线   回复时引用此帖