Triclops SDK
4.0.3.0
Functions
Rectification configuration functions

Functions

enum TriclopsError triclopsGetResolution (const TriclopsContext context, int *nrows, int *ncols)
 Retrieves the output resolution. More...
 
enum TriclopsError triclopsGetRoi (TriclopsContext context, TriclopsROI *roi)
 Retrieves the region of interest. More...
 
enum TriclopsError triclopsGetRoiOn (TriclopsContext context, TriclopsBool *roiOn)
 Retrieves the state of the rectification in a region of interest. More...
 
enum TriclopsError triclopsGetSourceResolution (const TriclopsContext context, int *nSrcRows, int *nSrcCols)
 Retrieves the current resolution for raw images. More...
 
enum TriclopsError triclopsPrepareRectificationData (TriclopsContext context, int nrows, int ncols, int nInputRows, int nInputCols)
 Sets the resolution of the resultant images and prepare data for rectrification. More...
 
enum TriclopsError triclopsSetResolution (TriclopsContext context, int nrows, int ncols)
 Sets the resolution of the resultant images. This includes rectified, disparity and edge images. More...
 
enum TriclopsError triclopsSetRoi (TriclopsContext context, TriclopsROI roi)
 Sets the region of interest. More...
 
enum TriclopsError triclopsSetRoiOn (TriclopsContext context, TriclopsBool roiOn)
 Enables rectification in a region of interest. More...
 
enum TriclopsError triclopsSetSourceResolution (TriclopsContext context, int nSrcRows, int nSrcCols)
 Sets the resolution of the raw images that the library will be processing later. More...
 

Detailed Description

Triclops provides functions to prepare to and control image rectification using a calibrated camera. These functions are configured and controlled through specific parameters.

Function Documentation

enum TriclopsError triclopsGetResolution ( const TriclopsContext  context,
int *  nrows,
int *  ncols 
)

Retrieves the output resolution.

This function retrieves the resolution of the resultant images. This includes rectified, disparity and edge images.

Parameters
contextThe context.
nrowsA pointer to the retrieved number of rows in the output images.
ncolsA pointer to the retrieved number of columns in the output images.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe input context is invalid.
See also
triclopsSetResolution()
triclopsGetSourceResolution()
enum TriclopsError triclopsGetRoi ( TriclopsContext  context,
TriclopsROI roi 
)

Retrieves the region of interest.

This function retrives the region of interest (ROI) where rectification is carried out.

Parameters
contextThe input context.
roiA pointer to a ROI structure that will store the current region of interest.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe input context is invalid.
TriclopsErrorInvalidSettingOne of the elements composing the ROI structure is negative or equal to zero.
See also
triclopsSetRoi()
enum TriclopsError triclopsGetRoiOn ( TriclopsContext  context,
TriclopsBool roiOn 
)

Retrieves the state of the rectification in a region of interest.

Parameters
contextThe input context.
roiOnA pointer to a Boolean that will store the current setting.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe input context is invalid.
See also
triclopsSetRoiOn()
enum TriclopsError triclopsGetSourceResolution ( const TriclopsContext  context,
int *  nSrcRows,
int *  nSrcCols 
)

Retrieves the current resolution for raw images.

Parameters
contextThe context.
nSrcRowsA pointer to the retrieved number of rows in the raw images.
nSrcColsA pointer to the retrieved number of columns in the raw images.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe input context is invalid.
See also
triclopsSetSourceResolution()
triclopsGetResolution()
enum TriclopsError triclopsPrepareRectificationData ( TriclopsContext  context,
int  nrows,
int  ncols,
int  nInputRows,
int  nInputCols 
)

Sets the resolution of the resultant images and prepare data for rectrification.

This function sets the desired resolution of the output images and also immediately constructs the rectification tables. For large images, the construction of the rectification can take a while. This function allows you to control when the construction takes place, otherwise it will occur during the first call to triclopsRectify(). The resolution of the input images must be specified at this time, as this is necessary for the construction of the tables. The output images include the rectified, disparity and edge images. For feature based stereo application where rectification of the entire image is not needed, one should call triclopsSetResolution() and triclopsSetSourceResolution() only (these are much simpler functions), and then simply proceeds to call triclopsRectifyPixel() and triclopsUnrectifyPixel() for the small set of feature pixels needed.

Parameters
contextThe input context.
nrowsThe number of rows in the output images.
ncolsThe number of columns in the output images.
nInputRowsThe number of rows in the input images.
nInputColsThe number of columns in the input images.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe provided context is either invalid or contains one or more invalid rectification warpers
TriclopsErrorInvalidSourceResolutionThe resolution of the provided source is invalid (i.e. either dimension is smaller than 1)
TriclopsErrorInvalidResolutionThe requested output resolution is invalid (i.e. either dimension is smaller than 1)
TriclopsErrorExceedMaxNumberOutputColumnsThe number of columns for the output resolution exceeds the maximum limit
TriclopsErrorInvalidROIThe ROI requested is either invalid or is not completely overlapped with the source image
TriclopsErrorRoiAndOutputAspectRatioMismatchThe aspect ratio of the requested ROI and the requested output are different
TriclopsErrorInvalidInternalSettingOne of the internal settings used for the generation of the rectification warpers is not valid.
TriclopsErrorBadMemoryAllocationThe system returned an allocation error while creating one of the internal buffers (i.e. Edge or Rectified buffers) or while requesting more memory for rectification warpers
TriclopsErrorGenerationRectifyDataAn error occurred when generating data for rectification
See also
triclopsSetResolution()
triclopsSetSourceResolution(),
triclopsGetResolution()
triclopsGetSourceResolution()
triclopsSetRectify()
enum TriclopsError triclopsSetResolution ( TriclopsContext  context,
int  nrows,
int  ncols 
)

Sets the resolution of the resultant images. This includes rectified, disparity and edge images.

Parameters
contextThe input context.
nrowsThe number of rows in the output images.
ncolsThe number of columns in the output images.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe input context is invalid.
TriclopsErrorInvalidResolutionThe resolution is composed of one or more negative numbers.
TriclopsErrorExceedMaxNumberOutputColumnsThe number of columns exceeds the maximum limit.
See also
triclopsGetResolution()
enum TriclopsError triclopsSetRoi ( TriclopsContext  context,
TriclopsROI  roi 
)

Sets the region of interest.

This function sets the region of interest (ROI) where rectification is carried out. One ROI is drawn in the rectified space for each calibrated lens. The resolution of this calibrated space is equal to the source resolution. ROI processing is not enabled calling this function, but triclopsSetRoiOn() has to be called.

Parameters
contextThe input context.
roiThe input region of interest.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe input context is invalid.
TriclopsErrorInvalidSettingThe provided ROI has one or more invalid internal values.
See also
triclopsGetRoi()
triclopsSetRoiOn()
enum TriclopsError triclopsSetRoiOn ( TriclopsContext  context,
TriclopsBool  roiOn 
)

Enables rectification in a region of interest.

This function enables rectification in a region of interest (ROI) rather than in the entire image. The ROI is defined calling triclopsSetRoi().

Parameters
contextThe input context.
roiOnA Boolean indicating whether rectification in a ROI should be turned on or off.
Returns
An error code representing the outcome of the function.
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe input context is invalid.
See also
triclopsSetRoi()
triclopsGetRoiOn()
enum TriclopsError triclopsSetSourceResolution ( TriclopsContext  context,
int  nSrcRows,
int  nSrcCols 
)

Sets the resolution of the raw images that the library will be processing later.

This function sets the expected resolution of the raw images. This function is provided primarily to support feature based stereo application where one is expected to make direct calls to triclopsRectifyPixel() and triclopsUnrectifyPixel() on a point by point basis. For regular stereo application where an entire image will be rectified every time, the application should use triclopsPrepareRectificationData() which in addition to setting up both the source and rectification resolution, it also creates the rectification table to speed up the full image rectification calls.

Parameters
contextThe context
nSrcRowsThe number of rows in the raw images.
nSrcColsThe number of columns in the raw images.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe input context is invalid.
TriclopsInvalidSourceResolutionThe number of rows or columns is a negative number.
See also
triclopsGetSourceResolution()
triclopsRectifyPixel()
triclopsUnrectifyPixel()
triclopsPrepareRectificationData()
Contact Support Triclops SDK Programmer's Guide and API Reference