Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
Go to the documentation of this file.
1 /* License: Apache 2.0. See LICENSE file in root directory.
2  Copyright(c) 2017 Intel Corporation. All Rights Reserved. */
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
30 typedef enum rs2_exception_type
31 {
45 typedef enum rs2_distortion
46 {
55 const char* rs2_distortion_to_string(rs2_distortion distortion);
58 typedef struct rs2_intrinsics
59 {
60  int width;
61  int height;
62  float ppx;
63  float ppy;
64  float fx;
65  float fy;
67  float coeffs[5];
73 #pragma pack( push, 1 )
74  typedef struct rs2_dsm_params
75  {
76  unsigned long long timestamp;
77  unsigned short version;
78  unsigned char model;
79  unsigned char flags[5];
80  float h_scale;
81  float v_scale;
82  float h_offset;
83  float v_offset;
84  float rtd_offset;
85  unsigned char temp_x2;
86  float mc_h_scale;
87  float mc_v_scale;
88  unsigned char weeks_since_calibration;
90  unsigned char reserved[1];
92 #pragma pack( pop )
95 {
104 {
105  /* \internal
106  * Scale X cross axis cross axis Bias X \n
107  * cross axis Scale Y cross axis Bias Y \n
108  * cross axis cross axis Scale Z Bias Z */
109  float data[3][4];
111  float noise_variances[3];
112  float bias_variances[3];
117 typedef struct rs2_vertex
118 {
119  float xyz[3];
120 } rs2_vertex;
123 typedef struct rs2_pixel
124 {
125  int ij[2];
126 } rs2_pixel;
129 typedef struct rs2_vector
130 {
131  float x, y, z;
132 }rs2_vector;
135 typedef struct rs2_quaternion
136 {
137  float x, y, z, w;
140 typedef struct rs2_pose
141 {
148  unsigned int tracker_confidence;
149  unsigned int mapper_confidence;
150 } rs2_pose;
153 typedef enum rs2_log_severity {
166 typedef enum rs2_extension
167 {
225 } rs2_extension;
227 const char* rs2_extension_to_string(rs2_extension type);
230 typedef enum rs2_matchers
231 {
232  RS2_MATCHER_DI, //compare depth and ir based on frame number
234  RS2_MATCHER_DI_C, //compare depth and ir based on frame number,
235  //compare the pair of corresponding depth and ir with color based on closest timestamp,
236  //commonly used by SR300
238  RS2_MATCHER_DLR_C, //compare depth, left and right ir based on frame number,
239  //compare the set of corresponding depth, left and right with color based on closest timestamp,
240  //commonly used by RS415, RS435
242  RS2_MATCHER_DLR, //compare depth, left and right ir based on frame number,
243  //commonly used by RS400, RS405, RS410, RS420, RS430
245  RS2_MATCHER_DIC, //compare depth, ir and confidence based on frame number used by RS500
247  RS2_MATCHER_DIC_C, //compare depth, ir and confidence based on frame number,
248  //compare the set of corresponding depth, ir and confidence with color based on closest timestamp,
249  //commonly used by RS515
251  RS2_MATCHER_DEFAULT, //the default matcher compare all the streams based on closest timestamp
254 } rs2_matchers;
255 const char* rs2_matchers_to_string(rs2_matchers stream);
258 typedef struct rs2_device rs2_device;
259 typedef struct rs2_error rs2_error;
262 typedef struct rs2_frame rs2_frame;
264 typedef struct rs2_pipeline rs2_pipeline;
266 typedef struct rs2_config rs2_config;
273 typedef struct rs2_syncer rs2_syncer;
275 typedef struct rs2_source rs2_source;
280 typedef struct rs2_context rs2_context;
283 typedef struct rs2_sensor rs2_sensor;
284 typedef struct rs2_options rs2_options;
293 typedef void (*rs2_log_callback_ptr)(rs2_log_severity, rs2_log_message const *, void * arg);
297 typedef void (*rs2_frame_callback_ptr)(rs2_frame*, void*);
299 typedef void(*rs2_update_progress_callback_ptr)(const float, void*);
301 typedef double rs2_time_t;
302 typedef long long rs2_metadata_type;
304 rs2_error * rs2_create_error(const char* what, const char* name, const char* args, rs2_exception_type type);
306 const char* rs2_get_failed_function (const rs2_error* error);
307 const char* rs2_get_failed_args (const rs2_error* error);
308 const char* rs2_get_error_message (const rs2_error* error);
309 void rs2_free_error (rs2_error* error);
311 #ifdef __cplusplus
312 }
313 #endif
314 #endif
struct rs2_processing_block_list rs2_processing_block_list
Definition: rs_types.h:269
Definition: rs_types.h:157
struct rs2_device_serializer rs2_device_serializer
Definition: rs_types.h:274
Definition: rs_types.hpp:25
struct rs2_vertex rs2_vertex
3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from th...
Definition: rs_types.h:251
float rtd_offset
Definition: rs_types.h:84
struct rs2_raw_data_buffer rs2_raw_data_buffer
Definition: rs_types.h:261
struct rs2_pixel rs2_pixel
Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right, positive Y is down.
Exception types are the different categories of errors that RealSense API might return.
Definition: rs_types.h:30
Definition: rs_types.h:223
float y
Definition: rs_types.h:137
float v_offset
Definition: rs_types.h:83
void rs2_free_error(rs2_error *error)
rs2_vector angular_acceleration
Definition: rs_types.h:147
Definition: rs_types.h:197
Definition: rs_types.h:171
const char * rs2_matchers_to_string(rs2_matchers stream)
Definition: rs_types.h:204
Definition: rs_types.h:195
float z
Definition: rs_types.h:131
unsigned int tracker_confidence
Definition: rs_types.h:148
Definition: rs_types.h:196
Definition: rs_types.h:210
Definition: rs_types.hpp:39
Definition: rs_types.h:48
void(* rs2_frame_processor_callback_ptr)(rs2_frame *, rs2_source *, void *)
Definition: rs_types.h:298
Definition: rs_types.h:198
Definition: rs_types.h:177
struct rs2_frame_queue rs2_frame_queue
Definition: rs_types.h:263
Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.
Definition: rs_types.h:45
Definition: rs_types.h:37
unsigned char weeks_since_calibration
Definition: rs_types.h:88
Definition: rs_types.h:99
Video DSM (Digital Sync Module) parameters for calibration (same layout as in FW ac_depth_params) Thi...
Definition: rs_types.h:74
Definition: rs_types.h:207
float v_scale
Definition: rs_types.h:81
Definition: rs_types.h:98
const char * rs2_distortion_to_string(rs2_distortion distortion)
struct rs2_pipeline rs2_pipeline
Definition: rs_types.h:264
struct rs2_dsm_params rs2_dsm_params
Video DSM (Digital Sync Module) parameters for calibration (same layout as in FW ac_depth_params) Thi...
Definition: rs_types.h:161
float h_scale
Definition: rs_types.h:80
struct rs2_context rs2_context
Definition: rs_types.h:280
struct rs2_device_info rs2_device_info
Definition: rs_types.h:257
rs2_vector translation
Definition: rs_types.h:142
Definition: rs_types.h:156
struct rs2_sensor_list rs2_sensor_list
Definition: rs_types.h:282
Definition: rs_types.h:179
Definition: rs_types.h:247
Definition: rs_types.h:245
Definition: rs_types.h:53
float data[3][4]
Definition: rs_types.h:109
Definition: rs_types.h:52
Definition: rs_types.hpp:76
Definition: rs_types.h:51
float coeffs[5]
Definition: rs_types.h:67
float mc_v_scale
Definition: rs_types.h:87
3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from th...
Definition: rs_types.h:117
Definition: rs_types.h:32
unsigned long long timestamp
Definition: rs_types.h:76
Definition: rs_types.h:191
const char * rs2_extension_to_string(rs2_extension type)
unsigned char model
Definition: rs_types.h:78
Definition: rs_types.h:175
Definition: rs_types.h:181
float x
Definition: rs_types.h:137
struct rs2_firmware_log_parser rs2_firmware_log_parser
Definition: rs_types.h:291
rs2_vector angular_velocity
Definition: rs_types.h:146
Definition: rs_types.h:97
unsigned char temp_x2
Definition: rs_types.h:85
void(* rs2_log_callback_ptr)(rs2_log_severity, rs2_log_message const *, void *arg)
Definition: rs_types.h:293
struct rs2_sensor rs2_sensor
Definition: rs_types.h:283
Definition: rs_types.hpp:55
Definition: rs_types.h:154
void(* rs2_update_progress_callback_ptr)(const float, void *)
Definition: rs_types.h:299
Definition: rs_types.h:187
float ppx
Definition: rs_types.h:62
const char * rs2_exception_type_to_string(rs2_exception_type type)
unsigned int mapper_confidence
Definition: rs_types.h:149
Quaternion used to represent rotation.
Definition: rs_types.h:135
Definition: rs_types.h:221
Definition: rs_types.h:168
float y
Definition: rs_types.h:131
Definition: rs_types.h:192
struct rs2_pipeline_profile rs2_pipeline_profile
Definition: rs_types.h:265
unsigned char reserved[1]
Definition: rs_types.h:90
unsigned short version
Definition: rs_types.h:77
float noise_variances[3]
Definition: rs_types.h:111
struct rs2_config rs2_config
Definition: rs_types.h:266
struct rs2_notification rs2_notification
Definition: rs_types.h:287
Definition: rs_types.h:216
rs2_vector velocity
Definition: rs_types.h:143
Definition: rs_types.h:47
Definition: rs_types.h:40
Definition: rs_types.h:39
struct rs2_device_hub rs2_device_hub
Definition: rs_types.h:281
Definition: rs_types.h:232
Definition: rs_types.h:180
unsigned char flags[5]
Definition: rs_types.h:79
Definition: rs_types.h:174
Definition: rs_types.h:34
Definition: rs_types.hpp:32
Definition: rs_types.h:185
Definition: rs_types.h:211
const char * rs2_get_error_message(const rs2_error *error)
Specifies types of different matchers.
Definition: rs_types.h:230
const char * rs2_extension_type_to_string(rs2_extension type)
Definition: rs_types.h:172
Definition: rs_types.h:50
Definition: rs_types.h:178
Definition: rs_types.h:140
Definition: rs_types.h:212
struct rs2_motion_device_intrinsic rs2_motion_device_intrinsic
Motion device intrinsics: scale, bias, and variances.
Definition: rs_types.h:220
int ij[2]
Definition: rs_types.h:125
struct rs2_stream_profile_list rs2_stream_profile_list
Definition: rs_types.h:268
Definition: rs_types.h:186
void(* rs2_devices_changed_callback_ptr)(rs2_device_list *, rs2_device_list *, void *)
Definition: rs_types.h:296
rs2_quaternion rotation
Definition: rs_types.h:145
struct rs2_log_message rs2_log_message
Definition: rs_types.h:260
Definition: rs_types.h:208
int width
Definition: rs_types.h:60
struct rs2_stream_profile rs2_stream_profile
Definition: rs_types.h:270
Definition: rs_types.h:159
Definition: rs_types.h:205
Definition: rs_types.h:213
Definition: rs_types.h:182
rs2_exception_type rs2_get_librealsense_exception_type(const rs2_error *error)
struct rs2_options rs2_options
Definition: rs_types.h:284
struct rs2_syncer rs2_syncer
Definition: rs_types.h:273
struct rs2_vector rs2_vector
3D vector in Euclidean coordinate space
Definition: rs_types.h:49
float x
Definition: rs_types.h:131
Definition: rs_types.h:173
struct rs2_source rs2_source
Definition: rs_types.h:275
Definition: rs_types.h:253
struct rs2_terminal_parser rs2_terminal_parser
Definition: rs_types.h:292
Definition: rs_types.h:158
Definition: rs_types.h:193
Definition: rs_types.h:201
unsigned char ac_weeks_since_calibaration
Definition: rs_types.h:89
float h_offset
Definition: rs_types.h:82
Definition: rs_types.h:160
Definition: rs_types.h:224
Definition: rs_types.h:190
Definition: rs_types.h:176
Definition: rs_types.h:155
Definition: rs_types.h:25
struct rs2_intrinsics rs2_intrinsics
Video stream intrinsics.
void(* rs2_software_device_destruction_callback_ptr)(void *)
Definition: rs_types.h:295
Definition: rs_types.h:209
3D vector in Euclidean coordinate space
Definition: rs_types.h:129
Definition: rs_types.h:203
Definition: rs_types.h:96
rs2_error * rs2_create_error(const char *what, const char *name, const char *args, rs2_exception_type type)
rs2_distortion model
Definition: rs_types.h:66
float w
Definition: rs_types.h:137
Definition: rs_types.hpp:83
struct rs2_processing_block rs2_processing_block
Definition: rs_types.h:276
Definition: rs_types.h:169
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:166
Category of the librealsense notification.
Definition: rs_types.h:17
void(* rs2_notification_callback_ptr)(rs2_notification *, void *)
Definition: rs_types.h:294
long long rs2_metadata_type
Definition: rs_types.h:302
Definition: rs_types.h:214
Definition: rs_types.h:183
float fy
Definition: rs_types.h:65
float fx
Definition: rs_types.h:64
Definition: rs_types.h:222
Definition: rs_types.h:170
Definition: rs_types.h:217
struct rs2_device rs2_device
Definition: rs_types.h:258
struct rs2_firmware_log_parsed_message rs2_firmware_log_parsed_message
Definition: rs_types.h:290
Definition: rs_types.h:200
Video stream intrinsics.
Definition: rs_types.h:58
Definition: rs_types.h:206
Definition: rs_types.h:218
Definition: rs_types.h:215
Motion device intrinsics: scale, bias, and variances.
Definition: rs_types.h:103
rs2_vector acceleration
Definition: rs_types.h:144
void(* rs2_frame_callback_ptr)(rs2_frame *, void *)
Definition: rs_types.h:297
Definition: rs_types.h:202
int height
Definition: rs_types.h:61
Definition: rs_types.h:234
struct rs2_device_list rs2_device_list
Definition: rs_types.h:267
struct rs2_pose rs2_pose
const char * rs2_notification_category_to_string(rs2_notification_category category)
Definition: rs_types.h:194
const char * rs2_log_severity_to_string(rs2_log_severity info)
struct rs2_quaternion rs2_quaternion
Quaternion used to represent rotation.
struct rs2_firmware_log_message rs2_firmware_log_message
Definition: rs_types.h:289
Definition: rs_types.hpp:69
Definition: rs_types.h:188
Definition: rs_types.h:189
struct rs2_error rs2_error
Definition: rs_types.h:259
double rs2_time_t
Definition: rs_types.h:301
Definition: rs_types.h:94
Severity of the librealsense logger.
Definition: rs_types.h:153
Definition: rs_types.h:242
Definition: rs_types.h:184
struct rs2_options_list rs2_options_list
Definition: rs_types.h:285
const char * rs2_get_failed_function(const rs2_error *error)
const char * rs2_get_failed_args(const rs2_error *error)
Definition: rs_types.h:238
float bias_variances[3]
Definition: rs_types.h:112
float xyz[3]
Definition: rs_types.h:119
Definition: rs_types.h:35
float z
Definition: rs_types.h:137
struct rs2_frame rs2_frame
Definition: rs_types.h:262
float ppy
Definition: rs_types.h:63
Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right, positive Y is down.
Definition: rs_types.h:123
float mc_h_scale
Definition: rs_types.h:86
Definition: rs_types.h:219
Definition: rs_types.h:199