iCub-main
|
A class that deals with the problem of determining the affine transformation matrix A between two sets of matching 3D points employing IpOpt. More...
#include <affinity.h>
Public Member Functions | |
AffinityWithMatchedPoints () | |
Default Constructor. More... | |
virtual void | setBounds (const yarp::sig::Matrix &min, const yarp::sig::Matrix &max) |
Allow specifying the minimum and maximum bounds of the elements belonging to the affine transformation. More... | |
virtual bool | addPoints (const yarp::sig::Vector &p0, const yarp::sig::Vector &p1) |
Add to the internal database the 3D-point p0 and the 3D-point p1 which is supposed to correspond to A*p0, whose matrix A has to be found. More... | |
virtual size_t | getNumPoints () const |
Return the number of 3D-points pairs currently contained into the internal database. More... | |
virtual void | getPoints (std::deque< yarp::sig::Vector > &p0, std::deque< yarp::sig::Vector > &p1) const |
Retrieve copies of the database of 3D-points pairs. More... | |
virtual void | clearPoints () |
Clear the internal database of 3D points. More... | |
virtual bool | setInitialGuess (const yarp::sig::Matrix &A) |
Allow specifiying the initial guess for the affine transformation matrix we seek for. More... | |
virtual bool | setCalibrationOptions (const yarp::os::Property &options) |
Allow setting further options used during calibration. More... | |
virtual bool | calibrate (yarp::sig::Matrix &A, double &error) |
Perform optimization to determine the affine matrix A. More... | |
virtual | ~AffinityWithMatchedPoints () |
Destructor. More... | |
Public Member Functions inherited from iCub::optimization::MatrixTransformationWithMatchedPoints | |
virtual | ~MatrixTransformationWithMatchedPoints () |
Destructor. More... | |
Protected Member Functions | |
double | evalError (const yarp::sig::Matrix &A) |
Protected Attributes | |
yarp::sig::Matrix | min |
yarp::sig::Matrix | max |
yarp::sig::Matrix | A0 |
int | max_iter |
double | tol |
std::deque< yarp::sig::Vector > | p0 |
std::deque< yarp::sig::Vector > | p1 |
A class that deals with the problem of determining the affine transformation matrix A between two sets of matching 3D points employing IpOpt.
Definition at line 50 of file affinity.h.
AffinityWithMatchedPoints::AffinityWithMatchedPoints | ( | ) |
Default Constructor.
Definition at line 229 of file affinity.cpp.
|
inlinevirtual |
Destructor.
Definition at line 141 of file affinity.h.
|
virtual |
Add to the internal database the 3D-point p0 and the 3D-point p1 which is supposed to correspond to A*p0, whose matrix A has to be found.
p0 | the free 3D-point. |
p1 | the 3D-point which corresponds to A*p0. |
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 281 of file affinity.cpp.
|
virtual |
Perform optimization to determine the affine matrix A.
A | the final affine matrix that links the two clouds of 3D points. |
error | returns the residual error computed as norm(p1[i]-A*p0[i]) over the whole set of points pairs. |
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 341 of file affinity.cpp.
|
virtual |
Clear the internal database of 3D points.
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 309 of file affinity.cpp.
|
protected |
Definition at line 265 of file affinity.cpp.
|
inlinevirtual |
Return the number of 3D-points pairs currently contained into the internal database.
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 95 of file affinity.h.
|
virtual |
Retrieve copies of the database of 3D-points pairs.
p0 | the list of free 3D-points. |
p1 | the list of 3D-points which correspond to A*p0. |
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 300 of file affinity.cpp.
|
virtual |
Allow specifying the minimum and maximum bounds of the elements belonging to the affine transformation.
min | the 4x4 Matrix containining the minimum bounds. |
max | the 4x4 Matrix containining the maximum bounds. |
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 249 of file affinity.cpp.
|
virtual |
Allow setting further options used during calibration.
options | a Property-like object accounting for calibration options. |
Reimplemented from iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 328 of file affinity.cpp.
|
virtual |
Allow specifiying the initial guess for the affine transformation matrix we seek for.
A | the 4x4 homogeneous matrix used as initial guess. |
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 317 of file affinity.cpp.
|
protected |
Definition at line 54 of file affinity.h.
|
protected |
Definition at line 53 of file affinity.h.
|
protected |
Definition at line 56 of file affinity.h.
|
protected |
Definition at line 53 of file affinity.h.
|
protected |
Definition at line 59 of file affinity.h.
|
protected |
Definition at line 60 of file affinity.h.
|
protected |
Definition at line 57 of file affinity.h.