frame_helper
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
frame_helper::CameraCalibration Struct Reference

#include <Calibration.h>

Public Member Functions

 CameraCalibration ()
 
 CameraCalibration (double fx, double fy, double cx, double cy, double d0, double d1, double d2, double d3, int width=-1, int height=-1)
 
Eigen::Matrix3d getCameraMatrix () const
 
Eigen::Matrix2d getPixelCovariance () const
 
bool isValid () const
 
void rescale (int width, int height)
 rescale the calibration to a different image size More...
 
void toFrame (base::samples::frame::Frame &frame) const
 write the calibration into the attributes of the frame More...
 

Static Public Member Functions

static CameraCalibration fromFrame (const base::samples::frame::Frame &frame)
 create a calibration struct based on the information embedded in the frame More...
 

Public Attributes

double fx
 
double fy
 
double cx
 
double cy
 
double d0
 
double d1
 
double d2
 
double d3
 
int width
 
int height
 
double ex
 
double ey
 
bool fisheye
 

Detailed Description

Calibration parameters expressing the camera matrix and the coefficients for the lens distortion. See: http://opencv.willowgarage.com/documentation/camera_calibration_and_3d_reconstruction.html for a description of the values and the model that is used.

Constructor & Destructor Documentation

CameraCalibration::CameraCalibration ( )
CameraCalibration::CameraCalibration ( double  fx,
double  fy,
double  cx,
double  cy,
double  d0,
double  d1,
double  d2,
double  d3,
int  width = -1,
int  height = -1 
)

Member Function Documentation

CameraCalibration CameraCalibration::fromFrame ( const base::samples::frame::Frame &  frame)
static

create a calibration struct based on the information embedded in the frame

this function will throw if the calibration parameters are not embedded as attributes in the frame

Eigen::Matrix3d CameraCalibration::getCameraMatrix ( ) const
Returns
the 3x3 camera matrix, which converts scene points into screen points
Eigen::Matrix2d CameraCalibration::getPixelCovariance ( ) const
Returns
the 2x2 covariance matrix of the pixel reprojection error
bool CameraCalibration::isValid ( ) const
Returns
true if the calibration values are set
void CameraCalibration::rescale ( int  width,
int  height 
)

rescale the calibration to a different image size

Use this function if you have a calibration for a particular resolution, and you have changed the resolution of the image. Useful for e.g. downscaled images with lower resolution.

Note
this function will not maintain the aspect ratio, you have to do this yourselves.
void CameraCalibration::toFrame ( base::samples::frame::Frame &  frame) const

write the calibration into the attributes of the frame

will throw if the size of the calibration does not match the size of the frame

Member Data Documentation

double frame_helper::CameraCalibration::cx

optical center in x and y direction

double frame_helper::CameraCalibration::cy
double frame_helper::CameraCalibration::d0

distortion coefficients

double frame_helper::CameraCalibration::d1
double frame_helper::CameraCalibration::d2
double frame_helper::CameraCalibration::d3
double frame_helper::CameraCalibration::ex

Re-projection error in pixels during calibration (x and y coordinates) Calibration Errors 1-sigma standard deviation

double frame_helper::CameraCalibration::ey
bool frame_helper::CameraCalibration::fisheye

indicates that the distrotion parameter are for a fisheye lens

double frame_helper::CameraCalibration::fx

focal length the calibration in x and y direction

double frame_helper::CameraCalibration::fy
int frame_helper::CameraCalibration::height
int frame_helper::CameraCalibration::width

size of the image


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