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 typedef struct rs2_dsm_params
74 {
75  unsigned long long timestamp;
76  unsigned short version;
77  unsigned char model;
78  unsigned char flags[5];
79  float h_scale;
80  float v_scale;
81  float h_offset;
82  float v_offset;
83  float rtd_offset;
84  unsigned char temp_x2;
85  unsigned char reserved[11];
89 {
98 {
99  /* \internal
100  * Scale X cross axis cross axis Bias X \n
101  * cross axis Scale Y cross axis Bias Y \n
102  * cross axis cross axis Scale Z Bias Z */
103  float data[3][4];
105  float noise_variances[3];
106  float bias_variances[3];
111 typedef struct rs2_vertex
112 {
113  float xyz[3];
114 } rs2_vertex;
117 typedef struct rs2_pixel
118 {
119  int ij[2];
120 } rs2_pixel;
123 typedef struct rs2_vector
124 {
125  float x, y, z;
126 }rs2_vector;
129 typedef struct rs2_quaternion
130 {
131  float x, y, z, w;
134 typedef struct rs2_pose
135 {
142  unsigned int tracker_confidence;
143  unsigned int mapper_confidence;
144 } rs2_pose;
147 typedef enum rs2_log_severity {
160 typedef enum rs2_extension
161 {
218 } rs2_extension;
220 const char* rs2_extension_to_string(rs2_extension type);
223 typedef enum rs2_matchers
224 {
225  RS2_MATCHER_DI, //compare depth and ir based on frame number
227  RS2_MATCHER_DI_C, //compare depth and ir based on frame number,
228  //compare the pair of corresponding depth and ir with color based on closest timestamp,
229  //commonly used by SR300
231  RS2_MATCHER_DLR_C, //compare depth, left and right ir based on frame number,
232  //compare the set of corresponding depth, left and right with color based on closest timestamp,
233  //commonly used by RS415, RS435
235  RS2_MATCHER_DLR, //compare depth, left and right ir based on frame number,
236  //commonly used by RS400, RS405, RS410, RS420, RS430
238  RS2_MATCHER_DIC, //compare depth, ir and confidence based on frame number used by RS500
240  RS2_MATCHER_DIC_C, //compare depth, ir and confidence based on frame number,
241  //compare the set of corresponding depth, ir and confidence with color based on closest timestamp,
242  //commonly used by RS515
244  RS2_MATCHER_DEFAULT, //the default matcher compare all the streams based on closest timestamp
247 }rs2_matchers;
250 typedef struct rs2_device rs2_device;
251 typedef struct rs2_error rs2_error;
254 typedef struct rs2_frame rs2_frame;
256 typedef struct rs2_pipeline rs2_pipeline;
258 typedef struct rs2_config rs2_config;
265 typedef struct rs2_syncer rs2_syncer;
267 typedef struct rs2_source rs2_source;
272 typedef struct rs2_context rs2_context;
275 typedef struct rs2_sensor rs2_sensor;
276 typedef struct rs2_options rs2_options;
285 typedef void (*rs2_log_callback_ptr)(rs2_log_severity, rs2_log_message const *, void * arg);
289 typedef void (*rs2_frame_callback_ptr)(rs2_frame*, void*);
291 typedef void(*rs2_update_progress_callback_ptr)(const float, void*);
293 typedef double rs2_time_t;
294 typedef long long rs2_metadata_type;
296 rs2_error * rs2_create_error(const char* what, const char* name, const char* args, rs2_exception_type type);
298 const char* rs2_get_failed_function (const rs2_error* error);
299 const char* rs2_get_failed_args (const rs2_error* error);
300 const char* rs2_get_error_message (const rs2_error* error);
301 void rs2_free_error (rs2_error* error);
303 #ifdef __cplusplus
304 }
305 #endif
306 #endif
struct rs2_processing_block_list rs2_processing_block_list
Definition: rs_types.h:261
Definition: rs_types.h:151
struct rs2_device_serializer rs2_device_serializer
Definition: rs_types.h:266
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:244
float rtd_offset
Definition: rs_types.h:83
struct rs2_raw_data_buffer rs2_raw_data_buffer
Definition: rs_types.h:253
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
float y
Definition: rs_types.h:131
float v_offset
Definition: rs_types.h:82
void rs2_free_error(rs2_error *error)
rs2_vector angular_acceleration
Definition: rs_types.h:141
Definition: rs_types.h:191
Definition: rs_types.h:165
Definition: rs_types.h:198
Definition: rs_types.h:189
float z
Definition: rs_types.h:125
unsigned int tracker_confidence
Definition: rs_types.h:142
Definition: rs_types.h:190
Definition: rs_types.h:204
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:290
Definition: rs_types.h:192
Definition: rs_types.h:171
struct rs2_frame_queue rs2_frame_queue
Definition: rs_types.h:255
Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.
Definition: rs_types.h:45
Definition: rs_types.h:37
Definition: rs_types.h:93
Video DSM (Digital Sync Module) parameters for calibration (same layout as in FW ac_depth_params) Thi...
Definition: rs_types.h:73
Definition: rs_types.h:201
float v_scale
Definition: rs_types.h:80
Definition: rs_types.h:92
const char * rs2_distortion_to_string(rs2_distortion distortion)
struct rs2_pipeline rs2_pipeline
Definition: rs_types.h:256
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:155
float h_scale
Definition: rs_types.h:79
struct rs2_context rs2_context
Definition: rs_types.h:272
struct rs2_device_info rs2_device_info
Definition: rs_types.h:249
rs2_vector translation
Definition: rs_types.h:136
Definition: rs_types.h:150
struct rs2_sensor_list rs2_sensor_list
Definition: rs_types.h:274
Definition: rs_types.h:173
Definition: rs_types.h:240
Definition: rs_types.h:238
Definition: rs_types.h:53
float data[3][4]
Definition: rs_types.h:103
Definition: rs_types.h:52
Definition: rs_types.hpp:76
Definition: rs_types.h:51
float coeffs[5]
Definition: rs_types.h:67
3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from th...
Definition: rs_types.h:111
Definition: rs_types.h:32
unsigned long long timestamp
Definition: rs_types.h:75
Definition: rs_types.h:185
const char * rs2_extension_to_string(rs2_extension type)
unsigned char model
Definition: rs_types.h:77
Definition: rs_types.h:169
Definition: rs_types.h:175
float x
Definition: rs_types.h:131
struct rs2_firmware_log_parser rs2_firmware_log_parser
Definition: rs_types.h:283
rs2_vector angular_velocity
Definition: rs_types.h:140
Definition: rs_types.h:91
unsigned char temp_x2
Definition: rs_types.h:84
void(* rs2_log_callback_ptr)(rs2_log_severity, rs2_log_message const *, void *arg)
Definition: rs_types.h:285
struct rs2_sensor rs2_sensor
Definition: rs_types.h:275
Definition: rs_types.hpp:55
Definition: rs_types.h:148
void(* rs2_update_progress_callback_ptr)(const float, void *)
Definition: rs_types.h:291
Definition: rs_types.h:181
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:143
Quaternion used to represent rotation.
Definition: rs_types.h:129
Definition: rs_types.h:215
Definition: rs_types.h:162
float y
Definition: rs_types.h:125
Definition: rs_types.h:186
struct rs2_pipeline_profile rs2_pipeline_profile
Definition: rs_types.h:257
unsigned short version
Definition: rs_types.h:76
float noise_variances[3]
Definition: rs_types.h:105
struct rs2_config rs2_config
Definition: rs_types.h:258
struct rs2_notification rs2_notification
Definition: rs_types.h:279
Definition: rs_types.h:210
rs2_vector velocity
Definition: rs_types.h:137
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:273
Definition: rs_types.h:225
Definition: rs_types.h:174
unsigned char flags[5]
Definition: rs_types.h:78
Definition: rs_types.h:168
Definition: rs_types.h:34
Definition: rs_types.hpp:32
Definition: rs_types.h:179
Definition: rs_types.h:205
const char * rs2_get_error_message(const rs2_error *error)
Specifies types of different matchers.
Definition: rs_types.h:223
const char * rs2_extension_type_to_string(rs2_extension type)
Definition: rs_types.h:166
Definition: rs_types.h:50
Definition: rs_types.h:172
Definition: rs_types.h:134
Definition: rs_types.h:206
struct rs2_motion_device_intrinsic rs2_motion_device_intrinsic
Motion device intrinsics: scale, bias, and variances.
Definition: rs_types.h:214
int ij[2]
Definition: rs_types.h:119
struct rs2_stream_profile_list rs2_stream_profile_list
Definition: rs_types.h:260
Definition: rs_types.h:180
void(* rs2_devices_changed_callback_ptr)(rs2_device_list *, rs2_device_list *, void *)
Definition: rs_types.h:288
rs2_quaternion rotation
Definition: rs_types.h:139
struct rs2_log_message rs2_log_message
Definition: rs_types.h:252
Definition: rs_types.h:202
int width
Definition: rs_types.h:60
struct rs2_stream_profile rs2_stream_profile
Definition: rs_types.h:262
Definition: rs_types.h:153
Definition: rs_types.h:199
Definition: rs_types.h:207
Definition: rs_types.h:176
rs2_exception_type rs2_get_librealsense_exception_type(const rs2_error *error)
struct rs2_options rs2_options
Definition: rs_types.h:276
struct rs2_syncer rs2_syncer
Definition: rs_types.h:265
struct rs2_vector rs2_vector
3D vector in Euclidean coordinate space
Definition: rs_types.h:49
float x
Definition: rs_types.h:125
Definition: rs_types.h:167
struct rs2_source rs2_source
Definition: rs_types.h:267
Definition: rs_types.h:246
struct rs2_terminal_parser rs2_terminal_parser
Definition: rs_types.h:284
Definition: rs_types.h:152
Definition: rs_types.h:187
Definition: rs_types.h:195
float h_offset
Definition: rs_types.h:81
Definition: rs_types.h:154
Definition: rs_types.h:217
Definition: rs_types.h:184
Definition: rs_types.h:170
Definition: rs_types.h:149
Definition: rs_types.h:25
struct rs2_intrinsics rs2_intrinsics
Video stream intrinsics.
unsigned char reserved[11]
Definition: rs_types.h:85
void(* rs2_software_device_destruction_callback_ptr)(void *)
Definition: rs_types.h:287
Definition: rs_types.h:203
3D vector in Euclidean coordinate space
Definition: rs_types.h:123
Definition: rs_types.h:197
Definition: rs_types.h:90
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:131
Definition: rs_types.hpp:83
struct rs2_processing_block rs2_processing_block
Definition: rs_types.h:268
Definition: rs_types.h:163
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:160
Category of the librealsense notification.
Definition: rs_types.h:17
void(* rs2_notification_callback_ptr)(rs2_notification *, void *)
Definition: rs_types.h:286
long long rs2_metadata_type
Definition: rs_types.h:294
Definition: rs_types.h:208
Definition: rs_types.h:177
float fy
Definition: rs_types.h:65
float fx
Definition: rs_types.h:64
Definition: rs_types.h:216
Definition: rs_types.h:164
Definition: rs_types.h:211
struct rs2_device rs2_device
Definition: rs_types.h:250
struct rs2_firmware_log_parsed_message rs2_firmware_log_parsed_message
Definition: rs_types.h:282
Definition: rs_types.h:194
Video stream intrinsics.
Definition: rs_types.h:58
Definition: rs_types.h:200
Definition: rs_types.h:212
Definition: rs_types.h:209
Motion device intrinsics: scale, bias, and variances.
Definition: rs_types.h:97
rs2_vector acceleration
Definition: rs_types.h:138
void(* rs2_frame_callback_ptr)(rs2_frame *, void *)
Definition: rs_types.h:289
Definition: rs_types.h:196
int height
Definition: rs_types.h:61
Definition: rs_types.h:227
struct rs2_device_list rs2_device_list
Definition: rs_types.h:259
struct rs2_pose rs2_pose
const char * rs2_notification_category_to_string(rs2_notification_category category)
Definition: rs_types.h:188
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:281
Definition: rs_types.hpp:69
Definition: rs_types.h:182
Definition: rs_types.h:183
struct rs2_error rs2_error
Definition: rs_types.h:251
double rs2_time_t
Definition: rs_types.h:293
Definition: rs_types.h:88
Severity of the librealsense logger.
Definition: rs_types.h:147
Definition: rs_types.h:235
Definition: rs_types.h:178
struct rs2_options_list rs2_options_list
Definition: rs_types.h:277
const char * rs2_get_failed_function(const rs2_error *error)
const char * rs2_get_failed_args(const rs2_error *error)
Definition: rs_types.h:231
float bias_variances[3]
Definition: rs_types.h:106
float xyz[3]
Definition: rs_types.h:113
Definition: rs_types.h:35
float z
Definition: rs_types.h:131
struct rs2_frame rs2_frame
Definition: rs_types.h:254
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:117
Definition: rs_types.h:213
Definition: rs_types.h:193