TLIB documentation
 

tlCameraSVS Class Reference

Inheritance diagram for tlCameraSVS:

Inheritance graph
[legend]
Collaboration diagram for tlCameraSVS:

Collaboration graph
[legend]

List of all members.


Detailed Description

SRI's Small Vision System wrapper for TLIB.

Public Member Functions

 tlCameraSVS ()
 tlCameraSVS (char *filename)
virtual ~tlCameraSVS ()
tlSourcegetLeftSource ()
tlSourcegetRightSource ()
int setSource (tlSource *leftSource, tlSource *rightSource)
int setLeftSource (tlSource *source)
int setRightSource (tlSource *source)
virtual int grab (tlImage *image)
virtual int grab (tlImage *image, tlRect *rect)
virtual int grabQueued (tlImage *image)
virtual int grabQueued (tlImage *image, tlRect *rect)
virtual int grab (tlImage *image, tlImage *disparity)
virtual int grab (tlImage *image, tlImage *disparity, tlRect *rect)
virtual int grabQueued (tlImage *image, tlImage *disparity)
virtual int grabQueued (tlImage *image, tlImage *disparity, tlRect *rect)
int setOffX (int offX)
int setOffY (int offY)
int setThreshold (int threshold)
int setNdisp (int ndisp)
int getOffX ()
int getThreshold ()
int getNdisp ()
virtual int readConfig (char *filename)
virtual int getRight (tlImage *image)
virtual int getRight (tlImage *image, tlRect *rect)
virtual int getDisparity (tlImage *disparity)
virtual int getDisparity (tlImage *disparity, tlRect *rect)
virtual int getDisparity (tlImage *rightImage, tlImage *leftImage, tlImage *disparity)
virtual int getDisparity (tlImage *leftImage, tlImage *rightImage, tlImage *disparity, tlRect *rect)
virtual int toWorld (tlLocation *location)
virtual int toWorld (tlLocation *location, tlLocation *dest)
virtual int toImage (tlLocation *location)
virtual int toImage (tlLocation *location, tlLocation *dest)
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 ()
int getWidth ()
int getHeight ()
int getID ()
tl_format getFormat ()

Constructor & Destructor Documentation

tlCameraSVS::tlCameraSVS (  ) 

Default constructor. Uses the default configuration file defined in TL_CAMERA_SVS_FILENAME.

Note:
See error management for details.

tlCameraSVS::tlCameraSVS ( char *  filename  ) 

Specifies which configuration file to use.

Note:
See error management for details.

tlCameraSVS::~tlCameraSVS (  )  [virtual]

Default destructor.

Note:
See error management for details.


Member Function Documentation

tlCameraSVS::getLeftSource (  )  [inline]

Get the image source corresponding to the left image sensor.

Returns:
A pointer to a valid tlSource.

tlCameraSVS::getRightSource (  )  [inline]

Get the image source corresponding to the right image sensor.

Returns:
A pointer to a valid tlSource.

int tlCameraSVS::setSource ( tlSource leftSource,
tlSource rightSource 
)

Specifies which image sources to use for image acquisition. Both image sources must be valid and ready to provide images via the grab() and grabQueued() methods.

Parameters:
leftSource valid pointer to a source corresponding to the left image sensor.
rightSource valid pointer to a source corresponding to the right image sensor.
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlCameraSVS::setLeftSource ( tlSource source  ) 

Specifies which image source to use for left image acquisition. Both image sources must be valid and ready to provide images via the grab() and grabQueued() methods.

Parameters:
source valid pointer to a source corresponding to the left image sensor.
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlCameraSVS::setRightSource ( tlSource source  ) 

Specifies which image source to use for right image acquisition. Both image sources must be valid and ready to provide images via the grab() and grabQueued() methods.

Parameters:
source valid pointer to a source corresponding to the right image sensor.
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlCameraSVS::grab ( tlImage image  )  [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 tlCameraSVSBase.

int tlCameraSVS::grab ( tlImage image,
tlRect rect 
) [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 tlCameraSVSBase.

int tlCameraSVS::grabQueued ( tlImage image  )  [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 tlCameraSVSBase.

int tlCameraSVS::grabQueued ( tlImage image,
tlRect rect 
) [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 tlCameraSVSBase.

int tlCameraSVS::grab ( tlImage image,
tlImage disparity 
) [virtual]

This method acquires a full image and the related disparity map. The image will have the size and format determined by the camera settings.

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

Implements tlCameraSVSBase.

int tlCameraSVS::grab ( tlImage image,
tlImage disparity,
tlRect rect 
) [virtual]

This method acquires a portion of an image and the related disparity map. The image will have the size and format determined by the camera settings, 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.
disparity [out] a valid image pointer that will receive the disparity map.
rect a valid image pointer to the portion of the image to acquire.
Returns:
0 on success, -1 otherwise.
See error management for details.

Implements tlCameraSVSBase.

int tlCameraSVS::grabQueued ( tlImage image,
tlImage disparity 
) [virtual]

This call acquires a full image and the related disparity map. The image will have the size and format determined by the camera settings.

Parameters:
image [out] a valid image pointer that will receive the image.
disparity [out] a valid image pointer that will receive the disparity map.
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
This method 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 tlCameraSVSBase.

int tlCameraSVS::grabQueued ( tlImage image,
tlImage disparity,
tlRect rect 
) [virtual]

This method acquires a portion of an image and the related disparity map. The image will have the size and format determined by the camera settings, 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.
disparity [out] a valid image pointer that will receive the disparity map.
rect a valid image pointer to the portion of the image to acquire.
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
This method 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 tlCameraSVSBase.

int tlCameraSVSBase::setOffX ( int  offX  )  [inherited]

Set the horopter offset in the SVS parameters structure.

Parameters:
offX horopter offset on X axis [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.
See also:
Read the SVS documentation for more information.

int tlCameraSVSBase::setOffY ( int  offY  )  [inherited]

Set the horopter offset in the SVS parameters structure.

Parameters:
offY horopter offset on Y axis [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.
See also:
Read the SVS documentation for more information.

int tlCameraSVSBase::setThreshold ( int  threshold  )  [inherited]

Set the confidence threshold in the SVS parameters structure.

Parameters:
threshold confidence threshold [arbitrary]
Returns:
0 on success, -1 otherwise.
See error management for details.
See also:
Read the SVS documentation for more information.

int tlCameraSVSBase::setNdisp ( int  ndisp  )  [inherited]

Set the number of disparities in the SVS parameters structure.

Parameters:
ndisp number of disparities [pix]
Returns:
0 on success, -1 otherwise.
See error management for details.
See also:
Read the SVS documentation for more information.

tlCameraSVSBase::getOffX (  )  [inline, inherited]

Get the horopter offset from the SVS parameters structure.

See also:
Read the SVS documentation for more information.

tlCameraSVSBase::getThreshold (  )  [inline, inherited]

Get the confidence threshold from the SVS parameters structure.

See also:
Read the SVS documentation for more information.

tlCameraSVSBase::getNdisp (  )  [inline, inherited]

Get the number of disparities to compute from the SVS parameters structure.

See also:
Read the SVS documentation for more information.

int tlCameraSVSBase::readConfig ( char *  filename  )  [virtual, inherited]

Read in the SVS calibration and parameters file.

Parameters:
filename configuration file name
Returns:
0 on success, -1 otherwise.
See error management for details.
See also:
Read the SVS documentation for more information.

Reimplemented in tlCameraSVSHead.

int tlCameraSVSBase::getRight ( tlImage image  )  [virtual, inherited]

This method returns the full image from the SVS right source acquired during the last grab() call. 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.

int tlCameraSVSBase::getRight ( tlImage image,
tlRect rect 
) [virtual, inherited]

This method returns a portion of the right image from the SVS right source acquired during the last grab() call. 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.

int tlCameraSVSBase::getDisparity ( tlImage disparity  )  [virtual, inherited]

This method computes a disparity map on the latest image set acquired by grab. The disparity map will have the size and format determined by the camera settings.

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

Implements tlCameraStereo.

int tlCameraSVSBase::getDisparity ( tlImage disparity,
tlRect rect 
) [virtual, inherited]

This method computes a partial disparity map on the latest image set acquired by grab. The disparity map will have the size and format determined by the camera settings, but only the portion defined by the rect argument will contain valid pixel values.

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

Implements tlCameraStereo.

int tlCameraSVSBase::getDisparity ( tlImage leftImage,
tlImage rightImage,
tlImage disparity 
) [virtual, inherited]

This method computes the disparity map from two images. The images are supposed to have been acquired by the same tlCameraStereo object. The disparity map will have the size and format determined by the camera settings.

Parameters:
leftImage a pointer to an image taken from the left imager.
rightImage a pointer to an image taken from the right imager.
disparity [out] a valid image pointer that will receive the disparity map.
Returns:
0 on success, -1 otherwise.
See error management for details.

Implements tlCameraStereo.

int tlCameraSVSBase::getDisparity ( tlImage leftImage,
tlImage rightImage,
tlImage disparity,
tlRect rect 
) [virtual, inherited]

Todo:
make it effectively compute within rect only

Implements tlCameraStereo.

int tlCameraSVSBase::toWorld ( tlLocation location  )  [virtual, inherited]

This method computes the 3D coordonates in the world frame of a given location, given the stereo camera calibration settings. The input location is defined by its x,y position in the image frame and a disparity value. The resulting world coordonates are written in the corresponding location fields.

Parameters:
location [int/out] location to convert
Returns:
0 on success, -1 otherwise.
See error management for details.

Implements tlCameraStereo.

int tlCameraSVSBase::toWorld ( tlLocation location,
tlLocation dest 
) [virtual, inherited]

This method computes the 3D coordonates in the world frame of a given location, given the stereo camera calibration settings. The input location is defined by its x,y position in the image frame and a disparity value. The resulting world coordonates are written in the dest location; image coordonates in dest are updated accordingly.

Parameters:
location location to convert
dest [out] resulting location (in both image and world frame)
Returns:
0 on success, -1 otherwise.
See error management for details.

Implements tlCameraStereo.

int tlCameraSVSBase::toImage ( tlLocation location  )  [virtual, inherited]

This method computes the coordonates in the image frame and disparity of a given location, given the stereo camera calibration settings. The input location is defined by its wx,wy,wz position in the world frame. The resulting image coordonates are written in the corresponding location fields.

Parameters:
location [int/out] location to convert
Returns:
0 on success, -1 otherwise.
See error management for details.

Implements tlCameraStereo.

int tlCameraSVSBase::toImage ( tlLocation location,
tlLocation dest 
) [virtual, inherited]

This method computes the coordonates in the image frame and disparity of a given location, given the stereo camera calibration settings. The input location is defined by its wx,wy,wz position in the world frame. The resulting image coordonates are written in the dest location; world coordonates in dest are updated accordingly.

Parameters:
location location to convert
dest [out] resulting location (in both image and world frame)
Returns:
0 on success, -1 otherwise.
See error management for details.

Implements tlCameraStereo.

int tlCamera::setPosition ( int  Tx,
int  Ty,
int  Tz 
) [inherited]

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 
) [inherited]

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, inherited]

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

Returns:
True if camera is calibrated,
False otherwise.

tlCamera::getTx (  )  [inline, inherited]

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

Returns:
The camera position in X.

tlCamera::getTy (  )  [inline, inherited]

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

Returns:
The camera position in Y.

tlCamera::getTz (  )  [inline, inherited]

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

Returns:
The camera position in Z.

tlCamera::getRx (  )  [inline, inherited]

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

Returns:
The camera orientation around X.

tlCamera::getRy (  )  [inline, inherited]

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

Returns:
The camera orientation around Y.

tlCamera::getRz (  )  [inline, inherited]

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

Returns:
The camera orientation around Z.

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.