Azure Kinect Sensor SDK  refs/heads/master
Documentation for https://github.com/Microsoft/Azure-Kinect-Sensor-SDK
k4a_image_t Class Reference

Handle to an Azure Kinect image. More...

#include <k4a/k4a.h>

Related Functions

(Note that these are not member functions.)

k4a_result_t k4a_image_create (k4a_image_format_t format, int width_pixels, int height_pixels, int stride_bytes, k4a_image_t *image_handle)
 Create an image. More...
 
k4a_result_t k4a_image_create_from_buffer (k4a_image_format_t format, int width_pixels, int height_pixels, int stride_bytes, uint8_t *buffer, size_t buffer_size, k4a_memory_destroy_cb_t *buffer_release_cb, void *buffer_release_cb_context, k4a_image_t *image_handle)
 Create an image from a pre-allocated buffer. More...
 
uint8_t * k4a_image_get_buffer (k4a_image_t image_handle)
 Get the image buffer. More...
 
size_t k4a_image_get_size (k4a_image_t image_handle)
 Get the image buffer size. More...
 
k4a_image_format_t k4a_image_get_format (k4a_image_t image_handle)
 Get the format of the image. More...
 
int k4a_image_get_width_pixels (k4a_image_t image_handle)
 Get the image width in pixels. More...
 
int k4a_image_get_height_pixels (k4a_image_t image_handle)
 Get the image height in pixels. More...
 
int k4a_image_get_stride_bytes (k4a_image_t image_handle)
 Get the image stride in bytes. More...
 
K4A_DEPRECATED_EXPORT uint64_t k4a_image_get_timestamp_usec (k4a_image_t image_handle)
 Get the image's device timestamp in microseconds. More...
 
uint64_t k4a_image_get_device_timestamp_usec (k4a_image_t image_handle)
 Get the image's device timestamp in microseconds. More...
 
uint64_t k4a_image_get_system_timestamp_nsec (k4a_image_t image_handle)
 Get the image's system timestamp in nanoseconds. More...
 
uint64_t k4a_image_get_exposure_usec (k4a_image_t image_handle)
 Get the image exposure in microseconds. More...
 
uint32_t k4a_image_get_white_balance (k4a_image_t image_handle)
 Get the image white balance. More...
 
uint32_t k4a_image_get_iso_speed (k4a_image_t image_handle)
 Get the image ISO speed. More...
 
void k4a_image_set_device_timestamp_usec (k4a_image_t image_handle, uint64_t timestamp_usec)
 Set the device time stamp, in microseconds, of the image. More...
 
K4A_DEPRECATED_EXPORT void k4a_image_set_timestamp_usec (k4a_image_t image_handle, uint64_t timestamp_usec)
 Set the device time stamp, in microseconds, of the image. More...
 
void k4a_image_set_system_timestamp_nsec (k4a_image_t image_handle, uint64_t timestamp_nsec)
 Set the system time stamp, in nanoseconds, of the image. More...
 
void k4a_image_set_exposure_usec (k4a_image_t image_handle, uint64_t exposure_usec)
 Set the exposure time, in microseconds, of the image. More...
 
K4A_DEPRECATED_EXPORT void k4a_image_set_exposure_time_usec (k4a_image_t image_handle, uint64_t exposure_usec)
 Set the exposure time, in microseconds, of the image. More...
 
void k4a_image_set_white_balance (k4a_image_t image_handle, uint32_t white_balance)
 Set the white balance of the image. More...
 
void k4a_image_set_iso_speed (k4a_image_t image_handle, uint32_t iso_speed)
 Set the ISO speed of the image. More...
 
void k4a_image_reference (k4a_image_t image_handle)
 Add a reference to the k4a_image_t. More...
 
void k4a_image_release (k4a_image_t image_handle)
 Remove a reference from the k4a_image_t. More...
 

Detailed Description

Handle to an Azure Kinect image.

Remarks
A k4a_image_t manages an image buffer and associated metadata.
The memory associated with the image buffer in an k4a_image_t may have been allocated by the Azure Kinect APIs or by the application. If the k4a_image_t was created by an Azure Kinect API, its memory will be freed when all references to the k4a_image_t are released. All images retrieved directly from a device will have been created by the API. An application can create a k4a_image_t using memory that it has allocated using k4a_image_create_from_buffer(). In that case the memory is not freed when the references are released but instead the application is provided with a callback. Applications need to create a k4a_image_t to provide as an output to the k4a_transformation_t transformation functions.
An image has a number of metadata properties that can be set or retrieved using the accessor functions. Not all properties are applicable to images of all types. See the documentation for the individual accessors for more information on their applicability and meaning.
Images may be of one of the standard k4a_image_format_t formats, or may be of format K4A_IMAGE_FORMAT_CUSTOM. The format defines how the underlying image buffer should be interpreted.
Images from a device are retrieved through a k4a_capture_t object returned by k4a_device_get_capture().
Images stored in a k4a_capture_t are referenced by the k4a_capture_t until they are replaced or the k4a_capture_t is destroyed.
The caller must call k4a_image_release() to release its reference to any k4a_image_t that it receives from an Azure Kinect API.
Additional references to the image may be obtained with k4a_image_reference().
An invalid k4a_image_t will be set to 0.
See also
k4a_capture_t

The documentation for this class was generated from the following files: