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