iCub-main
|
A class that deals with the problem of determining the roto-translation matrix H and scaling factors S between two sets of matching 3D points employing IpOpt. More...
#include <calibReference.h>
Public Member Functions | |
CalibReferenceWithMatchedPoints () | |
Default Constructor. | |
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 transformation. | |
virtual void | setBounds (const yarp::sig::Vector &min, const yarp::sig::Vector &max) |
Allow specifying the bounding box for both the translation part (given in meters) and the rotation part (given in radians) within which solution is seeked. | |
virtual void | setScalingBounds (const yarp::sig::Vector &min, const yarp::sig::Vector &max) |
Allow specifying the bounds for the 3D scaling factors. | |
virtual void | setScalingBounds (const double min, const double max) |
Allow specifying the bounds for the 3D scaling factors with scalar scaling factor. | |
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 H*p0, whose matrix H has to be found. | |
virtual size_t | getNumPoints () const |
Return the number of 3D-points pairs currently contained into the internal database. | |
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. | |
virtual void | clearPoints () |
Clear the internal database of 3D points. | |
virtual bool | setInitialGuess (const yarp::sig::Matrix &H) |
Allow specifiying the initial guess for the roto-translation matrix we seek for. | |
virtual bool | setScalingInitialGuess (const yarp::sig::Vector &s) |
Allow specifiying the initial guess for the scaling factors. | |
virtual bool | setScalingInitialGuess (const double s) |
Allow specifiying the initial guess for the scalar scaling factor. | |
virtual bool | setCalibrationOptions (const yarp::os::Property &options) |
Allow setting further options used during calibration. | |
virtual bool | calibrate (yarp::sig::Matrix &H, double &error) |
Perform reference calibration to determine the matrix H. | |
virtual bool | calibrate (yarp::sig::Matrix &H, yarp::sig::Vector &s, double &error) |
Perform reference calibration to determine the matrix H and the scaling factors S. | |
virtual bool | calibrate (yarp::sig::Matrix &H, double &s, double &error) |
Perform reference calibration to determine the matrix H and the scalar scaling factor s. | |
virtual | ~CalibReferenceWithMatchedPoints () |
Destructor. | |
Public Member Functions inherited from iCub::optimization::MatrixTransformationWithMatchedPoints | |
virtual | ~MatrixTransformationWithMatchedPoints () |
Destructor. | |
Protected Member Functions | |
double | evalError (const yarp::sig::Matrix &H) |
Protected Attributes | |
yarp::sig::Vector | min |
yarp::sig::Vector | min_s |
yarp::sig::Vector | max |
yarp::sig::Vector | max_s |
yarp::sig::Vector | x0 |
yarp::sig::Vector | s0 |
int | max_iter |
double | tol |
double | min_s_scalar |
double | max_s_scalar |
double | s0_scalar |
std::deque< yarp::sig::Vector > | p0 |
std::deque< yarp::sig::Vector > | p1 |
A class that deals with the problem of determining the roto-translation matrix H and scaling factors S between two sets of matching 3D points employing IpOpt.
The problem solved is of the form:
\[ (H,S)=\arg\min_{H\in SE\left(3\right),S\in diag\left(s_1,s_2,s_3,1\right)}\left(\frac{1}{N}\sum_{i=1}^{N} \left \| p_i^{O_1}-S \cdot H \cdot p_i^{O_2} \right \|^2 \right) \]
Definition at line 54 of file calibReference.h.
CalibReferenceWithMatchedPoints::CalibReferenceWithMatchedPoints | ( | ) |
Default Constructor.
Definition at line 467 of file calibReference.cpp.
|
inlinevirtual |
Destructor.
Definition at line 235 of file calibReference.h.
|
virtual |
Add to the internal database the 3D-point p0 and the 3D-point p1 which is supposed to correspond to H*p0, whose matrix H has to be found.
p0 | the free 3D-point. |
p1 | the 3D-point which corresponds either to H*p0 or to S*H*p0. |
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 567 of file calibReference.cpp.
|
virtual |
Perform reference calibration to determine the matrix H.
H | the final roto-translation matrix that links the two reference frames of 3D points. |
error | returns the residual error computed as norm(p1[i]-H*p0[i]) over the whole set of points pairs. |
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
|
virtual |
Perform reference calibration to determine the matrix H and the scalar scaling factor s.
H | the final roto-translation matrix that links the two reference frames of 3D points. |
s | the found scaling factor. |
error | returns the residual error computed as norm(p1[i]-s*H*p0[i]) over the whole set of points pairs. |
|
virtual |
Perform reference calibration to determine the matrix H and the scaling factors S.
H | the final roto-translation matrix that links the two reference frames of 3D points. |
s | the 3x1 vector containing the found scaling factors. |
error | returns the residual error computed as norm(p1[i]-S*H*p0[i]) over the whole set of points pairs, where S is the diagonal 3x3 matrix containing the scaling factors. |
|
virtual |
Clear the internal database of 3D points.
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 595 of file calibReference.cpp.
|
protected |
Definition at line 551 of file calibReference.cpp.
|
inlinevirtual |
Return the number of 3D-points pairs currently contained into the internal database.
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 146 of file calibReference.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 either to H*p0 or to S*H*p0. |
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 586 of file calibReference.cpp.
|
virtual |
Allow specifying the minimum and maximum bounds of the elements belonging to the transformation.
min | the 4x4 Matrix containining the minimum bounds. The translation bounds are given in min(0:2,3), whereas the rotation bounds are given in min(0,0:2). |
max | the 4x4 Matrix containining the maximum bounds. The translation bounds are given in max(0:2,3), whereas the rotation bounds are given in max(0,0:2). |
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
|
virtual |
Allow specifying the bounding box for both the translation part (given in meters) and the rotation part (given in radians) within which solution is seeked.
min | the 6x1 Vector containining the minimum bounds. The first 3 dimensions account for the translation part, the last 3 for the rotation in Euler angles representation. |
max | the 6x1 Vector containining the maximum bounds. The first 3 dimensions account for the translation part, the last 3 for the rotation in Euler angles representation. |
|
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 640 of file calibReference.cpp.
|
virtual |
Allow specifiying the initial guess for the roto-translation matrix we seek for.
H | the 4x4 homogeneous matrix used as initial guess. |
Implements iCub::optimization::MatrixTransformationWithMatchedPoints.
Definition at line 603 of file calibReference.cpp.
|
virtual |
Allow specifying the bounds for the 3D scaling factors with scalar scaling factor.
min | the the minimum bound. |
max | the the maximum bound. |
Definition at line 542 of file calibReference.cpp.
|
virtual |
Allow specifying the bounds for the 3D scaling factors.
min | the 3x1 Vector containining the minimum bounds. |
max | the 3x1 Vector containining the maximum bounds. |
|
virtual |
Allow specifiying the initial guess for the scalar scaling factor.
s | the scaling factor. |
Definition at line 632 of file calibReference.cpp.
|
virtual |
Allow specifiying the initial guess for the scaling factors.
s | the 3x1 vector of scaling factors. |
|
protected |
Definition at line 58 of file calibReference.h.
|
protected |
Definition at line 61 of file calibReference.h.
|
protected |
Definition at line 58 of file calibReference.h.
|
protected |
Definition at line 64 of file calibReference.h.
|
protected |
Definition at line 57 of file calibReference.h.
|
protected |
Definition at line 57 of file calibReference.h.
|
protected |
Definition at line 63 of file calibReference.h.
|
protected |
Definition at line 67 of file calibReference.h.
|
protected |
Definition at line 68 of file calibReference.h.
|
protected |
Definition at line 59 of file calibReference.h.
|
protected |
Definition at line 65 of file calibReference.h.
|
protected |
Definition at line 62 of file calibReference.h.
|
protected |
Definition at line 59 of file calibReference.h.