Triclops SDK
4.0.3.0
Functions
Internal buffers manipulation functions

Functions

enum TriclopsError triclopsSetColorImageBuffer (TriclopsContext context, TriclopsCamera camera, TriclopsColorPixel *buffer)
 Allows the user to set the buffer to which the processed 32-bit color image is written to. More...
 
enum TriclopsError triclopsSetImage16Buffer (TriclopsContext context, unsigned short *buffer, TriclopsImage16Type imageType, TriclopsCamera camera)
 Sets the internal image buffer where 16-bit disparity images are written. More...
 
enum TriclopsError triclopsSetImageBuffer (TriclopsContext context, unsigned char *buffer, TriclopsImageType imageType, TriclopsCamera camera)
 Sets the internal image buffer for the specified camera and image type to be the buffer supplied by the user. More...
 
enum TriclopsError triclopsUnsetColorImageBuffer (TriclopsContext context, TriclopsCamera camera)
 Releases the user specified internal color image buffer for the specified camera. More...
 
enum TriclopsError triclopsUnsetImage16Buffer (TriclopsContext context, TriclopsImage16Type imageType, TriclopsCamera camera)
 Releases the 16-bit user internal buffer for the specific camera and image type. More...
 
enum TriclopsError triclopsUnsetImageBuffer (TriclopsContext context, TriclopsImageType imageType, TriclopsCamera camera)
 Releases the user specified internal buffer for the specific camera and image type. More...
 

Detailed Description

Triclops provides functions to manage internal image buffers where to store images resulting from processing (i.e. rectified, edge and disparity images). These buffers are an alternative to those managed internally by the context. It will be the user-s responsability to allocate sufficient memory for the buffer, and to de-allocate the buffer after it is no longer needed.

Function Documentation

enum TriclopsError triclopsSetColorImageBuffer ( TriclopsContext  context,
TriclopsCamera  camera,
TriclopsColorPixel buffer 
)

Allows the user to set the buffer to which the processed 32-bit color image is written to.

This function allows the user to set the location to which 32-bit color images are written to once they are processed. Color images are associated to Disparity images are always associated with the reference camera. If the user has already called SetColorImageBuffer() for a particular camera and image type, the stereo kernel will be using that buffer for internal processing. If the user no longer wants to have the supplied buffer used by the stereo kernel, he/she can call triclopsUnsetColorImageBuffer() to inform the stereo kernel that it is no longer available.

Parameters
contextThe context to set the 32-bit color buffer in.
cameraThe sensor for which to set the buffer
bufferA pointer to a user allocated buffer of sufficient size.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidCameraThe requested camera is invalid or cannot be associated to this buffer type
TriclopsErrorInvalidResolutionThe requested output resolution is invalid (i.e. either dimension is smaller than 1)
See also
triclopsGetImage()
triclopsUnsetColorImageBuffer()
enum TriclopsError triclopsSetImage16Buffer ( TriclopsContext  context,
unsigned short *  buffer,
TriclopsImage16Type  imageType,
TriclopsCamera  camera 
)

Sets the internal image buffer where 16-bit disparity images are written.

This function allows the user to set the location to which 16-bit (with subpixel interpolation) depth images are written to once they are processed. Disparity images are always associated with the reference camera. If the user has already called triclopsSetImage16Buffer() for a particular camera and image type, the stereo kernel will be using that buffer for internal processing. If the user no longer wants to have the supplied buffer used by the stereo kernel, he/she can call triclopsUnsetImage16Buffer() to inform the stereo kernel that it is no longer available.

Parameters
contextThe context to set the 16-bit buffer in.
bufferA pointer to a user allocated buffer of sufficient size.
imageTypeThe type of image to be written to the buffer.
cameraThe camera to write from.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidCameraThe requested camera is invalid or is not equal to the reference image.
TriclopsErrorInvalidImageTypeThe requested image type is invalid or cannot be associated to the 16-bit buffers.
TriclopsErrorInvalidResolutionThe requested output resolution is invalid (i.e. either dimension is smaller than 1)
See also
triclopsGetImage()
triclopsUnsetImage16Buffer()
enum TriclopsError triclopsSetImageBuffer ( TriclopsContext  context,
unsigned char *  buffer,
TriclopsImageType  imageType,
TriclopsCamera  camera 
)

Sets the internal image buffer for the specified camera and image type to be the buffer supplied by the user.

This function allows the user to specify directly what memory he/she wishes the output images to be deposited into. This memory will be used by the stereo kernel as working space. This has the advantage of saving a copy for tasks such as displaying to the screen. The user may simply set the output image buffer to his/her display buffer. However, since this memory will be used by the stereo kernel as working space, the contents of the buffer may change with each call of triclopsRecify() or triclopsStereo(). If the results are to be saved, it is the user's responsibility to do so. In addition, the user is responsible to allocate sufficient memory for the buffer, and to de-allocate the buffer after it is no longer needed. If the user has already called triclopsSetImageBuffer() for a particular camera and image type, the stereo kernel will be using that buffer for internal processing. If the user no longer wants to have the supplied buffer used by the stereo kernel, he/she can call triclopsUnsetImageBuffer() to inform the stereo kernel that it is no longer available.

Parameters
contextThe input context to set the buffer in
bufferA pointer to a user allocated buffer of sufficient size.
imageTypeThe image type.
cameraThe camera to which associate the raw image originated.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidCameraThe requested camera is invalid or cannot be associated to this buffer type
TriclopsErrorInvalidImageTypeThe requested image type is invalid or buffers cannot be associated to the requested image type
TriclopsErrorInvalidResolutionThe requested output resolution is invalid (i.e. either dimension is smaller than 1)
See also
triclopsGetImage()
triclopsUnsetImageBuffer()
enum TriclopsError triclopsUnsetColorImageBuffer ( TriclopsContext  context,
TriclopsCamera  camera 
)

Releases the user specified internal color image buffer for the specified camera.

If the user no longer wants to have the supplied buffer used by the stereo kernel, he/she can call use this function to inform the stereo kernel that it is no longer available. A new buffer will be created for internal use, replacing the specified buffer. The user should call this function before de-allocating the buffer.

Parameters
contextThe input context to be informed the specified buffer is no longer available.
cameraThe camera
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidCameraThe requested camera is invalid or is not equal to the reference image.
TriclopsErrorInvalidResolutionThe requested output resolution is invalid (i.e. either dimension is smaller than 1)
Returns
TriclopsErrorBadMemoryAllocation The system returned an allocation error while requesting memory for the corresponding internal buffer
See also
triclopsGetImage()
triclopsSetColorImageBuffer()
enum TriclopsError triclopsUnsetImage16Buffer ( TriclopsContext  context,
TriclopsImage16Type  imageType,
TriclopsCamera  camera 
)

Releases the 16-bit user internal buffer for the specific camera and image type.

If the user no longer wants to have the supplied buffer used by the stereo kernel, he/she can call use this function to inform the stereo kernel that it is no longer available. A new buffer will be created for internal use, replacing the specified buffer. The user should call this function before de-allocating the buffer.

Parameters
contextThe input context to be infomed the specified buffer is no longer available.
imageTypeThe image type.
cameraThe camera
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidCameraThe requested camera is invalid or is not equal to the reference image.
TriclopsErrorInvalidImageTypeThe requested image type is invalid or cannot be associated to the 16-bit buffers.
TriclopsErrorInvalidResolutionThe requested output resolution is invalid (i.e. either dimension is smaller than 1)
See also
triclopsGetImage()
triclopsSetImage16Buffer()
enum TriclopsError triclopsUnsetImageBuffer ( TriclopsContext  context,
TriclopsImageType  imageType,
TriclopsCamera  camera 
)

Releases the user specified internal buffer for the specific camera and image type.

If the user no longer wants to have the supplied buffer used by the stereo kernel, he/she can call this function to inform the stereo kernel that it is no longer available. A new buffer will be created for internal use, replacing the specified buffer. The user should call this function before de-allocating the buffer.

Parameters
contextThe input context to be informed the specified buffer is no longer available.
imageTypeThe image type.
cameraThe camera to which associate the raw image originated.
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidCameraThe input camera is invalid
TriclopsErrorInvalidImageTypeThe requested image type is invalid or buffers cannot be associated to the requested image type
TriclopsErrorInvalidResolutionThe requested output resolution is invalid (i.e. either dimension is smaller than 1)
Returns
TriclopsErrorBadMemoryAllocation The system returned an allocation error while requesting memory for the corresponding internal buffer
See also
triclopsGetImage()
triclopsSetImageBuffer()
Contact Support Triclops SDK Programmer's Guide and API Reference