#include <k4a/k4a.hpp>
|
static image | create (k4a_image_format_t format, int width_pixels, int height_pixels, int stride_bytes) |
|
static 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) |
|
Wrapper for k4a_image_t
Wraps a handle for an image. Copying/moving is cheap, copies are shallow.
- See also
- k4a_image_t
Definition at line 80 of file k4a.hpp.
◆ image() [1/3]
Creates an image from a k4a_image_t. Takes ownership of the handle, i.e. assuming that handle has a refcount of 1, you should not call k4a_image_release on the handle after giving it to the image; the image will take care of that.
Definition at line 88 of file k4a.hpp.
◆ image() [2/3]
k4a::image::image |
( |
const image & |
other | ) |
|
|
inlinenoexcept |
Creates a shallow copy of another image
Definition at line 92 of file k4a.hpp.
◆ image() [3/3]
k4a::image::image |
( |
image && |
other | ) |
|
|
inlinenoexcept |
Moves another image into a new image
Definition at line 102 of file k4a.hpp.
◆ ~image()
◆ create()
static image k4a::image::create |
( |
k4a_image_format_t |
format, |
|
|
int |
width_pixels, |
|
|
int |
height_pixels, |
|
|
int |
stride_bytes |
|
) |
| |
|
inlinestatic |
Create a blank image Throws error on failure
- See also
- k4a_image_create
Definition at line 219 of file k4a.hpp.
◆ create_from_buffer()
static image 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 |
|
) |
| |
|
inlinestatic |
Create an image from a pre-allocated buffer Throws error on failure
- See also
- k4a_image_create_from_buffer
Definition at line 235 of file k4a.hpp.
◆ get_buffer() [1/2]
const uint8_t * k4a::image::get_buffer |
( |
| ) |
const |
|
inlinenoexcept |
Get the image buffer
- See also
- k4a_image_get_buffer
Definition at line 274 of file k4a.hpp.
◆ get_buffer() [2/2]
uint8_t * k4a::image::get_buffer |
( |
| ) |
|
|
inlinenoexcept |
Get the image buffer
- See also
- k4a_image_get_buffer
Definition at line 265 of file k4a.hpp.
◆ get_device_timestamp()
std::chrono::microseconds k4a::image::get_device_timestamp |
( |
| ) |
const |
|
inlinenoexcept |
Get the image's device timestamp in microseconds
- See also
- k4a_image_get_device_timestamp_usec
Definition at line 328 of file k4a.hpp.
◆ get_exposure()
std::chrono::microseconds k4a::image::get_exposure |
( |
| ) |
const |
|
inlinenoexcept |
Get the image exposure time in microseconds
- Attention
- For the Orbbec SDK K4A wrapper, this function is not yet supported.
- See also
- k4a_image_get_exposure_usec
Definition at line 348 of file k4a.hpp.
◆ get_format()
Get the image format of the image
- See also
- k4a_image_get_format
Definition at line 292 of file k4a.hpp.
◆ get_height_pixels()
int k4a::image::get_height_pixels |
( |
| ) |
const |
|
inlinenoexcept |
Get the image height in pixels
- See also
- k4a_image_get_height_pixels
Definition at line 310 of file k4a.hpp.
◆ get_iso_speed()
uint32_t k4a::image::get_iso_speed |
( |
| ) |
const |
|
inlinenoexcept |
Get the image's ISO speed (color images only)
- Attention
- For the Orbbec SDK K4A wrapper, this function is not yet supported.
- See also
- k4a_image_get_white_balance
Definition at line 370 of file k4a.hpp.
◆ get_size()
size_t k4a::image::get_size |
( |
| ) |
const |
|
inlinenoexcept |
Get the image buffer size in bytes
- See also
- k4a_image_get_size
Definition at line 283 of file k4a.hpp.
◆ get_stride_bytes()
int k4a::image::get_stride_bytes |
( |
| ) |
const |
|
inlinenoexcept |
Get the image stride in bytes
- See also
- k4a_image_get_stride_bytes
Definition at line 319 of file k4a.hpp.
◆ get_system_timestamp()
std::chrono::nanoseconds k4a::image::get_system_timestamp |
( |
| ) |
const |
|
inlinenoexcept |
Get the image's system timestamp in nanoseconds
- See also
- k4a_image_get_system_timestamp_nsec
Definition at line 337 of file k4a.hpp.
◆ get_white_balance()
uint32_t k4a::image::get_white_balance |
( |
| ) |
const |
|
inlinenoexcept |
Get the image white balance in Kelvin (color images only)
- Attention
- For the Orbbec SDK K4A wrapper, this function is not yet supported.
- See also
- k4a_image_get_white_balance
Definition at line 359 of file k4a.hpp.
◆ get_width_pixels()
int k4a::image::get_width_pixels |
( |
| ) |
const |
|
inlinenoexcept |
Get the image width in pixels
- See also
- k4a_image_get_width_pixels
Definition at line 301 of file k4a.hpp.
◆ handle()
Returns the underlying k4a_image_t handle
Note that this function does not increment the reference count on the k4a_image_t. The caller is responsible for incrementing the reference count on the k4a_image_t if the caller needs the k4a_image_t to outlive this C++ object. Otherwise, the k4a_image_t will be destroyed by this C++ object.
Definition at line 198 of file k4a.hpp.
◆ is_valid()
bool k4a::image::is_valid |
( |
| ) |
const |
|
inlinenoexcept |
Returns true if the image is valid, false otherwise
Definition at line 186 of file k4a.hpp.
◆ operator bool()
k4a::image::operator bool |
( |
| ) |
const |
|
inlineexplicitnoexcept |
Returns true if the image is valid, false otherwise
Definition at line 179 of file k4a.hpp.
◆ operator!=() [1/2]
bool k4a::image::operator!= |
( |
const image & |
other | ) |
const |
|
inlinenoexcept |
Returns true if two images wrap different k4a_image_t instances, false otherwise
Definition at line 165 of file k4a.hpp.
◆ operator!=() [2/2]
bool k4a::image::operator!= |
( |
std::nullptr_t |
| ) |
const |
|
inlinenoexcept |
Returns true if the image is valid, false otherwise
Definition at line 172 of file k4a.hpp.
◆ operator=() [1/3]
image & k4a::image::operator= |
( |
const image & |
other | ) |
|
|
inlinenoexcept |
Sets image to a shallow copy of the other image
Definition at line 114 of file k4a.hpp.
◆ operator=() [2/3]
Moves another image into this image; other is set to invalid
Definition at line 130 of file k4a.hpp.
◆ operator=() [3/3]
image & k4a::image::operator= |
( |
std::nullptr_t |
| ) |
|
|
inlinenoexcept |
Invalidates this image
Definition at line 143 of file k4a.hpp.
◆ operator==() [1/2]
bool k4a::image::operator== |
( |
const image & |
other | ) |
const |
|
inlinenoexcept |
Returns true if two images refer to the same k4a_image_t, false otherwise
Definition at line 151 of file k4a.hpp.
◆ operator==() [2/2]
bool k4a::image::operator== |
( |
std::nullptr_t |
| ) |
const |
|
inlinenoexcept |
Returns false if the image is valid, true otherwise
Definition at line 158 of file k4a.hpp.
◆ reset()
void k4a::image::reset |
( |
| ) |
|
|
inlinenoexcept |
Releases the underlying k4a_image_t; the image is set to invalid.
Definition at line 205 of file k4a.hpp.
◆ set_exposure_time()
void k4a::image::set_exposure_time |
( |
std::chrono::microseconds |
exposure | ) |
|
|
inlinenoexcept |
Set the image's exposure time in microseconds (color images only)
- Attention
- For the Orbbec SDK K4A wrapper, this function is not yet supported.
- See also
- k4a_image_set_exposure_time_usec
Definition at line 390 of file k4a.hpp.
◆ set_iso_speed()
void k4a::image::set_iso_speed |
( |
uint32_t |
iso_speed | ) |
|
|
inlinenoexcept |
Set the ISO speed of the image (color images only)
- Attention
- For the Orbbec SDK K4A wrapper, this function is not yet supported.
- See also
- k4a_image_set_iso_speed
Definition at line 412 of file k4a.hpp.
◆ set_timestamp()
void k4a::image::set_timestamp |
( |
std::chrono::microseconds |
timestamp | ) |
|
|
inlinenoexcept |
Set the image's timestamp in microseconds
- See also
- k4a_image_set_device_timestamp_usec
Definition at line 379 of file k4a.hpp.
◆ set_white_balance()
void k4a::image::set_white_balance |
( |
uint32_t |
white_balance | ) |
|
|
inlinenoexcept |
Set the white balance of the image (color images only)
- Attention
- For the Orbbec SDK K4A wrapper, this function is not yet supported.
- See also
- k4a_image_set_white_balance
Definition at line 401 of file k4a.hpp.
The documentation for this class was generated from the following file: