Azure Kinect Sensor SDK  refs/heads/master
Documentation for https://github.com/Microsoft/Azure-Kinect-Sensor-SDK
k4atypes.h
1 
7 #ifndef K4ATYPES_H
8 #define K4ATYPES_H
9 
10 #ifdef __cplusplus
11 #include <cinttypes>
12 #include <cstddef>
13 #include <cstring>
14 #else
15 #include <inttypes.h>
16 #include <stddef.h>
17 #include <string.h>
18 #include <stdbool.h>
19 #endif
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
34 #define K4A_DECLARE_HANDLE(_handle_name_) \
35  typedef struct _##_handle_name_ \
36  { \
37  size_t _rsvd; \
38  } * _handle_name_;
39 
66 K4A_DECLARE_HANDLE(k4a_device_t);
67 
122 K4A_DECLARE_HANDLE(k4a_capture_t);
123 
173 K4A_DECLARE_HANDLE(k4a_image_t);
174 
195 K4A_DECLARE_HANDLE(k4a_transformation_t);
196 
217 typedef enum
218 {
221 } k4a_result_t;
222 
231 typedef enum
232 {
237 
246 typedef enum
247 {
252 
261 typedef enum
262 {
270 
289 // Be sure to update k4a_depth_mode_to_string in k4a.c if enum values are added.
290 typedef enum
291 {
299 
308 // Be sure to update k4a_color_resolution_to_string in k4a.c if enum values are added.
309 typedef enum
310 {
319 
331 // Be sure to update k4a_image_format_to_string in k4a.c if enum values are added.
332 typedef enum
333 {
346 
359 
370 
387 
399 
414 
425 
436 
447 
459 typedef enum
460 {
464 
477 // Be sure to update k4a_fps_to_string in k4a.c if enum values are added.
478 typedef enum
479 {
483 } k4a_fps_t;
484 
503 typedef enum
504 {
522 
538 
548 
555 
562 
569 
579 
589 
596 
607 
622 typedef enum
623 {
627 
636 typedef enum
637 {
647 
658 typedef enum
659 {
667 
681 typedef enum
682 {
693 
702 typedef enum
703 {
707 
716 typedef enum
717 {
722 
743 #define K4A_SUCCEEDED(_result_) (_result_ == K4A_RESULT_SUCCEEDED)
744 
753 #define K4A_FAILED(_result_) (!K4A_SUCCEEDED(_result_))
754 
842 typedef void(k4a_logging_message_cb_t)(void *context,
843  k4a_log_level_t level,
844  const char *file,
845  const int line,
846  const char *message);
847 
868 typedef void(k4a_memory_destroy_cb_t)(void *buffer, void *context);
869 
892 typedef uint8_t *(k4a_memory_allocate_cb_t)(int size, void **context);
893 
917 typedef struct _k4a_device_configuration_t
918 {
924 
927 
930 
933 
953 
964 
967 
980 
987 
1001 typedef struct _k4a_calibration_extrinsics_t
1002 {
1003  float rotation[9];
1004  float translation[3];
1006 
1024 typedef union
1025 {
1027  struct _param
1028  {
1029  float cx;
1030  float cy;
1031  float fx;
1032  float fy;
1033  float k1;
1034  float k2;
1035  float k3;
1036  float k4;
1037  float k5;
1038  float k6;
1039  float codx;
1040  float cody;
1041  float p2;
1042  float p1;
1044  } param;
1045  float v[15];
1047 
1065 typedef struct _k4a_calibration_intrinsics_t
1066 {
1068  unsigned int parameter_count;
1071 
1082 typedef struct _k4a_calibration_camera_t
1083 {
1090 
1099 typedef struct _k4a_calibration_t
1100 {
1112 
1116 
1125 typedef struct _k4a_version_t
1126 {
1127  uint32_t major;
1128  uint32_t minor;
1130  uint32_t iteration;
1131 } k4a_version_t;
1132 
1141 typedef struct _k4a_hardware_version_t
1142 {
1151 
1160 typedef union
1161 {
1163  struct _xy
1164  {
1165  float x;
1166  float y;
1167  } xy;
1168  float v[2];
1169 } k4a_float2_t;
1170 
1179 typedef union
1180 {
1182  struct _xyz
1183  {
1184  float x;
1185  float y;
1186  float z;
1187  } xyz;
1188  float v[3];
1189 } k4a_float3_t;
1190 
1199 typedef struct _k4a_imu_sample_t
1200 {
1201  float temperature;
1207 
1230 #define K4A_DEVICE_DEFAULT (0)
1231 
1240 #define K4A_WAIT_INFINITE (-1)
1241 
1257  false,
1258  0,
1260  0,
1261  false };
1262 
1267 #ifdef __cplusplus
1268 }
1269 #endif
1270 
1271 #endif /* K4ATYPES_H */
Calibration model is Brown Conrady (compatible with OpenCV)
Definition: k4atypes.h:690
Depth sensor will be turned off with this setting.
Definition: k4atypes.h:292
k4a_color_resolution_t color_resolution
Color camera resolution for which calibration was obtained.
Definition: k4atypes.h:1114
Calibration type representing device calibration.
Definition: k4atypes.h:1099
The result was successful.
Definition: k4atypes.h:248
The result was successful.
Definition: k4atypes.h:233
uint64_t gyro_timestamp_usec
Timestamp of the gyroscope in microseconds.
Definition: k4atypes.h:1205
float k1
k1 radial distortion coefficient
Definition: k4atypes.h:1033
2nd most severe level of debug messaging.
Definition: k4atypes.h:264
k4a_fps_t
Color and depth sensor frame rate.
Definition: k4atypes.h:478
Saturation setting.
Definition: k4atypes.h:561
k4a_calibration_model_type_t type
Type of calibration model used.
Definition: k4atypes.h:1067
Number of types excluding unknown type.
Definition: k4atypes.h:665
Gain setting.
Definition: k4atypes.h:595
k4a_depth_mode_t depth_mode
Depth camera mode for which calibration was obtained.
Definition: k4atypes.h:1113
int resolution_height
Resolution height of the calibration sensor.
Definition: k4atypes.h:1087
individual parameter or array representation of intrinsic model.
Definition: k4atypes.h:1027
float y
Y component of a vector.
Definition: k4atypes.h:1185
Color image type BGRA32.
Definition: k4atypes.h:386
3nd most severe level of debug messaging.
Definition: k4atypes.h:265
float k6
k6 radial distortion coefficient
Definition: k4atypes.h:1038
k4a_image_format_t color_format
Image format to capture with the color camera.
Definition: k4atypes.h:923
k4a_float3_t acc_sample
Accelerometer sample in meters per second squared.
Definition: k4atypes.h:1202
Deprecated (not supported).
Definition: k4atypes.h:684
Structure to define hardware version.
Definition: k4atypes.h:1141
k4a_result_t
Result code returned by Azure Kinect APIs.
Definition: k4atypes.h:217
The result was a failure.
Definition: k4atypes.h:234
Color image type NV12.
Definition: k4atypes.h:358
Calibration type is unknown.
Definition: k4atypes.h:660
float metric_radius
Max FOV of the camera.
Definition: k4atypes.h:1088
k4a_depth_mode_t
Depth sensor capture modes.
Definition: k4atypes.h:290
2560 * 1440 16:9
Definition: k4atypes.h:314
Brightness setting.
Definition: k4atypes.h:547
5 FPS
Definition: k4atypes.h:480
Handle to an Azure Kinect capture.
Definition: k4atypes.h:122
Powerline frequency setting.
Definition: k4atypes.h:605
set the associated k4a_color_control_command_t to auto
Definition: k4atypes.h:624
k4a_buffer_result_t
Result code returned by Azure Kinect APIs.
Definition: k4atypes.h:231
k4a_version_t audio
Audio device firmware version.
Definition: k4atypes.h:1145
Depth captured at 1024x1024.
Definition: k4atypes.h:296
Most severe level of debug messaging.
Definition: k4atypes.h:263
k4a_calibration_model_type_t
Calibration model type.
Definition: k4atypes.h:681
k4a_wired_sync_mode_t wired_sync_mode
The external synchronization mode.
Definition: k4atypes.h:966
k4a_calibration_intrinsic_parameters_t parameters
Calibration parameters.
Definition: k4atypes.h:1069
Contrast setting.
Definition: k4atypes.h:554
Nearest neighbor interpolation.
Definition: k4atypes.h:461
Production firmware.
Definition: k4atypes.h:704
White balance setting.
Definition: k4atypes.h:578
The operation timed out.
Definition: k4atypes.h:250
No logging is performed.
Definition: k4atypes.h:268
unsigned int parameter_count
Number of valid entries in parameters.
Definition: k4atypes.h:1068
k4a_firmware_build_t firmware_build
Build type reported by the firmware.
Definition: k4atypes.h:1148
k4a_version_t rgb
Color camera firmware version.
Definition: k4atypes.h:1143
Gyroscope sensor.
Definition: k4atypes.h:663
k4a_wired_sync_mode_t
Synchronization mode when connecting two or more devices together.
Definition: k4atypes.h:636
IMU sample.
Definition: k4atypes.h:1199
k4a_depth_mode_t depth_mode
Capture mode for the depth camera.
Definition: k4atypes.h:929
Camera sensor intrinsic calibration data.
Definition: k4atypes.h:1065
Depth captured at 640x576.
Definition: k4atypes.h:294
float y
Y component of a vector.
Definition: k4atypes.h:1166
uint32_t subordinate_delay_off_master_usec
The external synchronization timing.
Definition: k4atypes.h:979
Pre-production firmware.
Definition: k4atypes.h:705
Calibration model is unknown.
Definition: k4atypes.h:683
float cy
Principal point in image, y.
Definition: k4atypes.h:1030
k4a_calibration_extrinsics_t extrinsics
Extrinsic calibration data.
Definition: k4atypes.h:1084
Passive IR only, captured at 1024x1024.
Definition: k4atypes.h:297
k4a_calibration_intrinsics_t intrinsics
Intrinsic calibration data.
Definition: k4atypes.h:1085
30 FPS
Definition: k4atypes.h:482
float x
X component of a vector.
Definition: k4atypes.h:1165
k4a_color_resolution_t color_resolution
Image resolution to capture with the color camera.
Definition: k4atypes.h:926
Camera calibration contains intrinsic and extrinsic calibration information for a camera...
Definition: k4atypes.h:1082
uint32_t major
Major version; represents a breaking change.
Definition: k4atypes.h:1127
float z
Z component of a vector.
Definition: k4atypes.h:1186
k4a_transformation_interpolation_type_t
Transformation interpolation type.
Definition: k4atypes.h:459
Extrinsic calibration data.
Definition: k4atypes.h:1001
Test signed firmware.
Definition: k4atypes.h:719
uint8_t *() k4a_memory_allocate_cb_t(int size, void **context)
Callback function for a memory allocation.
Definition: k4atypes.h:892
float cx
Principal point in image, x.
Definition: k4atypes.h:1029
float k3
k3 radial distortion coefficient
Definition: k4atypes.h:1035
float k5
k5 radial distortion coefficient
Definition: k4atypes.h:1037
XYZ or array representation of vector.
Definition: k4atypes.h:1182
float k4
k4 radial distortion coefficient
Definition: k4atypes.h:1036
Image type IR16.
Definition: k4atypes.h:413
float codx
Center of distortion in Z=1 plane, x (only used for Rational6KT)
Definition: k4atypes.h:1039
15 FPS
Definition: k4atypes.h:481
1280 * 720 16:9
Definition: k4atypes.h:312
Linear interpolation.
Definition: k4atypes.h:462
uint64_t acc_timestamp_usec
Timestamp of the accelerometer in microseconds.
Definition: k4atypes.h:1203
Single channel image type CUSTOM16.
Definition: k4atypes.h:435
uint32_t iteration
Reserved.
Definition: k4atypes.h:1130
k4a_calibration_type_t
Calibration types.
Definition: k4atypes.h:658
The &#39;Sync Out&#39; jack is enabled and synchronization data it driven out the connected wire...
Definition: k4atypes.h:639
float p1
Tangential distortion coefficient 1.
Definition: k4atypes.h:1042
2nd least severe level of debug messaging.
Definition: k4atypes.h:266
k4a_firmware_build_t
Firmware build type.
Definition: k4atypes.h:702
The result was a failure.
Definition: k4atypes.h:220
Color image type YUY2.
Definition: k4atypes.h:369
float cody
Center of distortion in Z=1 plane, y (only used for Rational6KT)
Definition: k4atypes.h:1040
Exposure time setting.
Definition: k4atypes.h:521
float k2
k2 radial distortion coefficient
Definition: k4atypes.h:1034
Microsoft signed firmware.
Definition: k4atypes.h:718
k4a_firmware_signature_t firmware_signature
Signature type of the firmware.
Definition: k4atypes.h:1149
bool synchronized_images_only
Only produce k4a_capture_t objects if they contain synchronized color and depth images.
Definition: k4atypes.h:952
Three dimensional floating point vector.
Definition: k4atypes.h:1179
2048 * 1536 4:3
Definition: k4atypes.h:315
bool disable_streaming_indicator
Streaming indicator automatically turns on when the color or depth camera&#39;s are in use...
Definition: k4atypes.h:985
float temperature
Temperature reading of this sample (Celsius).
Definition: k4atypes.h:1201
Exposure or Framerate priority setting.
Definition: k4atypes.h:537
k4a_color_control_mode_t
Color sensor control mode.
Definition: k4atypes.h:622
Single channel image type CUSTOM8.
Definition: k4atypes.h:424
4096 * 3072 4:3
Definition: k4atypes.h:317
set the associated k4a_color_control_command_t to manual
Definition: k4atypes.h:625
Handle to an Azure Kinect transformation context.
Definition: k4atypes.h:195
Depth captured at 512x512.
Definition: k4atypes.h:295
Depth image type DEPTH16.
Definition: k4atypes.h:398
k4a_color_resolution_t
Color sensor resolutions.
Definition: k4atypes.h:309
Unsigned firmware.
Definition: k4atypes.h:720
void() k4a_memory_destroy_cb_t(void *buffer, void *context)
Callback function for a memory object being destroyed.
Definition: k4atypes.h:868
3840 * 2160 16:9
Definition: k4atypes.h:316
Color camera will be turned off with this setting.
Definition: k4atypes.h:311
The result was successful.
Definition: k4atypes.h:219
k4a_fps_t camera_fps
Desired frame rate for the color and depth camera.
Definition: k4atypes.h:932
k4a_calibration_camera_t color_camera_calibration
Color camera calibration.
Definition: k4atypes.h:1103
float fy
Focal length y.
Definition: k4atypes.h:1032
1920 * 1080 16:9
Definition: k4atypes.h:313
Accelerometer sensor.
Definition: k4atypes.h:664
float p2
Tangential distortion coefficient 2.
Definition: k4atypes.h:1041
Backlight compensation setting.
Definition: k4atypes.h:588
int32_t depth_delay_off_color_usec
Desired delay between the capture of the color image and the capture of the depth image...
Definition: k4atypes.h:963
Deprecated (not supported).
Definition: k4atypes.h:686
XY or array representation of vector.
Definition: k4atypes.h:1163
k4a_firmware_signature_t
Firmware signature type.
Definition: k4atypes.h:716
float fx
Focal length x.
Definition: k4atypes.h:1031
int resolution_width
Resolution width of the calibration sensor.
Definition: k4atypes.h:1086
Depth captured at 320x288.
Definition: k4atypes.h:293
k4a_float3_t gyro_sample
Gyro sample in radians per second.
Definition: k4atypes.h:1204
Color sensor.
Definition: k4atypes.h:662
k4a_calibration_camera_t depth_camera_calibration
Depth camera calibration.
Definition: k4atypes.h:1101
float metric_radius
Metric radius.
Definition: k4atypes.h:1043
Handle to an Azure Kinect device.
Definition: k4atypes.h:66
Depth sensor.
Definition: k4atypes.h:661
Two dimensional floating point vector.
Definition: k4atypes.h:1160
void() k4a_logging_message_cb_t(void *context, k4a_log_level_t level, const char *file, const int line, const char *message)
Callback function for debug messages being generated by the Azure Kinect SDK.
Definition: k4atypes.h:842
Handle to an Azure Kinect image.
Definition: k4atypes.h:173
Least severe level of debug messaging.
Definition: k4atypes.h:267
k4a_version_t depth_sensor
Depth sensor firmware version.
Definition: k4atypes.h:1146
Configuration parameters for an Azure Kinect device.
Definition: k4atypes.h:917
The result was a failure.
Definition: k4atypes.h:249
static const k4a_device_configuration_t K4A_DEVICE_CONFIG_INIT_DISABLE_ALL
Initial configuration setting for disabling all sensors.
Definition: k4atypes.h:1253
Neither &#39;Sync In&#39; or &#39;Sync Out&#39; connections are used.
Definition: k4atypes.h:638
The input buffer was too small.
Definition: k4atypes.h:235
k4a_log_level_t
Verbosity levels of debug messaging.
Definition: k4atypes.h:261
Deprecated (only supported early internal devices).
Definition: k4atypes.h:688
k4a_color_control_command_t
Color sensor control commands.
Definition: k4atypes.h:503
Custom image format.
Definition: k4atypes.h:445
The &#39;Sync In&#39; jack is used for synchronization and &#39;Sync Out&#39; is driven for the next device in the ch...
Definition: k4atypes.h:643
Sharpness setting.
Definition: k4atypes.h:568
Camera intrinsic calibration data.
Definition: k4atypes.h:1024
uint32_t minor
Minor version; represents additional features, no regression from lower versions with same major vers...
Definition: k4atypes.h:1128
k4a_wait_result_t
Result code returned by Azure Kinect APIs.
Definition: k4atypes.h:246
float x
X component of a vector.
Definition: k4atypes.h:1184
k4a_image_format_t
Image format type.
Definition: k4atypes.h:332
k4a_version_t depth
Depth camera firmware version.
Definition: k4atypes.h:1144
Color image type MJPG.
Definition: k4atypes.h:345
Version information.
Definition: k4atypes.h:1125