Orbbec SDK K4A Wrapper
Loading...
Searching...
No Matches
k4a.h
Go to the documentation of this file.
1
7#ifndef K4A_H
8#define K4A_H
9
10#ifdef __cplusplus
11#include <cinttypes>
12#else
13#include <inttypes.h>
14#endif
15#include <k4a/k4aversion.h>
16#include <k4a/k4atypes.h>
17#include <k4a/k4a_export.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#define WRAPPER_VERSION_MAJOR 1
24#define WRAPPER_VERSION_MINOR 8
25#define WRAPPER_VERSION_PATCH 1
26
53K4A_EXPORT uint32_t k4a_device_get_installed_count(void);
54
100 void *message_cb_context,
101 k4a_log_level_t min_level);
102
140
168K4A_EXPORT k4a_result_t k4a_device_open(uint32_t index, k4a_device_t *device_handle);
169
190K4A_EXPORT void k4a_device_close(k4a_device_t device_handle);
191
252 k4a_capture_t *capture_handle,
253 int32_t timeout_in_ms);
254
310 k4a_imu_sample_t *imu_sample,
311 int32_t timeout_in_ms);
312
338
357K4A_EXPORT void k4a_capture_release(k4a_capture_t capture_handle);
358
378K4A_EXPORT void k4a_capture_reference(k4a_capture_t capture_handle);
379
400
421
442
477K4A_EXPORT void k4a_capture_set_color_image(k4a_capture_t capture_handle, k4a_image_t image_handle);
478
513K4A_EXPORT void k4a_capture_set_depth_image(k4a_capture_t capture_handle, k4a_image_t image_handle);
514
548K4A_EXPORT void k4a_capture_set_ir_image(k4a_capture_t capture_handle, k4a_image_t image_handle);
549
570K4A_EXPORT void k4a_capture_set_temperature_c(k4a_capture_t capture_handle, float temperature_c);
571
593K4A_EXPORT float k4a_capture_get_temperature_c(k4a_capture_t capture_handle);
594
646 int width_pixels,
647 int height_pixels,
648 int stride_bytes,
649 k4a_image_t *image_handle);
650
708 int width_pixels,
709 int height_pixels,
710 int stride_bytes,
711 uint8_t *buffer,
712 size_t buffer_size,
713 k4a_memory_destroy_cb_t *buffer_release_cb,
714 void *buffer_release_cb_context,
715 k4a_image_t *image_handle);
716
740K4A_EXPORT uint8_t *k4a_image_get_buffer(k4a_image_t image_handle);
741
765K4A_EXPORT size_t k4a_image_get_size(k4a_image_t image_handle);
766
790
810K4A_EXPORT int k4a_image_get_width_pixels(k4a_image_t image_handle);
811
831K4A_EXPORT int k4a_image_get_height_pixels(k4a_image_t image_handle);
832
852K4A_EXPORT int k4a_image_get_stride_bytes(k4a_image_t image_handle);
853
881K4A_DEPRECATED_EXPORT uint64_t k4a_image_get_timestamp_usec(k4a_image_t image_handle);
882
907K4A_EXPORT uint64_t k4a_image_get_device_timestamp_usec(k4a_image_t image_handle);
908
942K4A_EXPORT uint64_t k4a_image_get_system_timestamp_nsec(k4a_image_t image_handle);
943
968K4A_EXPORT uint64_t k4a_image_get_exposure_usec(k4a_image_t image_handle);
969
994K4A_EXPORT uint32_t k4a_image_get_white_balance(k4a_image_t image_handle);
995
1019K4A_EXPORT uint32_t k4a_image_get_iso_speed(k4a_image_t image_handle);
1020
1046K4A_EXPORT void k4a_image_set_device_timestamp_usec(k4a_image_t image_handle, uint64_t timestamp_usec);
1047
1076K4A_DEPRECATED_EXPORT void k4a_image_set_timestamp_usec(k4a_image_t image_handle, uint64_t timestamp_usec);
1077
1104K4A_EXPORT void k4a_image_set_system_timestamp_nsec(k4a_image_t image_handle, uint64_t timestamp_nsec);
1105
1131K4A_EXPORT void k4a_image_set_exposure_usec(k4a_image_t image_handle, uint64_t exposure_usec);
1132
1159K4A_DEPRECATED_EXPORT void k4a_image_set_exposure_time_usec(k4a_image_t image_handle, uint64_t exposure_usec);
1160
1186K4A_EXPORT void k4a_image_set_white_balance(k4a_image_t image_handle, uint32_t white_balance);
1187
1212K4A_EXPORT void k4a_image_set_iso_speed(k4a_image_t image_handle, uint32_t iso_speed);
1213
1233K4A_EXPORT void k4a_image_reference(k4a_image_t image_handle);
1234
1254K4A_EXPORT void k4a_image_release(k4a_image_t image_handle);
1255
1285
1309K4A_EXPORT void k4a_device_stop_cameras(k4a_device_t device_handle);
1310
1339
1363K4A_EXPORT void k4a_device_stop_imu(k4a_device_t device_handle);
1364
1404 char *serial_number,
1405 size_t *serial_number_size);
1406
1429
1472 bool *supports_auto,
1473 int32_t *min_value,
1474 int32_t *max_value,
1475 int32_t *step_value,
1476 int32_t *default_value,
1477 k4a_color_control_mode_t *default_mode);
1478
1524 int32_t *value);
1525
1569 int32_t value);
1570
1601 uint8_t *data,
1602 size_t *data_size);
1603
1644 const k4a_depth_mode_t depth_mode,
1645 const k4a_color_resolution_t color_resolution,
1646 k4a_calibration_t *calibration);
1647
1685 bool *sync_in_jack_connected,
1686 bool *sync_out_jack_connected);
1687
1730K4A_EXPORT k4a_result_t k4a_calibration_get_from_raw(char *raw_calibration,
1731 size_t raw_calibration_size,
1732 const k4a_depth_mode_t depth_mode,
1733 const k4a_color_resolution_t color_resolution,
1734 k4a_calibration_t *calibration);
1735
1775 const k4a_float3_t *source_point3d_mm,
1776 const k4a_calibration_type_t source_camera,
1777 const k4a_calibration_type_t target_camera,
1778 k4a_float3_t *target_point3d_mm);
1779
1836 const k4a_float2_t *source_point2d,
1837 const float source_depth_mm,
1838 const k4a_calibration_type_t source_camera,
1839 const k4a_calibration_type_t target_camera,
1840 k4a_float3_t *target_point3d_mm,
1841 int *valid);
1842
1892 const k4a_float3_t *source_point3d_mm,
1893 const k4a_calibration_type_t source_camera,
1894 const k4a_calibration_type_t target_camera,
1895 k4a_float2_t *target_point2d,
1896 int *valid);
1897
1955 const k4a_float2_t *source_point2d,
1956 const float source_depth_mm,
1957 const k4a_calibration_type_t source_camera,
1958 const k4a_calibration_type_t target_camera,
1959 k4a_float2_t *target_point2d,
1960 int *valid);
1961
2010 const k4a_float2_t *source_point2d,
2011 const k4a_image_t depth_image,
2012 k4a_float2_t *target_point2d,
2013 int *valid);
2014
2042
2058K4A_EXPORT void k4a_transformation_destroy(k4a_transformation_t transformation_handle);
2059
2103 const k4a_image_t depth_image,
2104 k4a_image_t transformed_depth_image);
2105
2182K4A_EXPORT k4a_result_t
2184 const k4a_image_t depth_image,
2185 const k4a_image_t custom_image,
2186 k4a_image_t transformed_depth_image,
2187 k4a_image_t transformed_custom_image,
2188 k4a_transformation_interpolation_type_t interpolation_type,
2189 uint32_t invalid_custom_value);
2190
2239 const k4a_image_t depth_image,
2240 const k4a_image_t color_image,
2241 k4a_image_t transformed_color_image);
2242
2291 const k4a_image_t depth_image,
2292 const k4a_calibration_type_t camera,
2293 k4a_image_t xyz_image);
2294
2299#ifdef __cplusplus
2300}
2301#endif
2302
2303#endif /* K4A_H */
k4a_transformation_interpolation_type_t
Definition: k4atypes.h:460
k4a_color_control_mode_t
Definition: k4atypes.h:626
k4a_depth_mode_t
Definition: k4atypes.h:291
k4a_wait_result_t
Definition: k4atypes.h:247
k4a_result_t
Definition: k4atypes.h:218
k4a_buffer_result_t
Definition: k4atypes.h:232
k4a_log_level_t
Definition: k4atypes.h:262
k4a_calibration_type_t
Definition: k4atypes.h:662
k4a_color_resolution_t
Definition: k4atypes.h:310
k4a_image_format_t
Definition: k4atypes.h:333
k4a_color_control_command_t
Definition: k4atypes.h:507
K4A_EXPORT k4a_result_t k4a_capture_create(k4a_capture_t *capture_handle)
K4A_EXPORT int k4a_image_get_width_pixels(k4a_image_t image_handle)
K4A_EXPORT k4a_wait_result_t k4a_device_get_imu_sample(k4a_device_t device_handle, k4a_imu_sample_t *imu_sample, int32_t timeout_in_ms)
K4A_EXPORT k4a_result_t k4a_device_get_calibration(k4a_device_t device_handle, const k4a_depth_mode_t depth_mode, const k4a_color_resolution_t color_resolution, k4a_calibration_t *calibration)
K4A_EXPORT void k4a_capture_set_color_image(k4a_capture_t capture_handle, k4a_image_t image_handle)
K4A_EXPORT uint64_t k4a_image_get_device_timestamp_usec(k4a_image_t image_handle)
K4A_EXPORT void k4a_device_close(k4a_device_t device_handle)
K4A_EXPORT k4a_result_t k4a_device_get_sync_jack(k4a_device_t device_handle, bool *sync_in_jack_connected, bool *sync_out_jack_connected)
K4A_EXPORT uint64_t k4a_image_get_system_timestamp_nsec(k4a_image_t image_handle)
K4A_DEPRECATED_EXPORT void k4a_image_set_timestamp_usec(k4a_image_t image_handle, uint64_t timestamp_usec)
K4A_DEPRECATED_EXPORT void k4a_image_set_exposure_time_usec(k4a_image_t image_handle, uint64_t exposure_usec)
K4A_EXPORT void k4a_image_set_iso_speed(k4a_image_t image_handle, uint32_t iso_speed)
K4A_EXPORT k4a_image_t k4a_capture_get_depth_image(k4a_capture_t capture_handle)
K4A_EXPORT uint64_t k4a_image_get_exposure_usec(k4a_image_t image_handle)
K4A_EXPORT k4a_result_t k4a_calibration_2d_to_2d(const k4a_calibration_t *calibration, const k4a_float2_t *source_point2d, const float source_depth_mm, const k4a_calibration_type_t source_camera, const k4a_calibration_type_t target_camera, k4a_float2_t *target_point2d, int *valid)
K4A_EXPORT k4a_result_t k4a_device_get_version(k4a_device_t device_handle, k4a_hardware_version_t *version)
K4A_EXPORT uint32_t k4a_image_get_white_balance(k4a_image_t image_handle)
K4A_EXPORT size_t k4a_image_get_size(k4a_image_t image_handle)
K4A_EXPORT k4a_result_t k4a_calibration_3d_to_2d(const k4a_calibration_t *calibration, const k4a_float3_t *source_point3d_mm, const k4a_calibration_type_t source_camera, const k4a_calibration_type_t target_camera, k4a_float2_t *target_point2d, int *valid)
K4A_EXPORT uint32_t k4a_device_get_installed_count(void)
K4A_EXPORT void k4a_image_release(k4a_image_t image_handle)
K4A_EXPORT k4a_result_t k4a_calibration_3d_to_3d(const k4a_calibration_t *calibration, const k4a_float3_t *source_point3d_mm, const k4a_calibration_type_t source_camera, const k4a_calibration_type_t target_camera, k4a_float3_t *target_point3d_mm)
K4A_EXPORT k4a_transformation_t k4a_transformation_create(const k4a_calibration_t *calibration)
K4A_EXPORT void k4a_image_set_system_timestamp_nsec(k4a_image_t image_handle, uint64_t timestamp_nsec)
K4A_DEPRECATED_EXPORT uint64_t k4a_image_get_timestamp_usec(k4a_image_t image_handle)
K4A_EXPORT k4a_image_format_t k4a_image_get_format(k4a_image_t image_handle)
K4A_EXPORT void k4a_device_stop_cameras(k4a_device_t device_handle)
K4A_EXPORT void k4a_image_reference(k4a_image_t image_handle)
K4A_EXPORT 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)
K4A_EXPORT k4a_result_t k4a_transformation_depth_image_to_point_cloud(k4a_transformation_t transformation_handle, const k4a_image_t depth_image, const k4a_calibration_type_t camera, k4a_image_t xyz_image)
K4A_EXPORT k4a_result_t k4a_set_allocator(k4a_memory_allocate_cb_t allocate, k4a_memory_destroy_cb_t free)
K4A_EXPORT uint32_t k4a_image_get_iso_speed(k4a_image_t image_handle)
K4A_EXPORT void k4a_capture_set_temperature_c(k4a_capture_t capture_handle, float temperature_c)
K4A_EXPORT int k4a_image_get_stride_bytes(k4a_image_t image_handle)
K4A_EXPORT k4a_result_t k4a_transformation_depth_image_to_color_camera_custom(k4a_transformation_t transformation_handle, const k4a_image_t depth_image, const k4a_image_t custom_image, k4a_image_t transformed_depth_image, k4a_image_t transformed_custom_image, k4a_transformation_interpolation_type_t interpolation_type, uint32_t invalid_custom_value)
K4A_EXPORT void k4a_capture_release(k4a_capture_t capture_handle)
K4A_EXPORT void k4a_device_stop_imu(k4a_device_t device_handle)
K4A_EXPORT void k4a_image_set_white_balance(k4a_image_t image_handle, uint32_t white_balance)
K4A_EXPORT void k4a_image_set_device_timestamp_usec(k4a_image_t image_handle, uint64_t timestamp_usec)
K4A_EXPORT k4a_buffer_result_t k4a_device_get_raw_calibration(k4a_device_t device_handle, uint8_t *data, size_t *data_size)
K4A_EXPORT uint8_t * k4a_image_get_buffer(k4a_image_t image_handle)
K4A_EXPORT k4a_result_t k4a_transformation_color_image_to_depth_camera(k4a_transformation_t transformation_handle, const k4a_image_t depth_image, const k4a_image_t color_image, k4a_image_t transformed_color_image)
K4A_EXPORT k4a_result_t k4a_device_set_color_control(k4a_device_t device_handle, k4a_color_control_command_t command, k4a_color_control_mode_t mode, int32_t value)
K4A_EXPORT void k4a_image_set_exposure_usec(k4a_image_t image_handle, uint64_t exposure_usec)
K4A_EXPORT k4a_result_t k4a_transformation_depth_image_to_color_camera(k4a_transformation_t transformation_handle, const k4a_image_t depth_image, k4a_image_t transformed_depth_image)
K4A_EXPORT void k4a_capture_set_depth_image(k4a_capture_t capture_handle, k4a_image_t image_handle)
K4A_EXPORT 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)
K4A_EXPORT void k4a_capture_reference(k4a_capture_t capture_handle)
K4A_EXPORT k4a_result_t k4a_calibration_get_from_raw(char *raw_calibration, size_t raw_calibration_size, const k4a_depth_mode_t depth_mode, const k4a_color_resolution_t color_resolution, k4a_calibration_t *calibration)
K4A_EXPORT void k4a_transformation_destroy(k4a_transformation_t transformation_handle)
K4A_EXPORT k4a_result_t k4a_device_get_color_control_capabilities(k4a_device_t device_handle, k4a_color_control_command_t command, bool *supports_auto, int32_t *min_value, int32_t *max_value, int32_t *step_value, int32_t *default_value, k4a_color_control_mode_t *default_mode)
K4A_EXPORT k4a_image_t k4a_capture_get_ir_image(k4a_capture_t capture_handle)
K4A_EXPORT k4a_image_t k4a_capture_get_color_image(k4a_capture_t capture_handle)
K4A_EXPORT k4a_result_t k4a_calibration_color_2d_to_depth_2d(const k4a_calibration_t *calibration, const k4a_float2_t *source_point2d, const k4a_image_t depth_image, k4a_float2_t *target_point2d, int *valid)
K4A_EXPORT k4a_result_t k4a_set_debug_message_handler(k4a_logging_message_cb_t *message_cb, void *message_cb_context, k4a_log_level_t min_level)
K4A_EXPORT k4a_result_t k4a_device_get_color_control(k4a_device_t device_handle, k4a_color_control_command_t command, k4a_color_control_mode_t *mode, int32_t *value)
K4A_EXPORT k4a_buffer_result_t k4a_device_get_serialnum(k4a_device_t device_handle, char *serial_number, size_t *serial_number_size)
K4A_EXPORT k4a_result_t k4a_device_start_cameras(k4a_device_t device_handle, const k4a_device_configuration_t *config)
K4A_EXPORT void k4a_capture_set_ir_image(k4a_capture_t capture_handle, k4a_image_t image_handle)
K4A_EXPORT k4a_result_t k4a_device_open(uint32_t index, k4a_device_t *device_handle)
K4A_EXPORT k4a_wait_result_t k4a_device_get_capture(k4a_device_t device_handle, k4a_capture_t *capture_handle, int32_t timeout_in_ms)
K4A_EXPORT k4a_result_t k4a_calibration_2d_to_3d(const k4a_calibration_t *calibration, const k4a_float2_t *source_point2d, const float source_depth_mm, const k4a_calibration_type_t source_camera, const k4a_calibration_type_t target_camera, k4a_float3_t *target_point3d_mm, int *valid)
K4A_EXPORT k4a_result_t k4a_device_start_imu(k4a_device_t device_handle)
K4A_EXPORT int k4a_image_get_height_pixels(k4a_image_t image_handle)
K4A_EXPORT float k4a_capture_get_temperature_c(k4a_capture_t capture_handle)
void() k4a_memory_destroy_cb_t(void *buffer, void *context)
Definition: k4atypes.h:871
uint8_t *() k4a_memory_allocate_cb_t(int size, void **context)
Definition: k4atypes.h:895
void() k4a_logging_message_cb_t(void *context, k4a_log_level_t level, const char *file, const int line, const char *message)
Definition: k4atypes.h:845