#include <CameraParameters.h>
Public Member Functions | |
CameraPar3DArma () | |
Default constructor. | |
CameraPar3DArma (const Decimal info1, const Decimal info2, const Decimal info3, int opt, const Position2DArma &pp=Position2DArma(), const Decimal sk=0.0, const Roto3DHomoArma &rcfw=Roto3DHomoArma(IDENTITY_ARMA_MATRIX), CanonicalCameraArmaMatrix cc=PIXEL_CAMERA_ARMA_MATRIX) | |
Constructor with inputs: if cc==PIXEL_CAMERA_ARMA_MATRIX the in input is in pixels; otherwise in meter. | |
CameraPar3DArma (const CameraPar3DArma &rhs) | |
Copy constructor. | |
void | _findMetricInfo (const Decimal info, int opt) |
Find metric information. | |
void | _findPixelInfo (const Decimal info, int opt, const Position2DArma &pp=Position2DArma()) |
Find parameter in pixel. | |
Position2DArma | getPrincipalPoint () const |
Get principal point. | |
Decimal | getPrincipalPointX () const |
Get x component of principal point. | |
Decimal | getPrincipalPointY () const |
Get y component of principal point. | |
void | setPrincipalPoint (const Position2DArma &pp) |
Set principal point. | |
void | setPrincipalPoint (const Decimal &ppx, const Decimal &ppy) |
Set principal point. | |
void | setPrincipalPointX (const Decimal x) |
Set principal point x coordinate. | |
void | setPrincipalPointY (const Decimal y) |
Set principal point y coordinate. | |
CameraPar3DArma & | operator= (const CameraPar3DArma &rhs) |
Assignment operator. | |
Decimal | getWidthMetric () const |
Get the width of the camera in meter. | |
void | setWidthMetric (const Decimal w) |
Set the width of the camera in meter. | |
Decimal | getWidthPixel () const |
Get the width of the camera in pixel. | |
void | setWidthPixel (const Decimal w) |
Set the width of the camera in pixel. | |
Decimal | getHeightMetric () const |
Get the height of the camera in meter. | |
void | setHeightMetric (const Decimal h) |
Set the height of the camera in meter. | |
Decimal | getHeightPixel () const |
Get the height of the camera in pixel. | |
void | setHeightPixel (const Decimal h) |
Set the height of the camera in pixel. | |
Decimal | getFocalMetric () const |
Get the focal length of the camera in meter. | |
void | setFocalMetric (const Decimal f) |
Set the focal length of the camera in meter. | |
Decimal | getFocalPixel () const |
Get the focal length of the camera in pixel. | |
void | setFocalPixel (const Decimal f, bool update=true) |
Set the focal length of the camera in pixel. | |
Decimal | getFovW () const |
Get the field of view (fov) along width. | |
Angle | getFovWAngle () const |
Get the field of view (fov) along width. | |
void | setFovW (const Decimal fov) |
Set the field of view (fov) along width. | |
void | setFovWAngle (const Angle fov) |
Set the field of view (fov) along width. | |
Decimal | getFovH () const |
Get the field of view (fov) along height. | |
Angle | getFovHAngle () const |
Get the field of view (fov) along height. | |
void | setFovH (const Decimal fov) |
Set the field of view (fov) along height. | |
void | setFovHAngle (const Angle fov) |
Set the field of view (fov) along height. | |
Roto3DHomoArma | getRotoCamFromW () const |
Get the rototranslation matrix between world and camera. | |
Roto3DHomoArma * | getRotoCamFromWPointer () |
Get the rototranslation matrix pointer between world and camera. | |
Roto3DArma | getRotationCamFromW () const |
Get the rotation matrix between world and camera. | |
Position3DArma | getTranslationCamFromW () const |
Get the translation matrix between world and camera. | |
void | setRotoCamFromWPointer (const Roto3DHomoArma &roto) |
Set the rototranslation matrix pointer between world and camera. | |
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. | |
void | setCalibMatrix (arma::Mat< Decimal >::fixed< 3, 3 > calib) |
Set the calibration matrix of the camera. | |
void | setCalibMatrix (const Decimal f) |
Set the calibration matrix of the camera. | |
void | setCalibMatrix (const Decimal f, const Position2DArma &pp) |
Set the calibration matrix of the camera. | |
void | setCalibMatrix (const Decimal f, const Decimal ppx, const Decimal ppy) |
Set the calibration matrix of the camera. | |
Decimal | getSkew () const |
Get the 0x1 element of the calibration matrix: skew. | |
void | setSkew (const Decimal skew) |
Set the 0x1 element of the calibration matrix: skew. | |
string | print (int opt=0) |
Print function. |
CameraPar3DArma::CameraPar3DArma | ( | ) |
Default constructor.
CameraPar3DArma::CameraPar3DArma | ( | const Decimal | info1, | |
const Decimal | info2, | |||
const Decimal | info3, | |||
int | opt, | |||
const Position2DArma & | pp = Position2DArma() , |
|||
const Decimal | sk = 0.0 , |
|||
const Roto3DHomoArma & | rcfw = Roto3DHomoArma(IDENTITY_ARMA_MATRIX) , |
|||
CanonicalCameraArmaMatrix | cc = PIXEL_CAMERA_ARMA_MATRIX | |||
) |
Constructor with inputs: if cc==PIXEL_CAMERA_ARMA_MATRIX the in input is in pixels; otherwise in meter.
[in] | info1 | First information parameter. One between width (w), height (h), focal length (f), fov width (fovW) and fov height (fovH) |
[in] | info2 | Second information parameter. One between width (w), height (h), focal length (f), fov width (fovW) and fov height (fovH) |
[in] | info3 | Third information parameter. One between width (w), height (h), focal length (f), fov width (fovW) and fov height (fovH) |
[in] | opt | Integer option to select which kind of input one wants to set. 0 = [w h f]; 1 = [w h fovW]; 2 = [w h fovH]; 3 = [w fovW fovH]; 4 = [w fovH f]; 5 = [fovW fovH f]; 6 = [h fovW fovH]; 7 = [h fovW f] |
[in] | &pp | Position of the principal point in pixels |
[in] | &rcfw | Rotation matrix in homogeneous coordinate from world to camera reference frame |
[in] | cc | Inputs in pixels (default=PIXEL_CAMERA_ARMA_MATRIX) or in meters (METRIC_CAMERA_ARMA_MATRIX) |
CameraPar3DArma::CameraPar3DArma | ( | const CameraPar3DArma & | rhs | ) |
Copy constructor.
void CameraPar3DArma::_findMetricInfo | ( | const Decimal | info, | |
int | opt | |||
) |
Find metric information.
[in] | info | One of the parameter in meter |
[in] | opt | Select which kind of parameter is in input: 0 for focal length, 1 for width, 2 for height in meter |
void CameraPar3DArma::_findPixelInfo | ( | const Decimal | info, | |
int | opt, | |||
const Position2DArma & | pp = Position2DArma() | |||
) |
Find parameter in pixel.
[in] | info | One of the parameter in pixel |
[in] | opt | Select which kind of parameter is in input: 0 for focal length, 1 for width, 2 for height in pixel |
[in] | &pp | Position of the principal point in pixels. Default: (0,0) |
Position2DArma CameraPar3DArma::getPrincipalPoint | ( | ) | const |
Get principal point.
Decimal CameraPar3DArma::getPrincipalPointX | ( | ) | const |
Get x component of principal point.
Decimal CameraPar3DArma::getPrincipalPointY | ( | ) | const |
Get y component of principal point.
void CameraPar3DArma::setPrincipalPoint | ( | const Position2DArma & | pp | ) |
Set principal point.
[in] | pp | Principal point |
Set principal point.
[in] | ppx | X coordinate of principal point in pixels |
[in] | ppy | Y coordinate of principal point in pixels |
void CameraPar3DArma::setPrincipalPointX | ( | const Decimal | x | ) |
Set principal point x coordinate.
[in] | pp | Principal point, x coordinate |
void CameraPar3DArma::setPrincipalPointY | ( | const Decimal | y | ) |
Set principal point y coordinate.
[in] | pp | Principal point, y coordinate |
CameraPar3DArma & CameraPar3DArma::operator= | ( | const CameraPar3DArma & | rhs | ) |
Assignment operator.
Decimal CameraPar3DArma::getWidthMetric | ( | ) | const |
Get the width of the camera in meter.
void CameraPar3DArma::setWidthMetric | ( | const Decimal | w | ) |
Set the width of the camera in meter.
[in] | w | Width of the camera in meter |
Decimal CameraPar3DArma::getWidthPixel | ( | ) | const |
Get the width of the camera in pixel.
void CameraPar3DArma::setWidthPixel | ( | const Decimal | w | ) |
Set the width of the camera in pixel.
[in] | w | Width of the camera in pixel |
Decimal CameraPar3DArma::getHeightMetric | ( | ) | const |
Get the height of the camera in meter.
void CameraPar3DArma::setHeightMetric | ( | const Decimal | h | ) |
Set the height of the camera in meter.
[in] | h | Height of the camera in meter |
Decimal CameraPar3DArma::getHeightPixel | ( | ) | const |
Get the height of the camera in pixel.
void CameraPar3DArma::setHeightPixel | ( | const Decimal | h | ) |
Set the height of the camera in pixel.
[in] | h | Height of the camera in pixel |
Decimal CameraPar3DArma::getFocalMetric | ( | ) | const |
Get the focal length of the camera in meter.
void CameraPar3DArma::setFocalMetric | ( | const Decimal | f | ) |
Set the focal length of the camera in meter.
[in] | f | Focal length in meter |
Decimal CameraPar3DArma::getFocalPixel | ( | ) | const |
Get the focal length of the camera in pixel.
void CameraPar3DArma::setFocalPixel | ( | const Decimal | f, | |
bool | update = true | |||
) |
Set the focal length of the camera in pixel.
[in] | f | Focal length in meter |
[in] | update | Boolean that selects if the calibration matrix has to be updated. Default: true |
Decimal CameraPar3DArma::getFovW | ( | ) | const |
Get the field of view (fov) along width.
Angle CameraPar3DArma::getFovWAngle | ( | ) | const |
Get the field of view (fov) along width.
void CameraPar3DArma::setFovW | ( | const Decimal | fov | ) |
Set the field of view (fov) along width.
[in] | Field | of view (fov) along width |
void CameraPar3DArma::setFovWAngle | ( | const Angle | fov | ) |
Set the field of view (fov) along width.
[in] | Field | of view (fov) along width in [0 pi] |
Decimal CameraPar3DArma::getFovH | ( | ) | const |
Get the field of view (fov) along height.
Angle CameraPar3DArma::getFovHAngle | ( | ) | const |
Get the field of view (fov) along height.
void CameraPar3DArma::setFovH | ( | const Decimal | fov | ) |
Set the field of view (fov) along height.
[in] | Field | of view (fov) along height |
void CameraPar3DArma::setFovHAngle | ( | const Angle | fov | ) |
Set the field of view (fov) along height.
[in] | Field | of view (fov) along height in [0 pi] |
Roto3DHomoArma CameraPar3DArma::getRotoCamFromW | ( | ) | const |
Get the rototranslation matrix between world and camera.
Roto3DHomoArma * CameraPar3DArma::getRotoCamFromWPointer | ( | ) |
Get the rototranslation matrix pointer between world and camera.
Roto3DArma CameraPar3DArma::getRotationCamFromW | ( | ) | const |
Get the rotation matrix between world and camera.
Position3DArma CameraPar3DArma::getTranslationCamFromW | ( | ) | const |
Get the translation matrix between world and camera.
void CameraPar3DArma::setRotoCamFromWPointer | ( | const Roto3DHomoArma & | roto | ) |
Set the rototranslation matrix pointer between world and camera.
[in] | roto | Rototranslation matrix from world to camera |
arma::Mat< Decimal >::fixed< 3, 3 > CameraPar3DArma::getCalibMatrix | ( | ) | const |
Get the calibration matrix of the camera.
arma::Mat< Decimal >::fixed< 3, 3 > CameraPar3DArma::getCalibInvMatrix | ( | ) | const |
Get the inverse of calibration matrix of the camera in closed form.
arma::Mat< Decimal >::fixed< 3, 3 > * CameraPar3DArma::getCalibMatrixPointer | ( | ) |
Get the pointer to calibration matrix of the camera.
void CameraPar3DArma::setCalibMatrix | ( | arma::Mat< Decimal >::fixed< 3, 3 > | calib | ) |
Set the calibration matrix of the camera.
[in] | calib | Calibration matrix of the camera |
void CameraPar3DArma::setCalibMatrix | ( | const Decimal | f | ) |
Set the calibration matrix of the camera.
[in] | f | Focal length of the camera in pixel |
void CameraPar3DArma::setCalibMatrix | ( | const Decimal | f, | |
const Position2DArma & | pp | |||
) |
Set the calibration matrix of the camera.
[in] | f | Focal length of the camera in pixel |
[in] | pp | Principal point in pixel |
Set the calibration matrix of the camera.
[in] | f | Focal length of the camera in pixel |
[in] | ppx | Principal point in pixel (x coordinate) |
[in] | ppy | Principal point in pixel (y coordinate) |
Decimal CameraPar3DArma::getSkew | ( | ) | const |
Get the 0x1 element of the calibration matrix: skew.
void CameraPar3DArma::setSkew | ( | const Decimal | skew | ) |
Set the 0x1 element of the calibration matrix: skew.
[in] | skew | Skew to set |
string CameraPar3DArma::print | ( | int | opt = 0 |
) |
Print function.
[in] | opt | Option = 0 pixel, 1 metric 2 all. Default: pixel |