TLIB documentation
 

tlCamera Class Reference

Inheritance diagram for tlCamera:

Inheritance graph
[legend]
Collaboration diagram for tlCamera:

Collaboration graph
[legend]

List of all members.


Detailed Description

Base class for camera and image sensors.

The tlCamera base class offers an encapsulation for image sources that are in a known location in the workspace, and possibly return calibrated (undistorted) images. An important child class is the tlCameraStereo base class, which provides a generic interface to stereo engines.

Public Member Functions

 tlCamera ()
virtual ~tlCamera ()
int setPosition (int Tx, int Ty, int Tz)
int setOrientation (int Rx, int Ry, int Rz)
bool isCalibrated ()
int getTx ()
int getTy ()
int getTz ()
int getRx ()
int getRy ()
int getRz ()
virtual int grab (tlImage *image)=0
virtual int grab (tlImage *image, tlRect *rect)=0
virtual int grabQueued (tlImage *image)=0
virtual int grabQueued (tlImage *image, tlRect *rect)=0
int getWidth ()
int getHeight ()
int getID ()
tl_format getFormat ()


Constructor & Destructor Documentation

tlCamera::tlCamera (  ) 

Default constructor.

Note:
See error management for details.
Default constructor.

tlCamera::~tlCamera (  )  [virtual]

Default destructor.

Note:
See error management for details.


Member Function Documentation

int tlCamera::setPosition ( int  Tx,
int  Ty,
int  Tz 
)

Set the camera position in the workspace.

Parameters:
Tx camera position on the X axis.
Ty camera position on the Y axis.
Tz camera position on the Z axis.
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
This assumes a right-handed, orthogonal coordonate system.

int tlCamera::setOrientation ( int  Rx,
int  Ry,
int  Rz 
)

Set the camera orientation in the workspace.

Parameters:
Rx camera orientation around the X axis.
Ry camera orientation around the Y axis.
Rz camera orientation around the Z axis.
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
This assumes a right-handed, orthogonal coordonate system.

tlCamera::isCalibrated (  )  [inline]

Check whether the camera returns calibrated (undistorted) images or not.

Returns:
True if camera is calibrated,
False otherwise.

tlCamera::getTx (  )  [inline]

Get the position of the camera on the X axis of the workspace.

Returns:
The camera position in X.

tlCamera::getTy (  )  [inline]

Get the position of the camera on the Y axis of the workspace.

Returns:
The camera position in Y.

tlCamera::getTz (  )  [inline]

Get the position of the camera on the Z axis of the workspace.

Returns:
The camera position in Z.

tlCamera::getRx (  )  [inline]

Get the orientation of the camera around the X axis of the workspace.

Returns:
The camera orientation around X.

tlCamera::getRy (  )  [inline]

Get the orientation of the camera around the X axis of the workspace.

Returns:
The camera orientation around Y.

tlCamera::getRz (  )  [inline]

Get the orientation of the camera around the X axis of the workspace.

Returns:
The camera orientation around Z.

virtual int tlCamera::grab ( tlImage image  )  [pure virtual]

This call acquires a full image from an image source. The image will have the size and format the source is currently configured for.

Parameters:
image [out] a valid image pointer that will receive the image.
Returns:
0 on success, -1 otherwise.
See error management for details.

Implements tlSource.

Implemented in tlCameraStereo, tlCameraSVS, tlCameraSVSBase, tlCameraSVSHead, and tlCameraTSAI.

virtual int tlCamera::grab ( tlImage image,
tlRect rect 
) [pure virtual]

This call acquires a portion of an image from an image source. The image will have the size and format the source is currently configured for, but only the portion defined by the rect argument will contain valid pixel values.

Parameters:
image [out] a valid image pointer that will receive the image.
rect a pointer to the portion of the image to acquire.
Returns:
0 on success, -1 otherwise.
See error management for details.

Implements tlSource.

Implemented in tlCameraStereo, tlCameraSVS, tlCameraSVSBase, tlCameraSVSHead, and tlCameraTSAI.

virtual int tlCamera::grabQueued ( tlImage image  )  [pure virtual]

This call acquires a full image from an image source. The image will have the size and format the source is currently configured for.

Parameters:
image [out] a valid image pointer that will receive the image.
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
This routine is faster than grab() because image acquisition happens in the background. However, since the grab command is sent to the grabber during the previous call to the grabQueued() routine, the image returned can be out-of-date.

Implements tlSource.

Implemented in tlCameraStereo, tlCameraSVS, tlCameraSVSBase, tlCameraSVSHead, and tlCameraTSAI.

virtual int tlCamera::grabQueued ( tlImage image,
tlRect rect 
) [pure virtual]

This call acquires a portion of an image from an image source. The image will have the size and format the source is currently configured for, but only the portion defined by the rect argument will contain valid pixel values.

Parameters:
image [out] a valid image pointer that will receive the image.
rect a pointer to the portion of the image to acquire.
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
This routine is faster than grab() because image acquisition happens in the background. However, since the grab command is sent to the grabber during the previous call to the grabQueued() routine, the image returned can be out-of-date.

Implements tlSource.

Implemented in tlCameraStereo, tlCameraSVS, tlCameraSVSBase, tlCameraSVSHead, and tlCameraTSAI.

tlSource::getWidth (  )  [inline, inherited]

Returns the width of the image source. Any image acquired through this tlSource object will have the current width.

Returns:
The width in pixels of the image source.
See error management for details.

tlSource::getHeight (  )  [inline, inherited]

Returns the height of the image source. Any image acquired through this tlSource object will have the current height.

Returns:
The height in pixels of the image source.
See error management for details.

tlSource::getID (  )  [inline, inherited]

Return a unique identifier for this source. Identifiers are allocated dynamically and are only valid during application run-time.

Returns:
A unique numerical identifier on success, -1 otherwise.
See error management for details.

tlSource::getFormat (  )  [inline, inherited]

Returns the format of the image source. Any image acquired through this tlSource object will have the current format.

Returns:
The format of the image source.


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

TLIB documentation - generated on 7 May 2008
Please address any questions to seb@tuyphon.com
(C) 2001-2008 - S. Grange
(C) 2001-2007 - VRAI Group, EPFL
All Rights Reserved.