From: dai zhengguo on 4 Apr 2010 03:26 My problem is why I can not get the same result since it is well known that the Gaussian filter is separable. The following is to convolve along rows and then columns. width = 4 ; ssq = 1 ; t = (-width:width); gau = exp(-(t.*t)/(2*ssq))/(2*pi*ssq); % the gaussian 1D filter aSmooth=imfilter(a,gau,'conv','replicate'); % run the filter across rows aSmooth1=imfilter(aSmooth,gau','conv','replicate'); % and then across columns And we construct a 2D gaussian Filter: G2D = fspecial('gaussian',9,1) ; aSmooth2= imfilter(a,Gaussianfilter,'conv','replicate'); But the result of aSmooth2 is not the same as aSmooth1, can anybody tell me why ? Thanks a lot.
|
Pages: 1 Prev: how to set folder for compression Next: Need matlabcode for EBCOT and WDR |