source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/torr/torr_gauss_mask.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 539 bytes
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%
14function 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.