MRPT logo

mrpt::poses::CPointPDFGaussian Class Reference

A gaussian distribution for 3D points. More...

#include <mrpt/poses/CPointPDFGaussian.h>

Inheritance diagram for mrpt::poses::CPointPDFGaussian:

mrpt::poses::CPointPDF mrpt::utils::CSerializable

List of all members.

Public Member Functions

 CPointPDFGaussian ()
 Default constructor.
 CPointPDFGaussian (const CPoint3D &init_Mean)
 Constructor.
 CPointPDFGaussian (const CPoint3D &init_Mean, const CMatrix &init_Cov)
 Constructor.
CPoint3D getEstimatedPoint () const
 Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
CMatrixD getEstimatedCovariance () const
 Returns an estimate of the pose covariance matrix (3x3 cov.matrix for x,y,phi variables).
void copyFrom (const CPointPDF &o)
 Copy operator, translating if necesary (for example, between particles and gaussian representations).
void saveToTextFile (const std::string &file) const
 Save PDF's particles to a text file, containing the 2D pose in the first line, then the covariance matrix in next 3 lines.
void changeCoordinatesReference (const CPose3D &newReferenceBase)
 This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf.
void bayesianFusion (CPointPDFGaussian &p1, CPointPDFGaussian &p2)
 Bayesian fusion of two points gauss.
double productIntegralWith (CPointPDFGaussian &p)
 Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF.
double productIntegralNormalizedWith (CPointPDFGaussian *p)
 Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF.
double productIntegralNormalizedWith2D (CPointPDFGaussian *p)
 Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF.
void drawSingleSample (CPoint3D &outSample) const
 Draw a sample from the pdf.
void bayesianFusion (CPointPDF &p1, CPointPDF &p2, const double &minMahalanobisDistToDrop=0)
 Bayesian fusion of two point distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!).

Public Attributes

CPoint3D mean
 The mean value.
CMatrixD cov
 The 3x3 covariance matrix.


Detailed Description

A gaussian distribution for 3D points.

Also a method for bayesian fusion is provided.

See also:
CPointPDF

Definition at line 44 of file CPointPDFGaussian.h.


Constructor & Destructor Documentation

mrpt::poses::CPointPDFGaussian::CPointPDFGaussian (  ) 

Default constructor.

mrpt::poses::CPointPDFGaussian::CPointPDFGaussian ( const CPoint3D init_Mean  ) 

Constructor.

mrpt::poses::CPointPDFGaussian::CPointPDFGaussian ( const CPoint3D init_Mean,
const CMatrix init_Cov 
)

Constructor.


Member Function Documentation

void mrpt::poses::CPointPDFGaussian::bayesianFusion ( CPointPDF p1,
CPointPDF p2,
const double &  minMahalanobisDistToDrop = 0 
) [virtual]

Bayesian fusion of two point distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!).

Parameters:
p1 The first distribution to fuse
p2 The second distribution to fuse
minMahalanobisDistToDrop If set to different of 0, the result of very separate Gaussian modes (that will result in negligible components) in SOGs will be dropped to reduce the number of modes in the output.

Implements mrpt::poses::CPointPDF.

void mrpt::poses::CPointPDFGaussian::bayesianFusion ( CPointPDFGaussian p1,
CPointPDFGaussian p2 
)

Bayesian fusion of two points gauss.

distributions, then save the result in this object. The process is as follows:

  • (x1,S1): Mean and variance of the p1 distribution.
  • (x2,S2): Mean and variance of the p2 distribution.
  • (x,S): Mean and variance of the resulting distribution.

S = (S1-1 + S2-1)-1; x = S * ( S1-1*x1 + S2-1*x2 );

void mrpt::poses::CPointPDFGaussian::changeCoordinatesReference ( const CPose3D newReferenceBase  )  [virtual]

This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf.

Result PDF substituted the currently stored one in the object. Both the mean value and the covariance matrix are updated correctly.

Implements mrpt::poses::CPointPDF.

void mrpt::poses::CPointPDFGaussian::copyFrom ( const CPointPDF o  )  [virtual]

Copy operator, translating if necesary (for example, between particles and gaussian representations).

Implements mrpt::poses::CPointPDF.

void mrpt::poses::CPointPDFGaussian::drawSingleSample ( CPoint3D outSample  )  const [virtual]

Draw a sample from the pdf.

Implements mrpt::poses::CPointPDF.

CMatrixD mrpt::poses::CPointPDFGaussian::getEstimatedCovariance (  )  const [virtual]

Returns an estimate of the pose covariance matrix (3x3 cov.matrix for x,y,phi variables).

Implements mrpt::poses::CPointPDF.

CPoint3D mrpt::poses::CPointPDFGaussian::getEstimatedPoint (  )  const [virtual]

Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).

Implements mrpt::poses::CPointPDF.

double mrpt::poses::CPointPDFGaussian::productIntegralNormalizedWith ( CPointPDFGaussian p  ) 

Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF.

The resulting number is in the range [0,1]

See also:
productIntegralWith
Exceptions:
std::exception On errors like covariance matrix with null determinant, etc...

double mrpt::poses::CPointPDFGaussian::productIntegralNormalizedWith2D ( CPointPDFGaussian p  ) 

Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF.

The resulting number is in the range [0,1]. NOTE: This version ignores the "z" coordinates!!

See also:
productIntegralWith
Exceptions:
std::exception On errors like covariance matrix with null determinant, etc...

double mrpt::poses::CPointPDFGaussian::productIntegralWith ( CPointPDFGaussian p  ) 

Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF.

The resulting number is >=0.

See also:
productIntegralNormalizedWith
Exceptions:
std::exception On errors like covariance matrix with null determinant, etc...

void mrpt::poses::CPointPDFGaussian::saveToTextFile ( const std::string &  file  )  const [virtual]

Save PDF's particles to a text file, containing the 2D pose in the first line, then the covariance matrix in next 3 lines.

Implements mrpt::poses::CPointPDF.


Member Data Documentation

The 3x3 covariance matrix.

Definition at line 68 of file CPointPDFGaussian.h.

The mean value.

Definition at line 64 of file CPointPDFGaussian.h.




Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:14:51 EST 2009