Juicy
2010-03-02, 00:00
??? 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');
程序如下:
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');