latest version v1.9 - last update 10 Apr 2010 |
An internal class of lti::blobEM for handling 2D gaussian ellipses. More...
#include <ltiBlobEM.h>
Public Member Functions | |
bool | from2x2Covariance (const lti::matrix< double > &cov, const bool &constraints=true) |
bool | fromEllipse (const gaussEllipse &other, const bool &constraints=true) |
bool | to2x2Covariance (lti::matrix< double > &cov) const |
Public Attributes | |
Ellipse properties | |
lti::tpoint< double > | center |
double | lambda1 |
double | lambda2 |
double | angle |
Ellipse constraints | |
bool | constrainCenter |
bool | constrainShape |
bool | constrainArea |
bool | constrainAngle |
Constraint tolerances | |
double | centerTolerance |
double | shapeTolerance |
double | areaTolerance |
double | angleTolerance |
An internal class of lti::blobEM for handling 2D gaussian ellipses.
The properties can be set manually.
Another possibility is to obtain the properties from a 2x2 covariance matrix (except center) or another ellipse, either considering constraints or not.
bool lti::blobEM::gaussEllipse::from2x2Covariance | ( | const lti::matrix< double > & | cov, | |
const bool & | constraints = true | |||
) |
Get Ellipse properties lambda and angle from a 2x2 covariance matrix considering shape, size, and/or angle constraints, if desired.
Note: center can NOT be obtained from covariance.
Returns false, if not possible
bool lti::blobEM::gaussEllipse::fromEllipse | ( | const gaussEllipse & | other, | |
const bool & | constraints = true | |||
) |
Get all ellipse properties (center, lambda, angle) from another ellipse considering center, shape, size, and/or angle constraints, if desired.
THIS IS NOT A COPY METHOD!!!
Returns false, if not possible.
bool lti::blobEM::gaussEllipse::to2x2Covariance | ( | lti::matrix< double > & | cov | ) | const |
Generate 2x2 covariance matrix with ellipse params lambda and angle.
Returns false, if not possible
Angle of main axis (-Pi/2 to +Pi/2).
Second axis is perpendicular to main axis.
The (+/-) angle tolerance (default = 0).
Reasonable range is from 0 to Pi/2, since this is Pi/2 cyclic.
The relative size tolerance (default = 0), which means Ellipse area may change in range.
with
Center of ellipse.
The center tolerance as maximum Euclidean distance in pixel.
(default = 0)
keep orientation angle within angleTolerance (default = false)
keep area size (lambda1*lambda2) within areaTolerance (default = false)
keep center within centerTolerance (default = false)
keep shape (lambda1/lambda2) within shapeTolerance (default = false)
Variance along main axis (eigenvalue 1).
Ensure lambda1 to be > lambda2 for plausibility.
Note: This is not the standard deviation! For visualization of an ellipse use std dev.
Variance along second axis (eigenvalue 2).
Note: This is not the standard deviation! For visualization of an ellipse use std dev.
The relative shape tolerance (default = 0).
NOT CONSIDERED YET!!! Development in Progress!