opentl::input::ImageSensor Class Reference

Inherits opentl::input::AbstractSensor.

Inherited by opentl::input::FirewireCamera, opentl::input::OpenCVCamera, and opentl::input::VideoFile.

List of all members.

Public Types


Public Member Functions

virtual void captureNext ()
 capture the next image from the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class
virtual void captureStart ()
 start the capturing process of the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class
virtual void captureStop ()
 stop the capturing process of the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class
virtual std::size_t height () const
 Returns the height of the captured image.
virtual const
opentl::core::cvdata::Image
image ()
 returns current frame
 ImageSensor ()
const opentl::math::SquareMatrixk_3x3 () const
 Get calibration/intrinsic transformation matrix K as 3x3.
const opentl::math::Matrixk_3x4 () const
 Get calibration/intrinsic transformation matrix K as 3x4.
void perspectiveProjection (const math::Vector4 &srcSensorP, math::Vector2 &dstScreenP, opentl::math::Vector3 &dstScreenP3d) const
 Perspective projection from sensor space to screen (intrinsic transformation) with homogeneous coordinates using K matrix.
void perspectiveProjection (const math::Vector4 &srcSensorP, math::Vector2 &dstScreenP) const
 Perspective projection from sensor space to screen (intrinsic transformation) with homogeneous coordinates using K matrix.
void projectionLayerSize (int &rx, int &ry, double &focus) const
 Get projection layer size of sensor (= camera image dimensions).
void projectionLayerSize (int &rx, int &ry) const
 Get projection layer size of sensor (= camera image dimensions).
const math::MatrixprojectionMatrix () const
 Get the projection matrix of the sensor ==> Intrinsic Matrix * Extrinsic Matrix return value is then the projection matrix of this sensor (3 x 4).
void setK (double f, double rx, double ry, double sigma=0)
 Set calibration / intrinsic transformation matrix K for 2D and 3D case.
void setK_3x3 (const math::SquareMatrix &k3x3)
 (For convenience) this method sets the 3x3 k-matrix directly
void setK_FxFy (double fx, double fy, double rx, double ry, double sigma=0)
 Set calibration / intrinsic transformation matrix K for 2D and 3D case.
virtual std::size_t width () const
 Returns the width of the captured image.
virtual ~ImageSensor ()

Protected Attributes

opentl::core::cvdata::ImagemFrame
std::size_t mHeight
math::SquareMatrix mK_3x3
math::Matrix mK_3x4
math::Matrix mP
std::size_t mWidth


Member Enumeration Documentation

Enumerator:
OFFLINE_COUNT 

Reimplemented from opentl::input::AbstractSensor.

Reimplemented in opentl::input::FirewireCamera.

Enumerator:
ONLINE_COUNT 

Reimplemented from opentl::input::AbstractSensor.

Reimplemented in opentl::input::FirewireCamera.


Constructor & Destructor Documentation

opentl::input::ImageSensor::ImageSensor (  ) 

virtual opentl::input::ImageSensor::~ImageSensor (  )  [virtual]


Member Function Documentation

virtual void opentl::input::ImageSensor::captureNext (  )  [virtual]

capture the next image from the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class

Reimplemented in opentl::input::LinuxDC1394Camera, opentl::input::OpenCVCamera, and opentl::input::VideoFile.

virtual void opentl::input::ImageSensor::captureStart (  )  [virtual]

start the capturing process of the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class

Reimplemented in opentl::input::LinuxDC1394Camera, opentl::input::OpenCVCamera, and opentl::input::VideoFile.

virtual void opentl::input::ImageSensor::captureStop (  )  [virtual]

stop the capturing process of the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class

Reimplemented in opentl::input::LinuxDC1394Camera, opentl::input::OpenCVCamera, and opentl::input::VideoFile.

virtual std::size_t opentl::input::ImageSensor::height (  )  const [virtual]

Returns the height of the captured image.

Returns:
Height in pixel.
Returns the height of the last image

virtual const opentl::core::cvdata::Image& opentl::input::ImageSensor::image (  )  [virtual]

const opentl::math::SquareMatrix& opentl::input::ImageSensor::k_3x3 (  )  const

Get calibration/intrinsic transformation matrix K as 3x3.

const opentl::math::Matrix& opentl::input::ImageSensor::k_3x4 (  )  const

Get calibration/intrinsic transformation matrix K as 3x4.

void opentl::input::ImageSensor::perspectiveProjection ( const math::Vector4 srcSensorP,
math::Vector2 dstScreenP,
opentl::math::Vector3 dstScreenP3d 
) const

Perspective projection from sensor space to screen (intrinsic transformation) with homogeneous coordinates using K matrix.

Parameters:
srcSensorP Homog. coordinate of Point in 3D sensor (camera) space
dstScreenP 2D coordinate of projected point
dstScreenP3d 3D coordinate of projected point (not homogeneous!)

void opentl::input::ImageSensor::perspectiveProjection ( const math::Vector4 srcSensorP,
math::Vector2 dstScreenP 
) const

Perspective projection from sensor space to screen (intrinsic transformation) with homogeneous coordinates using K matrix.

Parameters:
srcSensorP Homog. coordinate of Point in 3D sensor (camera) space
dstScreenP 2D coordinate of projected point

void opentl::input::ImageSensor::projectionLayerSize ( int &  rx,
int &  ry,
double &  focus 
) const

Get projection layer size of sensor (= camera image dimensions).

Parameters:
rx X-direction resolution
ry Y-direction resolution
focus Distance to focal point

void opentl::input::ImageSensor::projectionLayerSize ( int &  rx,
int &  ry 
) const

Get projection layer size of sensor (= camera image dimensions).

Parameters:
rx X-direction resolution
ry Y-direction resolution

const math::Matrix& opentl::input::ImageSensor::projectionMatrix (  )  const

Get the projection matrix of the sensor ==> Intrinsic Matrix * Extrinsic Matrix return value is then the projection matrix of this sensor (3 x 4).

void opentl::input::ImageSensor::setK ( double  f,
double  rx,
double  ry,
double  sigma = 0 
)

Set calibration / intrinsic transformation matrix K for 2D and 3D case.

Parameters:
f focus of uncalibrated camera, ATTENTION: in orthogonal projection case (for 2D poses) this value is set internally to 1.0
rx width of projectionlayer
ry height of projectionlayer
sigma sigma (for pinhole = 0)

void opentl::input::ImageSensor::setK_3x3 ( const math::SquareMatrix k3x3  ) 

(For convenience) this method sets the 3x3 k-matrix directly

void opentl::input::ImageSensor::setK_FxFy ( double  fx,
double  fy,
double  rx,
double  ry,
double  sigma = 0 
)

Set calibration / intrinsic transformation matrix K for 2D and 3D case.

Parameters:
fx focus of uncalibrated camera (x-direction), ATTENTION: in orthogonal projection case (for 2D poses) this value is set internally to 1.0
fy focus of uncalibrated camera (y-direction), ATTENTION: in orthogonal projection case (for 2D poses) this value is set internally to 1.0
rx width of projectionlayer
ry height of projectionlayer
sigma sigma (for pinhole = 0)

virtual std::size_t opentl::input::ImageSensor::width (  )  const [virtual]

Returns the width of the captured image.

Returns:
Width in pixel.
Returns the width of the last image


Member Data Documentation

std::size_t opentl::input::ImageSensor::mHeight [protected]

std::size_t opentl::input::ImageSensor::mWidth [protected]


Generated on Fri Jul 31 17:38:39 2009 for OpenTL by  doxygen 1.5.8