AURobotServers  4
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
UCamParEst Class Reference

#include <ucamparest.h>

Inheritance diagram for UCamParEst:
Inheritance graph

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 ()
 
UMatrix4getItoP ()
 
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

UMatrixBigmA
 
float pixPosX [20]
 
float pixPosY [20]
 
UPosition posGmk [5]
 
UPosition posOnGmk [20]
 
URotation rotGmk [5]
 
UMatrixBigvK
 

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
 

Constructor & Destructor Documentation

UCamParEst::UCamParEst ( )

Constructor

References mA, and vK.

UCamParEst::~UCamParEst ( )

Destructor

References mA, and vK.

Member Function Documentation

bool UCamParEst::adjustParameters ( bool  debug)
bool UCamParEst::adjustParameters35 ( bool  debug)
void UCamParEst::initParEst ( )

Initialize for parameter estimation

References UMatrix::init(), mA, and vK.

Referenced by toLog().

void UCamParEst::initParEst35 ( )

Init matrices for 35 unknowns

References UMatrix::init(), mA, and vK.

Referenced by toLog().

bool UCamParEst::setEstMatrix ( int  m,
float  pixX,
float  pixY,
UPosition  posChart,
UPosition  posB,
URotation  rotB 
)
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().

bool UCamParEst::setInitialValues35 ( unsigned int  m,
float  pixX,
float  pixY,
UPosition  posChart,
UPosition  posB,
URotation  rotB,
unsigned int  set 
)

Save relevant dataset in structure.

References pixPosX, pixPosY, posGmk, posOnGmk, and rotGmk.

Referenced by toLog().

bool UCamParEst::solveLeastSquare ( UMatrix4 R)
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().

void UCamParEst::toLog ( const char *  info,
int  importanceLevel,
UTime toTime = NULL 
)
inline

Member Data Documentation

UMatrixBig* UCamParEst::mA
private
float UCamParEst::pixPosX[20]
private

Pixel position

Referenced by adjustParameters35(), and setInitialValues35().

float UCamParEst::pixPosY[20]
private
UPosition UCamParEst::posGmk[5]
private

Position of guidemark relative to camera

Referenced by adjustParameters35(), and setInitialValues35().

UPosition UCamParEst::posOnGmk[20]
private

Position on guidemark chart

Referenced by adjustParameters35(), and setInitialValues35().

URotation UCamParEst::rotGmk[5]
private
UMatrixBig* UCamParEst::vK
private

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