Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
rs_types.h
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. */
3 
9 #ifndef LIBREALSENSE_RS2_TYPES_H
10 #define LIBREALSENSE_RS2_TYPES_H
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
28 
30 typedef enum rs2_exception_type
31 {
43 
45 typedef enum rs2_distortion
46 {
55 const char* rs2_distortion_to_string(rs2_distortion distortion);
56 
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];
69 
72 {
73  /* \internal
74  * Scale X cross axis cross axis Bias X \n
75  * cross axis Scale Y cross axis Bias Y \n
76  * cross axis cross axis Scale Z Bias Z */
77  float data[3][4];
79  float noise_variances[3];
80  float bias_variances[3];
82 
85 typedef struct rs2_vertex
86 {
87  float xyz[3];
88 } rs2_vertex;
89 
91 typedef struct rs2_pixel
92 {
93  int ij[2];
94 } rs2_pixel;
95 
97 typedef struct rs2_vector
98 {
99  float x, y, z;
100 }rs2_vector;
101 
103 typedef struct rs2_quaternion
104 {
105  float x, y, z, w;
107 
108 typedef struct rs2_pose
109 {
116  unsigned int tracker_confidence;
117  unsigned int mapper_confidence;
118 } rs2_pose;
119 
121 typedef enum rs2_log_severity {
131 
133 typedef enum rs2_extension
134 {
178 } rs2_extension;
180 const char* rs2_extension_to_string(rs2_extension type);
181 
183 typedef enum rs2_matchers
184 {
185  RS2_MATCHER_DI, //compare depth and ir based on frame number
186 
187  RS2_MATCHER_DI_C, //compare depth and ir based on frame number,
188  //compare the pair of corresponding depth and ir with color based on closest timestamp,
189  //commonly used by SR300
190 
191  RS2_MATCHER_DLR_C, //compare depth, left and right ir based on frame number,
192  //compare the set of corresponding depth, left and right with color based on closest timestamp,
193  //commonly used by RS415, RS435
194 
195  RS2_MATCHER_DLR, //compare depth, left and right ir based on frame number,
196  //commonly used by RS400, RS405, RS410, RS420, RS430
197 
198  RS2_MATCHER_DIC, //compare depth, ir and confidence based on frame number used by RS500
199 
200  RS2_MATCHER_DIC_C, //compare depth, ir and confidence based on frame number,
201  //compare the set of corresponding depth, ir and confidence with color based on closest timestamp,
202  //commonly used by RS515
203 
204  RS2_MATCHER_DEFAULT, //the default matcher compare all the streams based on closest timestamp
205 
207 }rs2_matchers;
208 
210 typedef struct rs2_device rs2_device;
211 typedef struct rs2_error rs2_error;
213 typedef struct rs2_frame rs2_frame;
215 typedef struct rs2_pipeline rs2_pipeline;
217 typedef struct rs2_config rs2_config;
224 typedef struct rs2_syncer rs2_syncer;
226 typedef struct rs2_source rs2_source;
231 typedef struct rs2_context rs2_context;
234 typedef struct rs2_sensor rs2_sensor;
235 typedef struct rs2_options rs2_options;
242 typedef void (*rs2_frame_callback_ptr)(rs2_frame*, void*);
244 typedef void(*rs2_update_progress_callback_ptr)(const float, void*);
245 
246 typedef double rs2_time_t;
247 typedef long long rs2_metadata_type;
249 rs2_error * rs2_create_error(const char* what, const char* name, const char* args, rs2_exception_type type);
251 const char* rs2_get_failed_function (const rs2_error* error);
252 const char* rs2_get_failed_args (const rs2_error* error);
253 const char* rs2_get_error_message (const rs2_error* error);
254 void rs2_free_error (rs2_error* error);
255 
256 #ifdef __cplusplus
257 }
258 #endif
259 #endif
rs2_playback_status_changed_callback
Definition: rs_types.hpp:60
rs2_vector
3D vector in Euclidean coordinate space
Definition: rs_types.h:97
RS2_EXTENSION_TM2
Definition: rs_types.h:157
RS2_EXTENSION_MOTION
Definition: rs_types.h:138
RS2_NOTIFICATION_CATEGORY_COUNT
Definition: rs_types.h:25
rs2_quaternion
Quaternion used to represent rotation
Definition: rs_types.h:103
RS2_EXCEPTION_TYPE_COUNT
Definition: rs_types.h:40
rs2_get_error_message
const char * rs2_get_error_message(const rs2_error *error)
RS2_NOTIFICATION_CATEGORY_HARDWARE_EVENT
Definition: rs_types.h:21
RS2_EXTENSION_DEBUG
Definition: rs_types.h:136
RS2_DISTORTION_MODIFIED_BROWN_CONRADY
Definition: rs_types.h:48
RS2_EXTENSION_HOLE_FILLING_FILTER
Definition: rs_types.h:165
RS2_EXTENSION_MOTION_FRAME
Definition: rs_types.h:144
rs2_notification_category_to_string
const char * rs2_notification_category_to_string(rs2_notification_category category)
rs2_frame_callback_ptr
void(* rs2_frame_callback_ptr)(rs2_frame *, void *)
Definition: rs_types.h:242
rs2_motion_device_intrinsic
struct rs2_motion_device_intrinsic rs2_motion_device_intrinsic
Motion device intrinsics: scale, bias, and variances.
RS2_EXTENSION_POSE_SENSOR
Definition: rs_types.h:169
rs2_create_error
rs2_error * rs2_create_error(const char *what, const char *name, const char *args, rs2_exception_type type)
RS2_EXCEPTION_TYPE_NOT_IMPLEMENTED
Definition: rs_types.h:37
rs2_intrinsics
struct rs2_intrinsics rs2_intrinsics
Video stream intrinsics.
rs2_pose::angular_velocity
rs2_vector angular_velocity
Definition: rs_types.h:114
rs2_devices_changed_callback
Definition: rs_types.hpp:53
rs2_matchers
rs2_matchers
Specifies types of different matchers.
Definition: rs_types.h:183
RS2_EXTENSION_POSE_PROFILE
Definition: rs_types.h:156
rs2_extension
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:133
RS2_EXCEPTION_TYPE_CAMERA_DISCONNECTED
Definition: rs_types.h:33
rs2_extension_type_to_string
const char * rs2_extension_type_to_string(rs2_extension type)
rs2_intrinsics
Video stream intrinsics.
Definition: rs_types.h:58
RS2_EXTENSION_UPDATE_DEVICE
Definition: rs_types.h:173
rs2_frame
struct rs2_frame rs2_frame
Definition: rs_types.h:213
RS2_LOG_SEVERITY_WARN
Definition: rs_types.h:124
RS2_EXTENSION_UPDATABLE
Definition: rs_types.h:172
RS2_EXCEPTION_TYPE_BACKEND
Definition: rs_types.h:34
rs2_intrinsics::ppx
float ppx
Definition: rs_types.h:62
rs2_source
struct rs2_source rs2_source
Definition: rs_types.h:226
rs2_intrinsics::height
int height
Definition: rs_types.h:61
rs2_vertex::xyz
float xyz[3]
Definition: rs_types.h:87
RS2_EXTENSION_RECORD
Definition: rs_types.h:149
RS2_EXTENSION_COMPOSITE_FRAME
Definition: rs_types.h:145
RS2_EXTENSION_ADVANCED_MODE
Definition: rs_types.h:148
RS2_DISTORTION_COUNT
Definition: rs_types.h:53
RS2_MATCHER_DIC_C
Definition: rs_types.h:200
rs2_get_failed_args
const char * rs2_get_failed_args(const rs2_error *error)
rs2_notifications_callback
Definition: rs_types.hpp:39
RS2_EXTENSION_POSE
Definition: rs_types.h:168
RS2_EXCEPTION_TYPE_UNKNOWN
Definition: rs_types.h:32
RS2_EXCEPTION_TYPE_INVALID_VALUE
Definition: rs_types.h:35
rs2_log_severity
rs2_log_severity
Severity of the librealsense logger.
Definition: rs_types.h:121
rs2_pose::rotation
rs2_quaternion rotation
Definition: rs_types.h:113
RS2_NOTIFICATION_CATEGORY_HARDWARE_ERROR
Definition: rs_types.h:20
rs2_vector::z
float z
Definition: rs_types.h:99
RS2_EXTENSION_MOTION_PROFILE
Definition: rs_types.h:154
rs2_pixel
Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right,...
Definition: rs_types.h:91
RS2_NOTIFICATION_CATEGORY_POSE_RELOCALIZATION
Definition: rs_types.h:24
rs2_vertex
struct rs2_vertex rs2_vertex
3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from th...
RS2_DISTORTION_FTHETA
Definition: rs_types.h:50
rs2_notification
struct rs2_notification rs2_notification
Definition: rs_types.h:238
RS2_EXTENSION_SOFTWARE_DEVICE
Definition: rs_types.h:158
rs2_notification_callback_ptr
void(* rs2_notification_callback_ptr)(rs2_notification *, void *)
Definition: rs_types.h:240
rs2_motion_device_intrinsic
Motion device intrinsics: scale, bias, and variances.
Definition: rs_types.h:71
RS2_EXTENSION_ROI
Definition: rs_types.h:141
rs2_context
struct rs2_context rs2_context
Definition: rs_types.h:231
rs2_quaternion::y
float y
Definition: rs_types.h:105
RS2_EXTENSION_UNKNOWN
Definition: rs_types.h:135
RS2_EXTENSION_COUNT
Definition: rs_types.h:177
rs2_intrinsics::fx
float fx
Definition: rs_types.h:64
rs2_frame_processor_callback
Definition: rs_types.hpp:32
RS2_EXTENSION_RECOMMENDED_FILTERS
Definition: rs_types.h:167
RS2_EXTENSION_L500_DEPTH_SENSOR
Definition: rs_types.h:174
rs2_intrinsics::model
rs2_distortion model
Definition: rs_types.h:66
rs2_log_callback
Definition: rs_types.hpp:46
rs2_options
struct rs2_options rs2_options
Definition: rs_types.h:235
rs2_devices_changed_callback_ptr
void(* rs2_devices_changed_callback_ptr)(rs2_device_list *, rs2_device_list *, void *)
Definition: rs_types.h:241
RS2_EXTENSION_SPATIAL_FILTER
Definition: rs_types.h:163
RS2_EXTENSION_DEPTH_STEREO_SENSOR
Definition: rs_types.h:152
RS2_EXTENSION_VIDEO_PROFILE
Definition: rs_types.h:150
RS2_EXTENSION_SOFTWARE_SENSOR
Definition: rs_types.h:159
rs2_metadata_type
long long rs2_metadata_type
Definition: rs_types.h:247
rs2_intrinsics::ppy
float ppy
Definition: rs_types.h:63
rs2_pipeline_profile
struct rs2_pipeline_profile rs2_pipeline_profile
Definition: rs_types.h:216
rs2_sensor
struct rs2_sensor rs2_sensor
Definition: rs_types.h:234
rs2_log_severity_to_string
const char * rs2_log_severity_to_string(rs2_log_severity info)
RS2_EXTENSION_VIDEO_FRAME
Definition: rs_types.h:143
RS2_EXCEPTION_TYPE_IO
Definition: rs_types.h:39
RS2_EXTENSION_TM2_SENSOR
Definition: rs_types.h:175
RS2_MATCHER_DI
Definition: rs_types.h:185
rs2_pixel::ij
int ij[2]
Definition: rs_types.h:93
RS2_LOG_SEVERITY_INFO
Definition: rs_types.h:123
rs2_vector::y
float y
Definition: rs_types.h:99
rs2_pose::velocity
rs2_vector velocity
Definition: rs_types.h:111
RS2_MATCHER_DIC
Definition: rs_types.h:198
RS2_DISTORTION_KANNALA_BRANDT4
Definition: rs_types.h:52
rs2_intrinsics::fy
float fy
Definition: rs_types.h:65
rs2_pose
Definition: rs_types.h:108
rs2_pipeline
struct rs2_pipeline rs2_pipeline
Definition: rs_types.h:215
rs2_vector::x
float x
Definition: rs_types.h:99
RS2_DISTORTION_BROWN_CONRADY
Definition: rs_types.h:51
RS2_MATCHER_COUNT
Definition: rs_types.h:206
rs2_sensor_list
struct rs2_sensor_list rs2_sensor_list
Definition: rs_types.h:233
RS2_EXTENSION_DECIMATION_FILTER
Definition: rs_types.h:160
rs2_syncer
struct rs2_syncer rs2_syncer
Definition: rs_types.h:224
rs2_pose::angular_acceleration
rs2_vector angular_acceleration
Definition: rs_types.h:115
RS2_EXTENSION_ZERO_ORDER_FILTER
Definition: rs_types.h:166
RS2_EXTENSION_DEPTH_SENSOR
Definition: rs_types.h:142
rs2_pose::mapper_confidence
unsigned int mapper_confidence
Definition: rs_types.h:117
RS2_MATCHER_DLR
Definition: rs_types.h:195
RS2_EXTENSION_INFO
Definition: rs_types.h:137
rs2_pose::translation
rs2_vector translation
Definition: rs_types.h:110
RS2_EXTENSION_PLAYBACK
Definition: rs_types.h:151
RS2_LOG_SEVERITY_FATAL
Definition: rs_types.h:126
RS2_MATCHER_DEFAULT
Definition: rs_types.h:204
RS2_EXTENSION_WHEEL_ODOMETER
Definition: rs_types.h:170
rs2_quaternion
struct rs2_quaternion rs2_quaternion
Quaternion used to represent rotation
rs2_motion_device_intrinsic::noise_variances
float noise_variances[3]
Definition: rs_types.h:79
rs2_quaternion::w
float w
Definition: rs_types.h:105
RS2_EXTENSION_DEPTH_FRAME
Definition: rs_types.h:147
rs2_intrinsics::width
int width
Definition: rs_types.h:60
rs2_vertex
3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from th...
Definition: rs_types.h:85
rs2_raw_data_buffer
struct rs2_raw_data_buffer rs2_raw_data_buffer
Definition: rs_types.h:212
RS2_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE
Definition: rs_types.h:36
RS2_EXTENSION_VIDEO
Definition: rs_types.h:140
rs2_free_error
void rs2_free_error(rs2_error *error)
RS2_EXTENSION_GLOBAL_TIMER
Definition: rs_types.h:171
rs2_stream_profile
struct rs2_stream_profile rs2_stream_profile
Definition: rs_types.h:221
RS2_EXTENSION_OPTIONS
Definition: rs_types.h:139
rs2_stream_profile_list
struct rs2_stream_profile_list rs2_stream_profile_list
Definition: rs_types.h:219
rs2_pose::tracker_confidence
unsigned int tracker_confidence
Definition: rs_types.h:116
rs2_device
struct rs2_device rs2_device
Definition: rs_types.h:210
RS2_DISTORTION_NONE
Definition: rs_types.h:47
rs2_time_t
double rs2_time_t
Definition: rs_types.h:246
rs2_update_progress_callback
Definition: rs_types.hpp:67
rs2_frame_queue
struct rs2_frame_queue rs2_frame_queue
Definition: rs_types.h:214
RS2_NOTIFICATION_CATEGORY_FIRMWARE_UPDATE_RECOMMENDED
Definition: rs_types.h:23
rs2_pose::acceleration
rs2_vector acceleration
Definition: rs_types.h:112
rs2_processing_block_list
struct rs2_processing_block_list rs2_processing_block_list
Definition: rs_types.h:220
rs2_motion_device_intrinsic::bias_variances
float bias_variances[3]
Definition: rs_types.h:80
rs2_config
struct rs2_config rs2_config
Definition: rs_types.h:217
rs2_quaternion::z
float z
Definition: rs_types.h:105
rs2_distortion
rs2_distortion
Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.
Definition: rs_types.h:45
RS2_EXTENSION_TEMPORAL_FILTER
Definition: rs_types.h:164
RS2_EXTENSION_AUTO_CALIBRATED_DEVICE
Definition: rs_types.h:176
rs2_device_hub
struct rs2_device_hub rs2_device_hub
Definition: rs_types.h:232
RS2_EXTENSION_POINTS
Definition: rs_types.h:146
RS2_EXCEPTION_TYPE_DEVICE_IN_RECOVERY_MODE
Definition: rs_types.h:38
rs2_device_info
struct rs2_device_info rs2_device_info
Definition: rs_types.h:209
RS2_EXTENSION_POSE_FRAME
Definition: rs_types.h:155
RS2_EXTENSION_DISPARITY_FRAME
Definition: rs_types.h:153
rs2_device_serializer
struct rs2_device_serializer rs2_device_serializer
Definition: rs_types.h:225
rs2_frame_processor_callback_ptr
void(* rs2_frame_processor_callback_ptr)(rs2_frame *, rs2_source *, void *)
Definition: rs_types.h:243
rs2_intrinsics::coeffs
float coeffs[5]
Definition: rs_types.h:67
RS2_MATCHER_DLR_C
Definition: rs_types.h:191
RS2_LOG_SEVERITY_NONE
Definition: rs_types.h:127
rs2_quaternion::x
float x
Definition: rs_types.h:105
RS2_LOG_SEVERITY_COUNT
Definition: rs_types.h:128
rs2_processing_block
struct rs2_processing_block rs2_processing_block
Definition: rs_types.h:227
rs2_pixel
struct rs2_pixel rs2_pixel
Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right,...
rs2_device_list
struct rs2_device_list rs2_device_list
Definition: rs_types.h:218
rs2_extension_to_string
const char * rs2_extension_to_string(rs2_extension type)
rs2_pose
struct rs2_pose rs2_pose
rs2_motion_device_intrinsic::data
float data[3][4]
Definition: rs_types.h:77
rs2_update_progress_callback_ptr
void(* rs2_update_progress_callback_ptr)(const float, void *)
Definition: rs_types.h:244
rs2_vector
struct rs2_vector rs2_vector
3D vector in Euclidean coordinate space
RS2_DISTORTION_INVERSE_BROWN_CONRADY
Definition: rs_types.h:49
rs2_options_list
struct rs2_options_list rs2_options_list
Definition: rs_types.h:236
RS2_NOTIFICATION_CATEGORY_UNKNOWN_ERROR
Definition: rs_types.h:22
rs2_exception_type_to_string
const char * rs2_exception_type_to_string(rs2_exception_type type)
rs2_error
struct rs2_error rs2_error
Definition: rs_types.h:211
RS2_NOTIFICATION_CATEGORY_FRAME_CORRUPTED
Definition: rs_types.h:19
rs2_get_librealsense_exception_type
rs2_exception_type rs2_get_librealsense_exception_type(const rs2_error *error)
RS2_NOTIFICATION_CATEGORY_FRAMES_TIMEOUT
Definition: rs_types.h:18
rs2_distortion_to_string
const char * rs2_distortion_to_string(rs2_distortion distortion)
RS2_EXTENSION_DISPARITY_FILTER
Definition: rs_types.h:162
rs2_get_failed_function
const char * rs2_get_failed_function(const rs2_error *error)
rs2_notification_category
rs2_notification_category
Category of the librealsense notification.
Definition: rs_types.h:17
RS2_MATCHER_DI_C
Definition: rs_types.h:187
RS2_LOG_SEVERITY_DEBUG
Definition: rs_types.h:122
RS2_EXTENSION_THRESHOLD_FILTER
Definition: rs_types.h:161
rs2_exception_type
rs2_exception_type
Exception types are the different categories of errors that RealSense API might return.
Definition: rs_types.h:30
RS2_LOG_SEVERITY_ERROR
Definition: rs_types.h:125
rs2_frame_callback
Definition: rs_types.hpp:25