Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Friends
jafar::camera::CameraPinhole Class Reference

Camera Pinhole model. More...


Detailed Description

Camera Pinhole model.

image frame: (u,v): column, row camera frame: (x,y,z): right, down, depth

image_cameraFrame.png
Image and camera reference frame
Todo:
add a scale parameter to store how much the model was scaled

Definition at line 26 of file cameraPinhole.hpp.

#include <cameraPinhole.hpp>

Inheritance diagram for jafar::camera::CameraPinhole:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CameraPinhole ()
 Default constructor.
 CameraPinhole (CameraPinhole const &c_)
 Copy constructor.
double getApertureU () const
double getApertureV () const
void setParameters (int width_, int height_, double u0_, double v0_, double alphaU_, double alphaV_)
 Set the parameters of the perspective camera model.
void applyScale (double scale)
 Scales the current model.
template<class Vec , class Pix >
bool project (Vec const &v, Pix &pix) const
 Project a 3D point on the camera plane.
template<class Vec , class Pix >
bool projectH (Vec const &v, Pix &pix) const
 Project a 3D point on the camera plane.This function works with homogeneous coordinates.
template<class Vec , class Mat >
void projectJac (Vec const &v, Mat &J) const
 jacobian of project
template<class Vec , class Mat , class Pix >
void projectJac (Vec const &v, Pix &pix, Mat &J) const
 project and jacobian of project
template<class Pix , class Vec >
void imageToCameraFrame (Pix const &pix, Vec &v) const
 Pixel coordinate in camera frame.
template<class Pix , class Mat >
void imageToCameraFrameJac (Pix const &pix, Mat &J) const
 Jacobian of imageToCameraFrame()
template<class Pix , class Vec >
void imageToCameraFrameDirection (Pix const &pix_, Vec &v) const
 Pixel direction in camera frame.
template<class Pix , class Mat >
void imageToCameraFrameDirectionJac (Pix const &pix, Mat &J) const
 Jacobian of directionInCameraFrame()
jblas::vec4 getIntrinsicParams ()
 Get intrinsic parameters vector.

Public Attributes

int width
int height
double u0
double v0
double alphaU
double alphaV
jblas::mat Ph
 (3x4) projection matrix (homogeneous coordinates)
jblas::mat_range P
 (2x3) projection matrix (euclidean coordinates)

Static Public Attributes

static const double epsilon

Protected Member Functions

void loadKeyValueFile (jafar::kernel::KeyValueFile const &keyValueFile)
 Implement this method calling repeatedly KeyValueFile::getItem() method.

Friends

class StereoBench

Member Function Documentation

Get intrinsic parameters vector.

Returns:
the intrinsic vector k = (u0, v0, alphaU, alphaV)

Definition at line 241 of file cameraPinhole.hpp.

template<class Vec , class Pix >
bool jafar::camera::CameraPinhole::project ( Vec const &  v,
Pix &  pix 
) const [inline]

Project a 3D point on the camera plane.

This function works with euclidean coordinates.

Returns:
true if the point is visible.
Exceptions:
jafar::kernel::JafarExceptionwith id NUMERIC_CONDITION if the projection cannot be computed.

Definition at line 77 of file cameraPinhole.hpp.

References JFR_NUMERIC, JFR_PRECOND, and P.

Referenced by projectJac().

template<class Vec , class Pix >
bool jafar::camera::CameraPinhole::projectH ( Vec const &  v,
Pix &  pix 
) const [inline]

Project a 3D point on the camera plane.This function works with homogeneous coordinates.

Returns:
true if the point is visible.

Definition at line 107 of file cameraPinhole.hpp.

References JFR_PRECOND, and Ph.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:33 for Jafar by doxygen 1.7.6.1
LAAS-CNRS