MipBaselib::CameraCCDPar3DArma Class Reference

#include <CameraParameters.h>

Inheritance diagram for MipBaselib::CameraCCDPar3DArma:

MIPObject

List of all members.

Public Member Functions

 CameraCCDPar3DArma ()
 Skew NOTE I do not need an explicit parameter for skew since it is equal to _calibMatrix(0,1).
 CameraCCDPar3DArma (const Decimal f, const Decimal mx, const Decimal my, const Decimal w=-1.0, const Decimal h=-1.0, const Decimal sk=0.0, const Position2DArma &pp=Position2DArma(), const Roto3DHomoArma &rcfw=Roto3DHomoArma(IDENTITY_ARMA_MATRIX))
 Constructor with inputs. Complete information.
 CameraCCDPar3DArma (const Decimal &alphax, const Decimal &alphay, const Decimal w=-1.0, const Decimal h=-1.0, const Decimal sk=-1.0, const Position2DArma &pp=Position2DArma(), const Roto3DHomoArma &rcfw=Roto3DHomoArma(IDENTITY_ARMA_MATRIX))
 Constructor with inputs. Already computed [mx my] pre-calculation.
 CameraCCDPar3DArma (const CameraCCDPar3DArma &rhs)
 Copy constructor.
CameraCCDPar3DArmaoperator= (const CameraCCDPar3DArma &rhs)
 Assignment operator.
bool getFocalPixel (Decimal &f)
 Get focal length of the camera in pixels.
bool getWidthPixel (Decimal &w)
 Get width of the camera in pixels.
bool getHeightPixel (Decimal &h)
 Get height of the camera in pixels.
bool getCalibMatrix (arma::Mat< Decimal >::fixed< 3, 3 > &cm)
 Get the calibration matrix of the camera.
arma::Mat< Decimal >::fixed< 3, 3 > * getCalibMatrixPointer (bool &ret)
 Get the pointer to calibration matrix of the camera.
bool getCalibInvMatrix (arma::Mat< Decimal >::fixed< 3, 3 > &cm)
 Get the inverse of calibration matrix of the camera in closed form.
bool getCalibMatrixPointer (arma::Mat< Decimal >::fixed< 3, 3 > *&cm)
 Get the pointer to calibration matrix of the camera.
bool getCalibInvMatrixPointer (arma::Mat< Decimal >::fixed< 3, 3 > *&cm)
 Get the pointer to the inverse of calibration matrix of the camera.
arma::Mat< Decimal >::fixed< 3, 3 > * getCalibInvMatrixPointer (bool &ret)
 Get the pointer to the inverse of calibration matrix of the camera.
bool getMx (Decimal &mx)
 Get the number of pixels per unit distance (in pixels) along x-axis (mx of the calibration matrix).
bool getMy (Decimal &my)
 Get the number of pixels per unit distance (in pixels) along y-axis (my of the calibration matrix).
bool getFocalMx (Decimal &fmx)
 Get the focal length multiplied by mx (mx*f), i.e. the item (0,0) of the calibration matrix.
bool getFocalMy (Decimal &fmy)
 Get the focal length multiplied by my (my*f), i.e. the item (1,1) of the calibration matrix.
bool getPrincipalPointMxMy (Position2DArma &ppmx)
 Get the principal point multiplied by [mx; my] [ppx*mx; ppy*my], i.e. the item [(0,2); (1,2)] of the calibration matrix.
bool getPrincipalPointMxX (Decimal &ppmxx)
 Get the principal point multiplied by mx (ppx*mx), i.e. the item (0,2) of the calibration matrix.
bool getPrincipalPointMyY (Decimal &ppmxy)
 Get the principal point multiplied by my (ppy*my), i.e. the item (1,2) of the calibration matrix.
bool getSkew (Decimal &s)
 Get the skew multiplied by my (s*mx), i.e. the item (0,1) of the calibration matrix.
Decimal getFocalPixel () const
 Get focal length of the camera in pixels.
Decimal getWidthPixel () const
 Get width of the camera in pixels.
Decimal getHeightPixel () const
 Get height of the camera in pixels.
Position2DArma getPrincipalPointPixel () const
 Get the principal point of the camera in pixels.
Decimal getPrincipalPointPixelX () const
 Get the principal point of the camera in pixels along x-axis.
Decimal getPrincipalPointPixelY () const
 Get the principal point of the camera in pixels along y-axis.
arma::Mat< Decimal >::fixed< 3, 3 > getCalibMatrix () const
 Get the calibration matrix of the camera.
arma::Mat< Decimal >::fixed< 3, 3 > getCalibInvMatrix () const
 Get the inverse of calibration matrix of the camera in closed form.
arma::Mat< Decimal >::fixed< 3, 3 > * getCalibMatrixPointer ()
 Get the pointer to calibration matrix of the camera.
arma::Mat< Decimal >::fixed< 3, 3 > * getCalibInvMatrixPointer ()
 Get the pointer to the inverse of calibration matrix of the camera.
Decimal getMx ()
 Get the number of pixels per unit distance (in pixels) along x-axis (mx of the calibration matrix).
Decimal getMy ()
 Get the number of pixels per unit distance (in pixels) along y-axis (my of the calibration matrix).
Decimal getFocalMx () const
 Get the focal length multiplied by mx (mx*f), i.e. the item (0,0) of the calibration matrix.
Decimal getFocalMy () const
 Get the focal length multiplied by my (my*f), i.e. the item (1,1) of the calibration matrix.
Position2DArma getPrincipalPointMx () const
 Get the principal point multiplied by [mx; my] [ppx*mx; ppy*my], i.e. the item [(0,2); (1,2)] of the calibration matrix.
Decimal getPrincipalPointMxX () const
 Get the principal point multiplied by mx (ppx*mx), i.e. the item (0,2) of the calibration matrix.
Decimal getPrincipalPointMyY () const
 Get the principal point multiplied by my (ppy*my), i.e. the item (1,2) of the calibration matrix.
Decimal getSkew () const
 Get the skew, i.e. the item (0,1) of the calibration matrix.
void setFocalPixel (const Decimal &f, int opt=2)
 set focal length of the camera in pixels
void setWidthPixel (const Decimal &w)
 Set width of the camera in pixels.
void setHeightPixel (const Decimal &h)
 Set height of the camera in pixels.
void setSkew (const Decimal &s, int opt=2)
 Set the skew.
void setPrincipalPoint (const Position2DArma &pp, int opt=2)
 Set the principal point in pixels.
void setMx (const Decimal &mx, int opt=2)
 Set mx (number of pixels per unit distance) along x-axis.
void setMy (const Decimal &my, int opt=2)
 Set my (number of pixels per unit distance) along y-axis.
void setMxMy (const Decimal &mx, const Decimal &my, int opt=2)
 Set mx and my (number of pixels per unit distance along x and y axis respectevely).
void updateCalibrationMatrix ()
 It updates the calibration matrix and its inverse with the data stored in this class.
string getObjectName () const
 Method that gives the name of the class as it will be displayed by the tracer.
string print (int opt=0)
 Print function.


Constructor & Destructor Documentation

CameraCCDPar3DArma::CameraCCDPar3DArma (  ) 

Skew NOTE I do not need an explicit parameter for skew since it is equal to _calibMatrix(0,1).

Default constructor

CameraCCDPar3DArma::CameraCCDPar3DArma ( const Decimal  f,
const Decimal  mx,
const Decimal  my,
const Decimal  w = -1.0,
const Decimal  h = -1.0,
const Decimal  sk = 0.0,
const Position2DArma pp = Position2DArma(),
const Roto3DHomoArma rcfw = Roto3DHomoArma(IDENTITY_ARMA_MATRIX) 
)

Constructor with inputs. Complete information.

Parameters:
[in] f Focal length
[in] mx Number of pixels per unit distance in image coordinates (width direction)
[in] my Number of pixels per unit distance in image coordinates (height direction)
[in] w [Optional] Width of the camera. -1 as default
[in] h [Optional] Height of the camera. -1 as default
[in] s [Optional] Skew parameter. 0 as default
[in] &pp [Optional] Position of the principal point. [0 0] as default
[in] &rcfw [Optional] Rotation matrix in homogeneous coordinate from world to camera reference frame

CameraCCDPar3DArma::CameraCCDPar3DArma ( const Decimal alphax,
const Decimal alphay,
const Decimal  w = -1.0,
const Decimal  h = -1.0,
const Decimal  sk = -1.0,
const Position2DArma pp = Position2DArma(),
const Roto3DHomoArma rcfw = Roto3DHomoArma(IDENTITY_ARMA_MATRIX) 
)

Constructor with inputs. Already computed [mx my] pre-calculation.

Parameters:
[in] alphax Focal length multiplied by mx, number of pixels per unit distance along x-axis
[in] alphay Focal length multiplied by my, number of pixels per unit distance along y-axis
[in] w [Optional] Width of the camera. -1 as default
[in] h [Optional] Height of the camera. -1 as default
[in] sk [Optional] Skew parameter. 0 as default
[in] &pp [Optional] Position of the principal point in pixels, scaled via [mX mY]. [0 0] as default
[in] &rcfw [Optional] Rotation matrix in homogeneous coordinate from world to camera reference frame. Identity matrix as default

CameraCCDPar3DArma::CameraCCDPar3DArma ( const CameraCCDPar3DArma rhs  ) 

Copy constructor.


Member Function Documentation

CameraCCDPar3DArma & CameraCCDPar3DArma::operator= ( const CameraCCDPar3DArma rhs  ) 

Assignment operator.

bool CameraCCDPar3DArma::getFocalPixel ( Decimal f  ) 

Get focal length of the camera in pixels.

Parameters:
[out] f Focal length (in pixels) to be set
Returns:
True if a valid focal length was set; false otherwise

bool CameraCCDPar3DArma::getWidthPixel ( Decimal w  ) 

Get width of the camera in pixels.

Parameters:
[out] w Width of the camera (in pixels) to be set
Returns:
True if a valid width was set; false otherwise

bool CameraCCDPar3DArma::getHeightPixel ( Decimal h  ) 

Get height of the camera in pixels.

Parameters:
[out] h Height of the camera (in pixels) to be set
Returns:
True if a valid height was set; false otherwise

bool CameraCCDPar3DArma::getCalibMatrix ( arma::Mat< Decimal >::fixed< 3, 3 > &  cm  ) 

Get the calibration matrix of the camera.

Parameters:
[out] cm Calibration matrix to be set
Returns:
True if a valid calibration matrix was set; false otherwise

arma::Mat< Decimal >::fixed< 3, 3 > * CameraCCDPar3DArma::getCalibMatrixPointer ( bool &  ret  ) 

Get the pointer to calibration matrix of the camera.

Parameters:
[out] ret True if a valid calibration matrix was set; false otherwise
Returns:
Pointer of calibration matrix to be set

bool CameraCCDPar3DArma::getCalibInvMatrix ( arma::Mat< Decimal >::fixed< 3, 3 > &  cm  ) 

Get the inverse of calibration matrix of the camera in closed form.

Parameters:
[out] cm Inverse of calibration matrix to be set
Returns:
True if a valid inverse calibration matrix was set; false otherwise

bool CameraCCDPar3DArma::getCalibMatrixPointer ( arma::Mat< Decimal >::fixed< 3, 3 > *&  cm  ) 

Get the pointer to calibration matrix of the camera.

Parameters:
[out] cm Pointer to calibration matrix to be set
Returns:
True if a valid calibration matrix was set; false otherwise

bool CameraCCDPar3DArma::getCalibInvMatrixPointer ( arma::Mat< Decimal >::fixed< 3, 3 > *&  cm  ) 

Get the pointer to the inverse of calibration matrix of the camera.

Parameters:
[out] cm Pointer of inverse of calibration matrix to be set
Returns:
True if a valid inverse calibration matrix was set; false otherwise

arma::Mat< Decimal >::fixed< 3, 3 > * CameraCCDPar3DArma::getCalibInvMatrixPointer ( bool &  ret  ) 

Get the pointer to the inverse of calibration matrix of the camera.

Parameters:
[out] ret True if a valid inverse calibration matrix was set; false otherwise
Returns:
Pointer of inverse of calibration matrix to be set

bool CameraCCDPar3DArma::getMx ( Decimal mx  ) 

Get the number of pixels per unit distance (in pixels) along x-axis (mx of the calibration matrix).

Parameters:
[out] mx Number of pixels per unit distance (in pixels) along x-axis (mx of the calibration matrix)
Returns:
True if a valid mx was set; false otherwise

bool CameraCCDPar3DArma::getMy ( Decimal my  ) 

Get the number of pixels per unit distance (in pixels) along y-axis (my of the calibration matrix).

Parameters:
[out] my Number of pixels per unit distance (in pixels) along y-axis (my of the calibration matrix)
Returns:
True if a valid my was set; false otherwise

bool CameraCCDPar3DArma::getFocalMx ( Decimal fmx  ) 

Get the focal length multiplied by mx (mx*f), i.e. the item (0,0) of the calibration matrix.

Parameters:
[out] fmx Focal length multiplied by mx (mx*f), i.e. the item (0,0) of the calibration matrix
Returns:
True if a valid my was set; false otherwise

bool CameraCCDPar3DArma::getFocalMy ( Decimal fmy  ) 

Get the focal length multiplied by my (my*f), i.e. the item (1,1) of the calibration matrix.

Parameters:
[out] fmy Focal length multiplied by my (my*f), i.e. the item (1,1) of the calibration matrix
Returns:
True if a valid my was set; false otherwise

bool CameraCCDPar3DArma::getPrincipalPointMxMy ( Position2DArma ppmx  ) 

Get the principal point multiplied by [mx; my] [ppx*mx; ppy*my], i.e. the item [(0,2); (1,2)] of the calibration matrix.

Parameters:
[out] ppmx Principal point multiplied by [mx; my] [ppx*mx; ppy*my], i.e. the item [(0,2); (1,2)] of the calibration matrix
Returns:
True if a valid my was set; false otherwise

bool CameraCCDPar3DArma::getPrincipalPointMxX ( Decimal ppmxx  ) 

Get the principal point multiplied by mx (ppx*mx), i.e. the item (0,2) of the calibration matrix.

Parameters:
[out] ppmxx Principal point multiplied by mx (ppx*mx), i.e. the item (0,2) of the calibration matrix
Returns:
True if a valid my was set; false otherwise

bool CameraCCDPar3DArma::getPrincipalPointMyY ( Decimal ppmxy  ) 

Get the principal point multiplied by my (ppy*my), i.e. the item (1,2) of the calibration matrix.

Parameters:
[out] ppmxy Principal point multiplied by my (ppy*my), i.e. the item (1,2) of the calibration matrix
Returns:
True if a valid my was set; false otherwise

bool CameraCCDPar3DArma::getSkew ( Decimal s  ) 

Get the skew multiplied by my (s*mx), i.e. the item (0,1) of the calibration matrix.

Parameters:
[out] s Skew multiplied by my (s*mx), i.e. the item (0,1) of the calibration matrix
Returns:
True if a valid my was set; false otherwise

Decimal CameraCCDPar3DArma::getFocalPixel (  )  const

Get focal length of the camera in pixels.

Returns:
Focal length (in pixels) to be set

Decimal CameraCCDPar3DArma::getWidthPixel (  )  const

Get width of the camera in pixels.

Returns:
Width of the camera (in pixels) to be set

Decimal CameraCCDPar3DArma::getHeightPixel (  )  const

Get height of the camera in pixels.

Returns:
Height of the camera (in pixels) to be set

Position2DArma CameraCCDPar3DArma::getPrincipalPointPixel (  )  const

Get the principal point of the camera in pixels.

Returns:
Principal point of the camera (in pixels) to be set

Decimal CameraCCDPar3DArma::getPrincipalPointPixelX (  )  const

Get the principal point of the camera in pixels along x-axis.

Returns:
Principal point of the camera (in pixels) to be set along x-axis

Decimal CameraCCDPar3DArma::getPrincipalPointPixelY (  )  const

Get the principal point of the camera in pixels along y-axis.

Returns:
Principal point of the camera (in pixels) to be set along y-axis

arma::Mat< Decimal >::fixed< 3, 3 > CameraCCDPar3DArma::getCalibMatrix (  )  const

Get the calibration matrix of the camera.

Returns:
Calibration matrix to be set

arma::Mat< Decimal >::fixed< 3, 3 > CameraCCDPar3DArma::getCalibInvMatrix (  )  const

Get the inverse of calibration matrix of the camera in closed form.

Returns:
Inverse of calibration matrix to be set

arma::Mat< Decimal >::fixed< 3, 3 > * CameraCCDPar3DArma::getCalibMatrixPointer (  ) 

Get the pointer to calibration matrix of the camera.

Returns:
Pointer to calibration matrix to be set

arma::Mat< Decimal >::fixed< 3, 3 > * CameraCCDPar3DArma::getCalibInvMatrixPointer (  ) 

Get the pointer to the inverse of calibration matrix of the camera.

Returns:
Pointer of inverse of calibration matrix to be set

Decimal CameraCCDPar3DArma::getMx (  ) 

Get the number of pixels per unit distance (in pixels) along x-axis (mx of the calibration matrix).

Returns:
Number of pixels per unit distance (in pixels) along x-axis (mx of the calibration matrix)

Decimal CameraCCDPar3DArma::getMy (  ) 

Get the number of pixels per unit distance (in pixels) along y-axis (my of the calibration matrix).

Returns:
Number of pixels per unit distance (in pixels) along y-axis (my of the calibration matrix)

Decimal CameraCCDPar3DArma::getFocalMx (  )  const

Get the focal length multiplied by mx (mx*f), i.e. the item (0,0) of the calibration matrix.

Returns:
Focal length multiplied by mx (mx*f), i.e. the item (0,0) of the calibration matrix

Decimal CameraCCDPar3DArma::getFocalMy (  )  const

Get the focal length multiplied by my (my*f), i.e. the item (1,1) of the calibration matrix.

Returns:
Focal length multiplied by my (my*f), i.e. the item (1,1) of the calibration matrix

Position2DArma CameraCCDPar3DArma::getPrincipalPointMx (  )  const

Get the principal point multiplied by [mx; my] [ppx*mx; ppy*my], i.e. the item [(0,2); (1,2)] of the calibration matrix.

Returns:
Principal point multiplied by [mx; my] [ppx*mx; ppy*my], i.e. the item [(0,2); (1,2)] of the calibration matrix

Decimal CameraCCDPar3DArma::getPrincipalPointMxX (  )  const

Get the principal point multiplied by mx (ppx*mx), i.e. the item (0,2) of the calibration matrix.

Returns:
Principal point multiplied by mx (ppx*mx), i.e. the item (0,2) of the calibration matrix

Decimal CameraCCDPar3DArma::getPrincipalPointMyY (  )  const

Get the principal point multiplied by my (ppy*my), i.e. the item (1,2) of the calibration matrix.

Returns:
Principal point multiplied by my (ppy*my), i.e. the item (1,2) of the calibration matrix

Decimal CameraCCDPar3DArma::getSkew (  )  const

Get the skew, i.e. the item (0,1) of the calibration matrix.

Returns:
Skew, i.e. the item (0,1) of the calibration matrix

void CameraCCDPar3DArma::setFocalPixel ( const Decimal f,
int  opt = 2 
)

set focal length of the camera in pixels

Parameters:
[in] f Focal length (in pixels) to be set
[in] opt (optional) Choose if one wants to update data with the given input. 0 no update, 1 update for updating mx and my; 2 for updating calibration matrix ( if a previous valid one is known); 3 if all inner data (mx my skew princPoint) are known -> updating calibration matrix and its inverse (also if a previous calibration matrix is not known)

void CameraCCDPar3DArma::setWidthPixel ( const Decimal w  ) 

Set width of the camera in pixels.

Parameters:
[in] w Width of the camera (in pixels) to be set

void CameraCCDPar3DArma::setHeightPixel ( const Decimal h  ) 

Set height of the camera in pixels.

Parameters:
[in] h Height of the camera (in pixels) to be set : Only the data affected by input are updated

void CameraCCDPar3DArma::setSkew ( const Decimal s,
int  opt = 2 
)

Set the skew.

Parameters:
[in] s Skew (in pixels) to be set
[in] opt (optional) Choose if one wants to update data with the given input. 0 no update, 1 update for updating mx and my; 2 for updating calibration matrix ( if a previous valid one is known); 3 if all inner data (mx my f princPoint) are known -> updating calibration matrix and its inverse (also if a previous calibration matrix is not known)

void CameraCCDPar3DArma::setPrincipalPoint ( const Position2DArma pp,
int  opt = 2 
)

Set the principal point in pixels.

Parameters:
[in] pp Principal point (in pixels) to be set
[in] opt (optional) Choose if one wants to update data with the given input. 0 no update, 1 update for updating mx and my; 2 for updating calibration matrix ( if a previous valid one is known); 3 if all inner data (mx my skew f) are known -> updating calibration matrix and its inverse (also if a previous calibration matrix is not known)

void CameraCCDPar3DArma::setMx ( const Decimal mx,
int  opt = 2 
)

Set mx (number of pixels per unit distance) along x-axis.

Parameters:
[in] mx Distorsion (number of pixels per unit distance) along x-axis
[in] opt (optional) Choose if one wants to update data with the given input. 0 no update, 1 update for updating mx and my; 2 for updating calibration matrix ( if a previous valid one is known); 3 if all inner data (princPoint my skew f) are known -> updating calibration matrix and its inverse (also if a previous calibration matrix is not known)

void CameraCCDPar3DArma::setMy ( const Decimal my,
int  opt = 2 
)

Set my (number of pixels per unit distance) along y-axis.

Parameters:
[in] my Distorsion (number of pixels per unit distance) along y-axis
[in] opt (optional) Choose if one wants to update data with the given input. 0 no update, 1 update for updating mx and my; 2 for updating calibration matrix ( if a previous valid one is known); 3 if all inner data (princPoint mx skew f) are known -> updating calibration matrix and its inverse (also if a previous calibration matrix is not known)

void CameraCCDPar3DArma::setMxMy ( const Decimal mx,
const Decimal my,
int  opt = 2 
)

Set mx and my (number of pixels per unit distance along x and y axis respectevely).

Parameters:
[in] mx Distorsion (number of pixels per unit distance) along x-axis
[in] my Distorsion (number of pixels per unit distance) along y-axis
[in] opt (optional) Choose if one wants to update data with the given input. 0 no update, 1 update for updating mx and my; 2 for updating calibration matrix ( if a previous valid one is known)

void CameraCCDPar3DArma::updateCalibrationMatrix (  ) 

It updates the calibration matrix and its inverse with the data stored in this class.

This method is useful if one updated internal data with set data without updating calibration matrix (and its inverse)

string MipBaselib::CameraCCDPar3DArma::getObjectName (  )  const [inline, virtual]

Method that gives the name of the class as it will be displayed by the tracer.

Returns:
a string, which is the name of the current class
Note:
pure virtual, has to be redefined for each child class

Implements MIPObject.

string CameraCCDPar3DArma::print ( int  opt = 0  ) 

Print function.

Parameters:
[in] opt [optional] opt. 0 for printing all data (also possible non valid one); 1 for printing only valid data


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

Generated on Mon Feb 20 07:01:11 2017 for MIP by  doxygen 1.5.6