Public Member Functions | |
tlCameraTSAI () | |
tlCameraTSAI (tlSource *source) | |
tlCameraTSAI (char *filename) | |
tlCameraTSAI (char *filename, tlSource *source) | |
virtual | ~tlCameraTSAI () |
int | readConfig (char *filename) |
int | writeConfig (char *filename) |
int | calibrate (tlCameraTSAICalibData *data) |
int | setSource (tlSource *source) |
tlSource * | getSource () |
int | toWorld (tlPoint *point) |
int | toImage (tlPoint *point) |
virtual int | warp (tlPoint *point) |
virtual int | warp (tlPoint *point, tlPoint *dest) |
virtual int | dewarp (tlPoint *point) |
virtual int | dewarp (tlPoint *point, tlPoint *dest) |
virtual int | warp (tlImage *image) |
virtual int | warp (tlImage *image, tlImage *dest) |
virtual int | dewarp (tlImage *image) |
virtual int | dewarp (tlImage *image, tlImage *dest) |
virtual int | warp (tlImage *image, tlRect *rect) |
virtual int | warp (tlImage *image, tlRect *rect, tlImage *dest) |
virtual int | dewarp (tlImage *image, tlRect *rect) |
virtual int | dewarp (tlImage *image, tlRect *rect, tlImage *dest) |
virtual int | grab (tlImage *image) |
virtual int | grab (tlImage *image, tlRect *rect) |
virtual int | grabQueued (tlImage *image) |
virtual int | grabQueued (tlImage *image, tlRect *rect) |
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 () |
tlCameraTSAI::tlCameraTSAI | ( | ) |
Default constructor. Uses the defaults file specified in TL_CAMERA_TSAI_FILENAME, or no calibration if file does not exist.
tlCameraTSAI::tlCameraTSAI | ( | tlSource * | source | ) |
Specify an image source to use with these calibration settings. The source must be valid and ready to provide images via the grab() or grabQueued() methods.
source | a valid pointer to an image source. |
tlCameraTSAI::tlCameraTSAI | ( | char * | filename | ) |
Specify a calibration configuration file to read from.
filename | calibration configuration file |
tlCameraTSAI::tlCameraTSAI | ( | char * | filename, | |
tlSource * | source | |||
) |
Read calibration data from a given file and specify an image source to use with these calibration settings. The source must be valid and ready to provide images via the grab() or grabQueued() methods.
source | a valid pointer to an image source. | |
filename | calibration configuration file. |
tlCameraTSAI::~tlCameraTSAI | ( | void | ) | [virtual] |
int tlCameraTSAI::readConfig | ( | char * | filename | ) |
Read calibration configuration from a given filename.
filename | calibration configuration file. |
int tlCameraTSAI::writeConfig | ( | char * | filename | ) |
Write calibration configuration to a given filename.
filename | calibration configuration file. |
int tlCameraTSAI::calibrate | ( | tlCameraTSAICalibData * | data | ) |
Perform TSAI calibration given a set of data. See TSAI calibration for more information on how to perform TSAI camera calibration.
data | a pointer to the calibration data structure |
int tlCameraTSAI::setSource | ( | tlSource * | source | ) |
Specify an image source to use with these calibration settings. The source must be valid and ready to provide images via the grab() or grabQueued() methods.
source | a valid pointer to an image source. |
tlCameraTSAI::getSource | ( | ) | [inline] |
Return a pointer to the image source connected to this camera.
int tlCameraTSAI::toWorld | ( | tlPoint * | point | ) |
This routine performs an inverse perspective projection to determine the position of a point in world coordinates that corresponds to a given position in image coordinates. To constrain the inverse projection to a single point the routine requires a Z world coordinate for the point in addition to the X and Y image coordinates.
point | the point to apply the transform to. Members x,y and wz are used as input, output is placed in members wx,wy. |
int tlCameraTSAI::toImage | ( | tlPoint * | point | ) |
This routine takes the position of a point in world coordinates [mm] and determines the position of its image in image coordinates [pix].
point | the point to apply the transform to. Members wx,wy,wz are used as input, output is placed in members x,y. |
int tlCameraTSAI::warp | ( | tlPoint * | point | ) | [virtual] |
Warp point for the given camera. That is, return the distorted coordinate for a point in a calibrated image given the calibration settings.
point | the point to project |
Warp point for the given camera. That is, return the distorted coordinate for a point in a calibrated image given the calibration settings. The result is placed in another image.
point | the point to project | |
dest | [out] the point that will contain the undistorted coordinates |
int tlCameraTSAI::dewarp | ( | tlPoint * | point | ) | [virtual] |
Unwarp point for the given camera. That is, return the undistorted coordinate for a point in the image given the calibration settings.
point | the point to project |
Unwarp point for the given camera. That is, return the undistorted coordinate for a point in the image given the calibration settings. The result is placed in another point.
point | the point to project | |
dest | [out] the point that will contain the undistorted coordinates |
int tlCameraTSAI::warp | ( | tlImage * | image | ) | [virtual] |
Warp an image for the given camera. That is, return the distorted image given the calibration settings.
image | the image to project |
Warp an image for the given camera. That is, return the distorted image given the calibration settings. The result is placed in another image.
image | the image to project | |
dest | [out] projection result |
int tlCameraTSAI::dewarp | ( | tlImage * | image | ) | [virtual] |
Unwarp an image for the given camera. That is, return the undistorted image given the calibration settings.
image | the image to project |
Unwarp an image for the given camera. That is, return the undistorted image given the calibration settings. The result is placed in another image.
image | the image to project | |
dest | [out] projection result |
Warp a portion of an image for the given camera. That is, return the distorted image given the calibration settings.
image | the image to project | |
rect | portion of the image to project |
Warp a portion of an image for the given camera. That is, return the distorted image given the calibration settings. The result is placed in another image.
image | the image to project | |
rect | portion of the image to project | |
dest | [out] projection result |
Unwarp a portion of an image for the given camera. That is, return the undistorted image given the calibration settings.
image | the image to project | |
rect | portion of the image to project |
Unwarp a portion of an image for the given camera. That is, return the undistorted image given the calibration settings. The result is placed in another image.
image | the image to project | |
rect | portion of the image to project | |
dest | [out] projection result |
int tlCameraTSAI::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.
image | [out] a valid image pointer that will receive the image. |
Implements tlCamera.
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.
image | [out] a valid image pointer that will receive the image. | |
rect | a pointer to the portion of the image to acquire. |
Implements tlCamera.
int tlCameraTSAI::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.
image | [out] a valid image pointer that will receive the image. |
Implements tlCamera.
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.
image | [out] a valid image pointer that will receive the image. | |
rect | a pointer to the portion of the image to acquire. |
Implements tlCamera.
int tlCamera::setPosition | ( | int | Tx, | |
int | Ty, | |||
int | Tz | |||
) | [inherited] |
Set the camera position in the workspace.
Tx | camera position on the X axis. | |
Ty | camera position on the Y axis. | |
Tz | camera position on the Z axis. |
int tlCamera::setOrientation | ( | int | Rx, | |
int | Ry, | |||
int | Rz | |||
) | [inherited] |
Set the camera orientation in the workspace.
Rx | camera orientation around the X axis. | |
Ry | camera orientation around the Y axis. | |
Rz | camera orientation around the Z axis. |
tlCamera::isCalibrated | ( | ) | [inline, inherited] |
Check whether the camera returns calibrated (undistorted) images or not.
tlCamera::getTx | ( | ) | [inline, inherited] |
Get the position of the camera on the X axis of the workspace.
tlCamera::getTy | ( | ) | [inline, inherited] |
Get the position of the camera on the Y axis of the workspace.
tlCamera::getTz | ( | ) | [inline, inherited] |
Get the position of the camera on the Z axis of the workspace.
tlCamera::getRx | ( | ) | [inline, inherited] |
Get the orientation of the camera around the X axis of the workspace.
tlCamera::getRy | ( | ) | [inline, inherited] |
Get the orientation of the camera around the X axis of the workspace.
tlCamera::getRz | ( | ) | [inline, inherited] |
Get the orientation of the camera around the X axis of the workspace.
tlSource::getWidth | ( | ) | [inline, inherited] |
Returns the width of the image source. Any image acquired through this tlSource object will have the current width.
tlSource::getHeight | ( | ) | [inline, inherited] |
Returns the height of the image source. Any image acquired through this tlSource object will have the current height.
tlSource::getID | ( | ) | [inline, inherited] |
Return a unique identifier for this source. Identifiers are allocated dynamically and are only valid during application run-time.
tlSource::getFormat | ( | ) | [inline, inherited] |