AURobotServers
4
|
#include <ucamparest.h>
Public Member Functions | |
bool | adjustParameters (bool debug) |
bool | adjustParameters35 (bool debug) |
void | initParEst () |
void | initParEst35 () |
bool | setEstMatrix (int m, float pixX, float pixY, UPosition posChart, UPosition posB, URotation rotB) |
bool | setEstMatrix35 (int m, float pixX, float pixY, UPosition posChart, UPosition posB, URotation rotB, int set) |
bool | setInitialValues35 (unsigned int m, float pixX, float pixY, UPosition posChart, UPosition posB, URotation rotB, unsigned int set) |
void | toLog (const char *info, int importanceLevel, UTime *toTime=NULL) |
UCamParEst () | |
~UCamParEst () | |
Public Member Functions inherited from UCamPar | |
UMatrix4 | getCtoPRob () |
URPos | getCtoPRob (UPosition pos3D) |
float | getFocalLength () |
float | getHx () |
float | getHy () |
UMatrix4 * | getItoP () |
float | getK1 () |
float | getK2 () |
float | getPixelSize () |
UPosition | getPtoCRob (int x, int y, float distance) |
UPosition | getPtoCRob (float x, float y, float distance) |
bool | getRadialD2U (float xu, float yu, float *xd, float *yd) |
bool | getRadialU2D (float xu, float yu, float *xd, float *yd) |
void | invalidate () |
bool | isValid () |
void | print (const char *prestring) |
bool | savePar (Uconfig *ini, const char *key) |
bool | setCameraParameters (float hx, float hy, float k1, float k2, float focalLng, float pixSizeFactor) |
bool | setCameraParameters (UCamPar *source) |
bool | setCameraParameters (Uconfig *ini, const char *key) |
bool | setPixelSize (float pixSize) |
int | snprint (const char *preString, char *dest, const int maxLength) |
UCamPar () | |
~UCamPar () | |
Protected Member Functions | |
bool | solveLeastSquare (UMatrix4 *R) |
Protected Member Functions inherited from UCamPar | |
bool | setMatrices (void) |
Private Attributes | |
UMatrixBig * | mA |
float | pixPosX [20] |
float | pixPosY [20] |
UPosition | posGmk [5] |
UPosition | posOnGmk [20] |
URotation | rotGmk [5] |
UMatrixBig * | vK |
Additional Inherited Members | |
Public Attributes inherited from UCamPar | |
bool | parValid |
Protected Attributes inherited from UCamPar | |
float | focalLength |
float | headX |
float | headY |
UMatrix4 | mb |
UMatrix4 | mCtoPRob |
UMatrix4 | mItoP |
UMatrix4 | mP |
float | radialK1 |
float | radialK2 |
float | resFactor |
bool UCamParEst::adjustParameters | ( | bool | debug | ) |
Solve equation and adjust parameters
References absd(), UCamPar::focalLength, UMatrix::get(), UCamPar::headX, UCamPar::headY, UCamPar::radialK1, UCamPar::radialK2, UMatrix::size(), solveLeastSquare(), sqr(), toLog(), and vK.
Referenced by toLog().
bool UCamParEst::adjustParameters35 | ( | bool | debug | ) |
Solve equation and adjust parameters
References UCamPar::focalLength, UMatrix::get(), UCamPar::headX, UCamPar::headY, pixPosX, pixPosY, posGmk, posOnGmk, UCamPar::radialK1, UCamPar::radialK2, rotGmk, UPosition::scaled(), URotation::scaled(), UPosition::set(), URotation::set(), setEstMatrix35(), solveLeastSquare(), and toLog().
Referenced by toLog().
void UCamParEst::initParEst | ( | ) |
void UCamParEst::initParEst35 | ( | ) |
bool UCamParEst::setEstMatrix | ( | int | m, |
float | pixX, | ||
float | pixY, | ||
UPosition | posChart, | ||
UPosition | posB, | ||
URotation | rotB | ||
) |
Set two rows in jacobian matrix (mA) and result vector (vK) with the parameters provided.
References UMatrix::get(), UCamPar::getFocalLength(), UCamPar::getHx(), UCamPar::getHy(), UCamPar::getK1(), UCamPar::getK2(), URotation::Kappa, mA, URotation::Omega, URotation::Phi, UMatrix::rows(), UMatrix::setRC(), sqr(), toLog(), vK, UPosition::x, UPosition::y, and UPosition::z.
Referenced by toLog().
bool UCamParEst::setEstMatrix35 | ( | int | m, |
float | pixX, | ||
float | pixY, | ||
UPosition | posChart, | ||
UPosition | posB, | ||
URotation | rotB, | ||
int | set | ||
) |
Set two rows in jacobian matrix (mA) and result vector (vK) with the parameters provided including position and rotation of the gmk number provided in 'set'.
References UMatrix::get(), UCamPar::getFocalLength(), UCamPar::getHx(), UCamPar::getHy(), UCamPar::getK1(), UCamPar::getK2(), URotation::Kappa, mA, URotation::Omega, URotation::Phi, UMatrix::rows(), UMatrix::setRC(), sqr(), toLog(), vK, UPosition::x, UPosition::y, and UPosition::z.
Referenced by adjustParameters35(), and toLog().
|
protected |
Solve a set of equations by least square method. mA * R = vK, where R is the unknown.
Returns true if solved
References UMatrix::err, mA, UMatrix::solve(), and vK.
Referenced by adjustParameters(), adjustParameters35(), and toLog().
|
inline |
Print to log - or console
References adjustParameters(), adjustParameters35(), initParEst(), initParEst35(), setEstMatrix(), setEstMatrix35(), setInitialValues35(), and solveLeastSquare().
Referenced by adjustParameters(), adjustParameters35(), setEstMatrix(), and setEstMatrix35().
|
private |
Matrix where to put jacopian
Referenced by initParEst(), initParEst35(), setEstMatrix(), setEstMatrix35(), solveLeastSquare(), UCamParEst(), and ~UCamParEst().
|
private |
Pixel position
Referenced by adjustParameters35(), and setInitialValues35().
|
private |
Referenced by adjustParameters35(), and setInitialValues35().
|
private |
Position of guidemark relative to camera
Referenced by adjustParameters35(), and setInitialValues35().
|
private |
Position on guidemark chart
Referenced by adjustParameters35(), and setInitialValues35().
|
private |
Referenced by adjustParameters35(), and setInitialValues35().
|
private |
vector where to put point value
Referenced by adjustParameters(), initParEst(), initParEst35(), setEstMatrix(), setEstMatrix35(), solveLeastSquare(), UCamParEst(), and ~UCamParEst().