Triclops SDK
4.0.3.0
Functions
Aspect ratio functions

Functions

enum TriclopsError triclopsGetCalAspectRatio (const TriclopsContext context, float *aspectRatio)
 Retrieves the aspect ratio of the calibrated camera. More...
 
enum TriclopsError triclopsGetOptimalNumColumns (const TriclopsContext context, int nrows, int *ncols)
 Determines the optimal number of columns. More...
 
enum TriclopsError triclopsGetOptimalNumRows (const TriclopsContext context, int ncols, int *nrows)
 Determines the optimal number of rows. More...
 

Detailed Description

Output images can have an arbitrary aspect ratio. The output size and aspect ratio are requested by setting the output resolution (

See also
triclopsSetResolution() ). However, cameras are calibrated with a fixed aspect ratio. Therefore rectification is carried out by using an internal image with the same aspect ratio as that of the calibrated camera. The size of the internal image is determined to contain centrally the requested output size. An output image structure, with the requested aspect ratio, will be constructed by shallow copy from the internal image.

Function Documentation

enum TriclopsError triclopsGetCalAspectRatio ( const TriclopsContext  context,
float *  aspectRatio 
)

Retrieves the aspect ratio of the calibrated camera.

This function retrieves the aspect ratio ( the number of columns to rows ratio) of the calibrated camera.

Parameters
contextThe context which to retrieve the aspect ratio value from.
aspectRatioA pointer to the location containing the retrieved value of the aspect ratio.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe provided context is invalid
enum TriclopsError triclopsGetOptimalNumColumns ( const TriclopsContext  context,
int  nrows,
int *  ncols 
)

Determines the optimal number of columns.

This function determines the optimal number of rectified cols as a function of the expected number of rows of the rectified image and the aspect ratio of the calibrated camera.

Parameters
contextThe context which to retrieve the aspect ratio value from.
nrowsThe chosen height of the resulting image
ncolsThe width computed using the camera's optimal aspect ratio and the given height
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe provided context is invalid
See also
triclopsGetCalAspectRatio()
triclopsGetOptimalNumRows()
enum TriclopsError triclopsGetOptimalNumRows ( const TriclopsContext  context,
int  ncols,
int *  nrows 
)

Determines the optimal number of rows.

This function determines the optimal number of rectified rows as a function of the expected number of columns of the rectified image and the aspect ratio of the calibrated camera.

Parameters
contextThe context which to retrieve the aspect ratio from.
ncolsThe chosen width of the resulting image
nrowsThe height computed using the camera's optimal aspect ratio and the given width
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully.
TriclopsInvalidContextThe provided context is invalid
See also
triclopsGetCalAspectRatio()
triclopsGetOptimalNumColumns()
Contact Support Triclops SDK Programmer's Guide and API Reference