# gauss2ellipse

## PURPOSE

Creates an ellipse representing the 2D Gaussian distribution.

## SYNOPSIS

function [cRow, cCol, ra, rb, phi] = gauss2ellipse( mu, C, rad )

## DESCRIPTION

     Creates an ellipse representing the 2D Gaussian distribution.

     Creates an ellipse representing the 2D Gaussian distribution with mean mu
     and covariance matrix C.  Returns 5 parameters that specify the ellipse.

     USAGE
      [cRow, cCol, ra, rb, phi] = gauss2ellipse( mu, C, [rad] )

     INPUTS
      mu      - 1x2 vector representing the center of the ellipse
      C       - 2x2 cov matrix
      rad     - [2] Number of std to create the ellipse to

     OUTPUTS
      cRow    - the row location of the center of the ellipse
      cCol    - the column location of the center of the ellipse
      ra      - semi-major axis length (in pixels) of the ellipse
      rb      - semi-minor axis length (in pixels) of the ellipse
      phi     - rotation angle (radians) of semimajor axis from x-axis

     EXAMPLE
      [cRow, cCol, ra, rb, phi] = gauss2ellipse( [5 5], [1 0; .5 2] )
      plotEllipse( cRow, cCol, ra, rb, phi );

     See also PLOTELLIPSE, PLOTGAUSSELLIPSES, MASKELLIPSE

     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:

This function is called by:

- maskEllipse Creates a binary image of an ellipse.
- plotGaussEllipses Plots 2D ellipses derived from 2D Gaussians specified by mus & Cs.