# filterBinomial1d

## PURPOSE

1D binomial filter (approximation to Gaussian filter)

## SYNOPSIS

function f = filterBinomial1d( r, show )

## DESCRIPTION

     1D binomial filter (approximation to Gaussian filter)

     Creates a binomial filter of size 2*r+1 x 1.  This can be used to
     approximate the Gaussian distribution with sigma=sqrt((2*r+1)/4). For
     large r, should give same output as:
      g = fspecial( 'Gaussian', [2*r+1,1],sqrt((2*r+1)/4) );
     Given sigma, use r ~= 2*sigma^2.

     Use F = f*f' to get the equivalent 2d filter.

     USAGE
      f = filterBinomial1d( r, [show] )

     INPUTS
      r       - mask will have length 2r+1 and var=(2*r+1)/4
      show    - [0] figure to use for optional display

     OUTPUTS
      f       - 1D binomial filter

     EXAMPLE
      r = 10;
      fbinom = filterBinomial1d( r, 1 );
      fgauss = filterGauss( 2*r+1, [], (2*r+1)/4, 2);

     See also FILTERGAUSS

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

## CROSS-REFERENCE INFORMATION

This function calls:

- filterVisualize Used to visualize a 1D/2D/3D filter.

This function is called by:

- FbReconstruct2d Use to see how much image information is preserved in filter outputs.