Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
BIAS::AbsoluteOrientationRANSAC Class Reference

Robust computation of similarity transformation between two 3D point sets using a RANSAC approach. More...

#include <Geometry/AbsoluteOrientationRANSAC.hh>

Public Member Functions

 AbsoluteOrientationRANSAC ()
 
int Compute (const std::vector< Vector3< double > > &X, const std::vector< Vector3< double > > &Y, RMatrix &dR, Vector3< double > &dt, double &ds, std::vector< bool > &inliers, std::vector< double > &errors, double &errorSum, const std::vector< double > &w=std::vector< double >(0))
 Computes rotation dR, translation dt and isometric scale ds between coordinate systems from corresponding 3D point sets X and Y using heuristical outlier detection. More...
 
int Compute (const std::vector< Vector3< double > > &X, const std::vector< Vector3< double > > &Y, const std::vector< Matrix3x3< double > > &CovX, const std::vector< Matrix3x3< double > > &CovY, RMatrix &dR, Vector3< double > &dt, double &ds, std::vector< bool > &inliers, std::vector< double > &errors, double &errorSum)
 Computes rotation dR, translation dt and isometric scale ds between coordinate systems from corresponding 3D point sets X and Y with covariances CovX, CovY using statistical outlier detection. More...
 
int Compute (const std::vector< Vector3< double > > &X, const std::vector< Vector3< double > > &Y, RMatrix &dR, Vector3< double > &dt, std::vector< bool > &inliers, std::vector< double > &errors, double &errorSum, const std::vector< double > &w=std::vector< double >(0))
 Computes rotation dR and translation dt between coordinate systems from corresponding 3D point sets X and Y using heuristical outlier detection. More...
 
int Compute (const std::vector< Vector3< double > > &X, const std::vector< Vector3< double > > &Y, const std::vector< Matrix3x3< double > > &CovX, const std::vector< Matrix3x3< double > > &CovY, RMatrix &dR, Vector3< double > &dt, std::vector< bool > &inliers, std::vector< double > &errors, double &errorSum)
 Computes rotation dR and translation dt between coordinate systems from corresponding 3D point sets X and Y with covariances CovX, CovY using statistical outlier detection. More...
 
int ComputeRotation (const std::vector< Vector3< double > > &X, const std::vector< Vector3< double > > &Y, RMatrix &dR, std::vector< bool > &inliers, std::vector< double > &errors, double &errorSum, const std::vector< double > &w=std::vector< double >(0))
 Computes rotation dR between corresponding 3D ray sets X and Y using heuristical outlier detection. More...
 
int ComputeRotation (const std::vector< Vector3< double > > &X, const std::vector< Vector3< double > > &Y, const std::vector< Matrix3x3< double > > &CovX, const std::vector< Matrix3x3< double > > &CovY, RMatrix &dR, std::vector< bool > &inliers, std::vector< double > &errors, double &errorSum, const std::vector< double > &w=std::vector< double >(0))
 Computes rotation dR between corresponding 3D ray sets X and Y with covariances CovX, CovY using statistical outlier detection. More...
 
double GetResidualErrors (std::vector< double > &errors, const std::vector< Vector3< double > > &X, const std::vector< Vector3< double > > &Y, const RMatrix &dR, const Vector3< double > &dt, const double &ds=1.0, const std::vector< bool > &inliers=std::vector< bool >(0), const std::vector< double > &w=std::vector< double >(0))
 Computes residual errors for inliers of 3D point sets X and Y with respect to given rotation dR, translation dt and isometric scale ds. More...
 
double GetResidualErrors (std::vector< double > &errors, const std::vector< Vector3< double > > &X, const std::vector< Vector3< double > > &Y, const std::vector< Matrix3x3< double > > &CovX, const std::vector< Matrix3x3< double > > &CovY, const RMatrix &dR, const Vector3< double > &dt, const double &ds=1.0, const std::vector< bool > &inliers=std::vector< bool >(0))
 Computes residual errors for inliers of 3D point sets X and Y with covariances CovX, CovY with respect to given rotation dR, translation dt and isometric scale ds. More...
 
double GetResidualErrors (std::vector< double > &errors, const std::vector< Vector3< double > > &X, const std::vector< Vector3< double > > &Y, const RMatrix &dR, const std::vector< bool > &inliers=std::vector< bool >(0), const std::vector< double > &w=std::vector< double >(0))
 Computes residual errors for inliers of 3D point sets X and Y with respect to given rotation dR. More...
 
double GetResidualErrors (std::vector< double > &errors, const std::vector< Vector3< double > > &X, const std::vector< Vector3< double > > &Y, const std::vector< Matrix3x3< double > > &CovX, const std::vector< Matrix3x3< double > > &CovY, const RMatrix &dR, const std::vector< bool > &inliers=std::vector< bool >(0))
 Computes residual errors for inliers of 3D point sets X and Y with covariances CovX, CovY with respect to given rotation dR. More...
 
void SetGreedy (bool greedy)
 Use greedy search for good solution? More...
 
void SetMaxError (double error)
 Set max. More...
 
void SetMaxErrorAngle (double angle)
 Set max. More...
 
void SetMinRatio (double ratio)
 Set min. More...
 
void SetNumSamples (unsigned int n)
 Set number of random samples to draw from data. More...
 
void SetRefine (bool refine)
 Refine final solution with all inliers? More...
 
void SetRotationAlgorithm (AbsoluteOrientation::RotationEstimationMethod algorithm)
 Set algorithm used for rotation estimation. More...
 
void SetSignificance (double significance)
 Compute max. More...
 
void SetWeightedTargetFunction (bool use)
 Use residual errors instead of inlier count as target function? More...
 
 ~AbsoluteOrientationRANSAC ()
 

Detailed Description

Robust computation of similarity transformation between two 3D point sets using a RANSAC approach.

See Also
#AbsoluteOrientation
Author
esquivel
Date
12/2008

Definition at line 44 of file AbsoluteOrientationRANSAC.hh.

Constructor & Destructor Documentation

AbsoluteOrientationRANSAC::AbsoluteOrientationRANSAC ( )

Definition at line 17 of file AbsoluteOrientationRANSAC.cpp.

References BIAS::Random::Reset().

AbsoluteOrientationRANSAC::~AbsoluteOrientationRANSAC ( )

Definition at line 28 of file AbsoluteOrientationRANSAC.cpp.

Member Function Documentation

int BIAS::AbsoluteOrientationRANSAC::Compute ( const std::vector< Vector3< double > > &  X,
const std::vector< Vector3< double > > &  Y,
RMatrix dR,
Vector3< double > &  dt,
double &  ds,
std::vector< bool > &  inliers,
std::vector< double > &  errors,
double &  errorSum,
const std::vector< double > &  w = std::vector<double>(0) 
)
inline

Computes rotation dR, translation dt and isometric scale ds between coordinate systems from corresponding 3D point sets X and Y using heuristical outlier detection.

Returns inlier flags and error residuals for each correspondence.

Returns
-1 if computation failed, else 0.

Definition at line 99 of file AbsoluteOrientationRANSAC.hh.

int BIAS::AbsoluteOrientationRANSAC::Compute ( const std::vector< Vector3< double > > &  X,
const std::vector< Vector3< double > > &  Y,
const std::vector< Matrix3x3< double > > &  CovX,
const std::vector< Matrix3x3< double > > &  CovY,
RMatrix dR,
Vector3< double > &  dt,
double &  ds,
std::vector< bool > &  inliers,
std::vector< double > &  errors,
double &  errorSum 
)
inline

Computes rotation dR, translation dt and isometric scale ds between coordinate systems from corresponding 3D point sets X and Y with covariances CovX, CovY using statistical outlier detection.

Returns inlier flags and error residuals for each correspondence.

Returns
-1 if computation failed, else 0.

Definition at line 117 of file AbsoluteOrientationRANSAC.hh.

int BIAS::AbsoluteOrientationRANSAC::Compute ( const std::vector< Vector3< double > > &  X,
const std::vector< Vector3< double > > &  Y,
RMatrix dR,
Vector3< double > &  dt,
std::vector< bool > &  inliers,
std::vector< double > &  errors,
double &  errorSum,
const std::vector< double > &  w = std::vector<double>(0) 
)
inline

Computes rotation dR and translation dt between coordinate systems from corresponding 3D point sets X and Y using heuristical outlier detection.

Returns inlier flags and residual errors for each correspondence.

Returns
-1 if computation failed, else 0.

Definition at line 135 of file AbsoluteOrientationRANSAC.hh.

int BIAS::AbsoluteOrientationRANSAC::Compute ( const std::vector< Vector3< double > > &  X,
const std::vector< Vector3< double > > &  Y,
const std::vector< Matrix3x3< double > > &  CovX,
const std::vector< Matrix3x3< double > > &  CovY,
RMatrix dR,
Vector3< double > &  dt,
std::vector< bool > &  inliers,
std::vector< double > &  errors,
double &  errorSum 
)
inline

Computes rotation dR and translation dt between coordinate systems from corresponding 3D point sets X and Y with covariances CovX, CovY using statistical outlier detection.

Returns inlier flags and residual errors for each correspondence.

Returns
-1 if computation failed, else 0.

Definition at line 154 of file AbsoluteOrientationRANSAC.hh.

int BIAS::AbsoluteOrientationRANSAC::ComputeRotation ( const std::vector< Vector3< double > > &  X,
const std::vector< Vector3< double > > &  Y,
RMatrix dR,
std::vector< bool > &  inliers,
std::vector< double > &  errors,
double &  errorSum,
const std::vector< double > &  w = std::vector<double>(0) 
)
inline

Computes rotation dR between corresponding 3D ray sets X and Y using heuristical outlier detection.

Returns inlier flags and error residuals for each correspondence.

Returns
-1 if computation failed, else 0.

Definition at line 172 of file AbsoluteOrientationRANSAC.hh.

int BIAS::AbsoluteOrientationRANSAC::ComputeRotation ( const std::vector< Vector3< double > > &  X,
const std::vector< Vector3< double > > &  Y,
const std::vector< Matrix3x3< double > > &  CovX,
const std::vector< Matrix3x3< double > > &  CovY,
RMatrix dR,
std::vector< bool > &  inliers,
std::vector< double > &  errors,
double &  errorSum,
const std::vector< double > &  w = std::vector<double>(0) 
)
inline

Computes rotation dR between corresponding 3D ray sets X and Y with covariances CovX, CovY using statistical outlier detection.

Returns inlier flags and error residuals for each correspondence.

Returns
-1 if computation failed, else 0.

Definition at line 188 of file AbsoluteOrientationRANSAC.hh.

double AbsoluteOrientationRANSAC::GetResidualErrors ( std::vector< double > &  errors,
const std::vector< Vector3< double > > &  X,
const std::vector< Vector3< double > > &  Y,
const RMatrix dR,
const Vector3< double > &  dt,
const double &  ds = 1.0,
const std::vector< bool > &  inliers = std::vector<bool>(0),
const std::vector< double > &  w = std::vector<double>(0) 
)

Computes residual errors for inliers of 3D point sets X and Y with respect to given rotation dR, translation dt and isometric scale ds.

Note
Each error is given by (weighted) Euclidean distance dist(X',Y) with X' = ds*dR*X - dt for corresponding 3D points X and Y.
Returns
Sum of squared errors dist(X',Y) with X' = ds*dR*X - dt as well as residual error for each single correspondence.

Definition at line 333 of file AbsoluteOrientationRANSAC.cpp.

References BIAS::AbsoluteOrientation::GetResidualErrors().

double AbsoluteOrientationRANSAC::GetResidualErrors ( std::vector< double > &  errors,
const std::vector< Vector3< double > > &  X,
const std::vector< Vector3< double > > &  Y,
const std::vector< Matrix3x3< double > > &  CovX,
const std::vector< Matrix3x3< double > > &  CovY,
const RMatrix dR,
const Vector3< double > &  dt,
const double &  ds = 1.0,
const std::vector< bool > &  inliers = std::vector<bool>(0) 
)

Computes residual errors for inliers of 3D point sets X and Y with covariances CovX, CovY with respect to given rotation dR, translation dt and isometric scale ds.

Note
Computes Mahalanobis distances instead of Euclidean distances!
Returns
Sum of squared errors mahalanobis(X',Y) with X' = ds*dR*X - dt as well as residual error for each single correspondence.

Definition at line 366 of file AbsoluteOrientationRANSAC.cpp.

References BIAS::AbsoluteOrientation::GetResidualErrors().

double AbsoluteOrientationRANSAC::GetResidualErrors ( std::vector< double > &  errors,
const std::vector< Vector3< double > > &  X,
const std::vector< Vector3< double > > &  Y,
const RMatrix dR,
const std::vector< bool > &  inliers = std::vector<bool>(0),
const std::vector< double > &  w = std::vector<double>(0) 
)

Computes residual errors for inliers of 3D point sets X and Y with respect to given rotation dR.

Note
Each error is given by (weighted) Euclidean distance dist(X',Y) with X' = dR*X for corresponding 3D points X and Y.
Returns
Sum of squared errors dist(X',Y) with X' = dR*X as well as residual error for each single correspondence.

Definition at line 397 of file AbsoluteOrientationRANSAC.cpp.

References BIAS::AbsoluteOrientation::GetResidualErrors().

double AbsoluteOrientationRANSAC::GetResidualErrors ( std::vector< double > &  errors,
const std::vector< Vector3< double > > &  X,
const std::vector< Vector3< double > > &  Y,
const std::vector< Matrix3x3< double > > &  CovX,
const std::vector< Matrix3x3< double > > &  CovY,
const RMatrix dR,
const std::vector< bool > &  inliers = std::vector<bool>(0) 
)

Computes residual errors for inliers of 3D point sets X and Y with covariances CovX, CovY with respect to given rotation dR.

Note
Computes Mahalanobis distances instead of Euclidean distances!
Returns
Sum of squared errors mahalanobis(X',Y) with X' = dR*X as well as residual error for each single correspondence.

Definition at line 429 of file AbsoluteOrientationRANSAC.cpp.

References BIAS::AbsoluteOrientation::GetResidualErrors().

void BIAS::AbsoluteOrientationRANSAC::SetGreedy ( bool  greedy)
inline

Use greedy search for good solution?

Definition at line 80 of file AbsoluteOrientationRANSAC.hh.

void BIAS::AbsoluteOrientationRANSAC::SetMaxError ( double  error)
inline

Set max.

error for heuristical outlier detection.

Note
Note that max. squared (and weighted) error is set here!

Definition at line 64 of file AbsoluteOrientationRANSAC.hh.

void BIAS::AbsoluteOrientationRANSAC::SetMaxErrorAngle ( double  angle)
inline

Set max.

error angle for heuristical outlier detection for pure absolute rotation estimation.

Parameters
Max.angle between input ray and estimated ray in radians.
Note
Use only previous to ComputeRotation() without weights!

Definition at line 70 of file AbsoluteOrientationRANSAC.hh.

void BIAS::AbsoluteOrientationRANSAC::SetMinRatio ( double  ratio)
inline

Set min.

inlier ratio for termination.

Definition at line 74 of file AbsoluteOrientationRANSAC.hh.

void BIAS::AbsoluteOrientationRANSAC::SetNumSamples ( unsigned int  n)
inline

Set number of random samples to draw from data.

Definition at line 77 of file AbsoluteOrientationRANSAC.hh.

void BIAS::AbsoluteOrientationRANSAC::SetRefine ( bool  refine)
inline

Refine final solution with all inliers?

Definition at line 83 of file AbsoluteOrientationRANSAC.hh.

void BIAS::AbsoluteOrientationRANSAC::SetRotationAlgorithm ( AbsoluteOrientation::RotationEstimationMethod  algorithm)
inline

Set algorithm used for rotation estimation.

Definition at line 90 of file AbsoluteOrientationRANSAC.hh.

void AbsoluteOrientationRANSAC::SetSignificance ( double  significance)

Compute max.

error for statistical outlier detection from given significance level.

Note
Significance defines the probability that an inlier is regarded as an outlier ("type I error"). This should typically be a very small value (below 0.05 resp. 5%). The max. error is computes by integrating the chi square distribution.

Definition at line 33 of file AbsoluteOrientationRANSAC.cpp.

References BIAS::InvChiSquareCulmProbFun().

void BIAS::AbsoluteOrientationRANSAC::SetWeightedTargetFunction ( bool  use)
inline

Use residual errors instead of inlier count as target function?

Definition at line 86 of file AbsoluteOrientationRANSAC.hh.


The documentation for this class was generated from the following files: