Functions for managing data received from callbacks.
More...
Functions |
| TangoErrorType | TangoSupport_createImageBufferManager (TangoImageFormatType format, int width, int height, TangoSupport_ImageBufferManager **manager) |
| | Create an object for maintaining a set of image buffers for a specified image format and size.
|
| TangoErrorType | TangoSupport_freeImageBufferManager (TangoSupport_ImageBufferManager *manager) |
| | Delete the image buffer manager object.
|
| TangoErrorType | TangoSupport_getLatestImageBuffer (TangoSupport_ImageBufferManager *manager, TangoImageBuffer **image_buffer) |
| | Check if updated color image data is available. If so, swap new data to the front buffer and set image_buffer to point to the front buffer. Multiple calls to this function must be made from the same thread.
|
| TangoErrorType | TangoSupport_getLatestImageBufferAndNewDataFlag (TangoSupport_ImageBufferManager *manager, TangoImageBuffer **image_buffer, bool *new_data) |
| | Check if updated color image data is available. If so, swap new data to the front buffer and set image_buffer to point to the front buffer. Multiple calls to this function must be made from the same thread. Set new_data to true when image_buffer points to new data.
|
| TangoErrorType | TangoSupport_setImageBufferCopyRegion (TangoSupport_ImageBufferManager *manager, int y_only, uint32_t begin_line, uint32_t end_line) |
| | Limit copying of the incoming image to a specific range of scan lines.
|
| TangoErrorType | TangoSupport_updateImageBuffer (TangoSupport_ImageBufferManager *manager, const TangoImageBuffer *image_buffer) |
| | Updates the back buffer of the manager with new data from the callback. This should be called from the image callback thread.
|
Detailed Description
Functions for managing data received from callbacks.
Function Documentation
Create an object for maintaining a set of image buffers for a specified image format and size.
- Parameters:
-
| format | The format of the color camera image. |
| width | The width in pixels of the color images. |
| height | The height in pixels of the color images. |
| manager | A handle to the manager object. |
- Returns:
TANGO_SUCCESS if allocation was successful; TANGO_INVALID if manager is NULL.
Delete the image buffer manager object.
- Parameters:
-
| manager | A handle to the manager to delete. |
- Returns:
TANGO_SUCCESS if memory was freed successfully; TANGO_INVALID otherwise.
Check if updated color image data is available. If so, swap new data to the front buffer and set image_buffer to point to the front buffer. Multiple calls to this function must be made from the same thread.
- Parameters:
-
| manager | A handle to the image buffer manager. |
| image_buffer | After the call contains a pointer to the most recent camera image buffer. |
- Returns:
- Returns
TANGO_SUCCESS if params are valid. Returns TANGO_INVALID otherwise.
Check if updated color image data is available. If so, swap new data to the front buffer and set image_buffer to point to the front buffer. Multiple calls to this function must be made from the same thread. Set new_data to true when image_buffer points to new data.
- Parameters:
-
| manager | A handle to the image buffer manager. |
| image_buffer | After the call contains a pointer to the most recent camera image buffer. |
| new_data | True if latest_point_cloud points to new data. False otherwise. |
- Returns:
- Returns
TANGO_SUCCESS if params are valid. Returns TANGO_INVALID otherwise.
Limit copying of the incoming image to a specific range of scan lines.
This is an optimization when only a portion of the image is required. For the begin_line and end_line parameters, the following must be true:
0 <= begin_line <= end_line <= (image_height - 1)
- Parameters:
-
| manager | A handle to the image buffer manager. |
| y_only | If non-zero and the image is YUV, copy only the Y-portion (grayscale intensities) of the image. If zero, copy Y and UV portions. |
| begin_line | The first scan line row to copy. Must be less than end_line. |
| end_line | The last scan line row to copy. Must be greater than begin_line and smaller than the image height. |
- Returns:
TANGO_SUCCESS if copy region was updated successfully, or TANGO_INVALID if the preconditions are not satisfied.
Updates the back buffer of the manager with new data from the callback. This should be called from the image callback thread.
- Parameters:
-
| manager | A handle to the image buffer manager. |
| image_buffer | New image buffer data from the camera callback thread. |
- Returns:
- Returns
TANGO_SUCCESS on update of the back image buffer. Returns TANGO_INVALID otherwise.