快乐abcde 发表于 2006-4-11 16:45

急!看不明白这一程序

% Function "d2gauss.m":<BR>% This function returns a 2D Gaussian filter with size n1*n2; theta is <BR>% the angle that the filter rotated counter clockwise; and sigma1 and sigma2<BR>% are the standard deviation of the Gaussian functions.<BR>function h = d2gauss(n1,std1,n2,std2,theta)<BR>r=;<BR>for i = 1 : n2 <BR>    for j = 1 : n1<BR>      u = r * ';<BR>      h(i,j) = gauss(u(1),std1)*gauss(u(2),std2);<BR>    end<BR>end<BR>h = h / sqrt(sum(sum(h.*h)));<BR><BR>% Function "gauss.m":<BR>function y = gauss(x,std)<BR>y = exp(-x^2/(2*std^2)) / (std*sqrt(2*pi));<BR>

happy 发表于 2006-4-11 21:48

回复:(快乐abcde)急!看不明白这一程序

<P>请具体说明什么地方看不明白</P>
页: [1]
查看完整版本: 急!看不明白这一程序