# filterGauss

## PURPOSE

n-dimensional Gaussian filter.

## SYNOPSIS

function G = filterGauss( dims, mu, C, show )

## DESCRIPTION

     n-dimensional Gaussian filter.

     Creates an image of a Gaussian with arbitrary covariance matrix. The
     dimensionality and size of the filter is determined by dims (eg dims=[10
     10] creates a 2D filter of size 10x10). If mu==[], it is calculated to be
     the center of the n-dim image.  C can be a full nxn covariance matrix, or
     an nx1 vector of variance.  In the latter case C is calculated as
     C=diag(C). If C=[]; then C=(dims/6).^2, ie it is transformed into a
     vector of variances such that along each dimension the variance is equal
     to (siz/6)^2.

     USAGE
      G = filterGauss( dims, [mu], [C], [show] )

     INPUTS
      dims    - n element vector of dimensions of final Gaussian
      mu      - [] n element vector specifying the mean
      C       - [] nxn cov matrix, nx1 set of vars, or variance
      show    - [0] figure to use for optional display

     OUTPUTS
      G       - image of the created Gaussian

     EXAMPLE
      g = filterGauss( 21, [], 4, 1); %1D
      sig=3; G = filterGauss( 4*[sig sig] + 1, [], [sig sig].^2, 2 ); %2D
      R = rotationMatrix( [1,1,0], pi/4 );
      C = R'*[10^2 0 0; 0 5^2 0; 0 0 16^2]*R;
      G3 = filterGauss( [51,51,51], [], C, 3 ); %3D

     See also NORMPDF2

     Piotr's Image&Video Toolbox      Version 2.0
     Copyright 2012 Piotr Dollar.  [pdollar-at-caltech.edu]
     Please email me if you find bugs, or have suggestions or questions!
     Licensed under the Simplified BSD License [see external/bsd.txt]