Line | |
---|
1 | % By Philip Torr 2002
|
---|
2 | % copyright Microsoft Corp.
|
---|
3 | % %
|
---|
4 | % % HISTORY
|
---|
5 | % 2001 Philip Torr (philtorr@microsoft.com, phst@robots.ac.uk) at Microsoft
|
---|
6 | % Created.
|
---|
7 | %
|
---|
8 | % Copyright © Microsoft Corp. 2002
|
---|
9 | %
|
---|
10 | %
|
---|
11 | % Returns a W x W matrix with a unit amplitude Gaussian function of
|
---|
12 | % standard deviation SIGMA. The Gaussian is centered within the matrix.
|
---|
13 | %
|
---|
14 | function gmask = gauss_mask(w, sigma)
|
---|
15 |
|
---|
16 | ww = 2*w + 1;
|
---|
17 |
|
---|
18 | [x,y] = meshgrid(-w:w, -w:w);
|
---|
19 |
|
---|
20 | gmask = 1/(2*pi) * exp( -(x.^2 + y.^2)/2/sigma^2);
|
---|
21 |
|
---|
22 | gmask = gmask / sum(sum(gmask));
|
---|
Note: See
TracBrowser
for help on using the repository browser.