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
16#include <stdint.h>
17
30
45
58
60typedef struct rs2_intrinsics
61{
62 int width;
63 int height;
64 float ppx;
65 float ppy;
66 float fx;
67 float fy;
69 float coeffs[5];
71
74{
75 /* \internal
76 * Scale X cross axis cross axis Bias X \n
77 * cross axis Scale Y cross axis Bias Y \n
78 * cross axis cross axis Scale Z Bias Z */
79 float data[3][4];
80
81 float noise_variances[3];
82 float bias_variances[3];
84
87typedef struct rs2_vertex
88{
89 float xyz[3];
91
93typedef struct rs2_pixel
94{
95 int ij[2];
97
99typedef struct rs2_vector
100{
101 float x, y, z;
103
105typedef struct rs2_quaternion
106{
107 float x, y, z, w;
109
121
134
136typedef enum rs2_extension
137{
199
201typedef enum rs2_matchers
202{
203 RS2_MATCHER_DI, //compare depth and ir based on frame number
204
205 RS2_MATCHER_DI_C, //compare depth and ir based on frame number,
206 //compare the pair of corresponding depth and ir with color based on closest timestamp,
207
208 RS2_MATCHER_DLR_C, //compare depth, left and right ir based on frame number,
209 //compare the set of corresponding depth, left and right with color based on closest timestamp,
210 //commonly used by RS415, RS435
211
212 RS2_MATCHER_DLR, //compare depth, left and right ir based on frame number,
213 //commonly used by RS400, RS405, RS410, RS420, RS430
214
215 RS2_MATCHER_DIC, //compare depth, ir and confidence based on frame number used by RS500
216
217 RS2_MATCHER_DIC_C, //compare depth, ir and confidence based on frame number,
218 //compare the set of corresponding depth, ir and confidence with color based on closest timestamp,
219 //commonly used by RS515
220
221 RS2_MATCHER_DEFAULT, //the default matcher compare all the streams based on closest timestamp
222
226
227
229typedef struct rs2_device rs2_device;
230typedef struct rs2_error rs2_error;
233typedef struct rs2_frame rs2_frame;
237typedef struct rs2_config rs2_config;
244typedef struct rs2_syncer rs2_syncer;
246typedef struct rs2_source rs2_source;
254typedef struct rs2_sensor rs2_sensor;
265typedef void (*rs2_log_callback_ptr)(rs2_log_severity, rs2_log_message const *, void * arg);
269typedef void (*rs2_frame_callback_ptr)(rs2_frame*, void*);
271typedef void (*rs2_update_progress_callback_ptr)(const float, void*);
273
274typedef double rs2_time_t;
275typedef long long rs2_metadata_type;
276
277rs2_error * rs2_create_error(const char* what, const char* name, const char* args, rs2_exception_type type);
279const char* rs2_get_failed_function (const rs2_error* error);
280const char* rs2_get_failed_args (const rs2_error* error);
281const char* rs2_get_error_message (const rs2_error* error);
283
284
285#ifdef __cplusplus
286}
287#endif
288#endif
struct rs2_device_serializer rs2_device_serializer
Definition rs_types.h:245
struct rs2_sensor rs2_sensor
Definition rs_types.h:254
struct rs2_device_info rs2_device_info
Definition rs_types.h:228
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:244
rs2_log_severity
Severity of the librealsense logger.
Definition rs_types.h:123
@ RS2_LOG_SEVERITY_WARN
Definition rs_types.h:126
@ RS2_LOG_SEVERITY_INFO
Definition rs_types.h:125
@ RS2_LOG_SEVERITY_ALL
Definition rs_types.h:131
@ RS2_LOG_SEVERITY_NONE
Definition rs_types.h:129
@ RS2_LOG_SEVERITY_DEBUG
Definition rs_types.h:124
@ RS2_LOG_SEVERITY_FATAL
Definition rs_types.h:128
@ RS2_LOG_SEVERITY_COUNT
Definition rs_types.h:130
@ RS2_LOG_SEVERITY_ERROR
Definition rs_types.h:127
struct rs2_stream_profile rs2_stream_profile
Definition rs_types.h:241
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:236
struct rs2_log_message rs2_log_message
Definition rs_types.h:231
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:270
void rs2_free_error(rs2_error *error)
rs2_notification_category
Category of the librealsense notification.
Definition rs_types.h:19
@ RS2_NOTIFICATION_CATEGORY_POSE_RELOCALIZATION
Definition rs_types.h:26
@ RS2_NOTIFICATION_CATEGORY_FIRMWARE_UPDATE_RECOMMENDED
Definition rs_types.h:25
@ RS2_NOTIFICATION_CATEGORY_UNKNOWN_ERROR
Definition rs_types.h:24
@ RS2_NOTIFICATION_CATEGORY_FRAMES_TIMEOUT
Definition rs_types.h:20
@ RS2_NOTIFICATION_CATEGORY_HARDWARE_EVENT
Definition rs_types.h:23
@ RS2_NOTIFICATION_CATEGORY_FRAME_CORRUPTED
Definition rs_types.h:21
@ RS2_NOTIFICATION_CATEGORY_COUNT
Definition rs_types.h:27
@ RS2_NOTIFICATION_CATEGORY_HARDWARE_ERROR
Definition rs_types.h:22
const char * rs2_get_failed_args(const rs2_error *error)
void(* rs2_software_device_destruction_callback_ptr)(void *)
Definition rs_types.h:267
void(* rs2_update_progress_callback_ptr)(const float, void *)
Definition rs_types.h:271
struct rs2_processing_block_list rs2_processing_block_list
Definition rs_types.h:240
struct rs2_sensor_list rs2_sensor_list
Definition rs_types.h:253
void(* rs2_notification_callback_ptr)(rs2_notification *, void *)
Definition rs_types.h:266
struct rs2_device rs2_device
Definition rs_types.h:229
struct rs2_source rs2_source
Definition rs_types.h:246
struct rs2_firmware_log_message rs2_firmware_log_message
Definition rs_types.h:261
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition rs_types.h:137
@ RS2_EXTENSION_MOTION_FRAME
Definition rs_types.h:147
@ RS2_EXTENSION_INFO
Definition rs_types.h:140
@ RS2_EXTENSION_HDR_MERGE
Definition rs_types.h:190
@ RS2_EXTENSION_COUNT
Definition rs_types.h:195
@ RS2_EXTENSION_FW_LOGGER
Definition rs_types.h:186
@ RS2_EXTENSION_HOLE_FILLING_FILTER
Definition rs_types.h:169
@ RS2_EXTENSION_MOTION_PROFILE
Definition rs_types.h:157
@ RS2_EXTENSION_DEBUG
Definition rs_types.h:139
@ RS2_EXTENSION_UPDATABLE
Definition rs_types.h:176
@ RS2_EXTENSION_L500_DEPTH_SENSOR
Definition rs_types.h:178
@ RS2_EXTENSION_FISHEYE_SENSOR
Definition rs_types.h:183
@ RS2_EXTENSION_DISPARITY_FRAME
Definition rs_types.h:156
@ RS2_EXTENSION_ZERO_ORDER_FILTER
Definition rs_types.h:170
@ RS2_EXTENSION_DISPARITY_FILTER
Definition rs_types.h:166
@ RS2_EXTENSION_TEMPORAL_FILTER
Definition rs_types.h:168
@ RS2_EXTENSION_POSE_PROFILE
Definition rs_types.h:159
@ RS2_EXTENSION_ROTATION_FILTER
Definition rs_types.h:164
@ RS2_EXTENSION_VIDEO_PROFILE
Definition rs_types.h:153
@ RS2_EXTENSION_POSE_SENSOR
Definition rs_types.h:173
@ RS2_EXTENSION_DEPTH_HUFFMAN_DECODER
Definition rs_types.h:184
@ RS2_EXTENSION_DEPTH_SENSOR
Definition rs_types.h:145
@ RS2_EXTENSION_VIDEO_FRAME
Definition rs_types.h:146
@ RS2_EXTENSION_PLAYBACK
Definition rs_types.h:154
@ RS2_EXTENSION_AUTO_CALIBRATED_DEVICE
Definition rs_types.h:180
@ RS2_EXTENSION_SPATIAL_FILTER
Definition rs_types.h:167
@ RS2_EXTENSION_DECIMATION_FILTER
Definition rs_types.h:163
@ RS2_EXTENSION_SERIALIZABLE
Definition rs_types.h:185
@ RS2_EXTENSION_SEQUENCE_ID_FILTER
Definition rs_types.h:191
@ RS2_EXTENSION_TM2
Definition rs_types.h:160
@ RS2_EXTENSION_MOTION
Definition rs_types.h:141
@ RS2_EXTENSION_VIDEO
Definition rs_types.h:143
@ RS2_EXTENSION_UNKNOWN
Definition rs_types.h:138
@ RS2_EXTENSION_SOFTWARE_DEVICE
Definition rs_types.h:161
@ RS2_EXTENSION_THRESHOLD_FILTER
Definition rs_types.h:165
@ RS2_EXTENSION_POSE
Definition rs_types.h:172
@ RS2_EXTENSION_ROI
Definition rs_types.h:144
@ RS2_EXTENSION_RECOMMENDED_FILTERS
Definition rs_types.h:171
@ RS2_EXTENSION_COMPOSITE_FRAME
Definition rs_types.h:148
@ RS2_EXTENSION_DEBUG_STREAM_SENSOR
Definition rs_types.h:193
@ RS2_EXTENSION_WHEEL_ODOMETER
Definition rs_types.h:174
@ RS2_EXTENSION_DEPTH_FRAME
Definition rs_types.h:150
@ RS2_EXTENSION_DEVICE_CALIBRATION
Definition rs_types.h:188
@ RS2_EXTENSION_TM2_SENSOR
Definition rs_types.h:179
@ RS2_EXTENSION_COLOR_SENSOR
Definition rs_types.h:181
@ RS2_EXTENSION_SOFTWARE_SENSOR
Definition rs_types.h:162
@ RS2_EXTENSION_MAX_USABLE_RANGE_SENSOR
Definition rs_types.h:192
@ RS2_EXTENSION_CALIBRATED_SENSOR
Definition rs_types.h:189
@ RS2_EXTENSION_OPTIONS
Definition rs_types.h:142
@ RS2_EXTENSION_UPDATE_DEVICE
Definition rs_types.h:177
@ RS2_EXTENSION_CALIBRATION_CHANGE_DEVICE
Definition rs_types.h:194
@ RS2_EXTENSION_GLOBAL_TIMER
Definition rs_types.h:175
@ RS2_EXTENSION_RECORD
Definition rs_types.h:152
@ RS2_EXTENSION_AUTO_CALIBRATION_FILTER
Definition rs_types.h:187
@ RS2_EXTENSION_DEPTH_STEREO_SENSOR
Definition rs_types.h:155
@ RS2_EXTENSION_MOTION_SENSOR
Definition rs_types.h:182
@ RS2_EXTENSION_POINTS
Definition rs_types.h:149
@ RS2_EXTENSION_ADVANCED_MODE
Definition rs_types.h:151
@ RS2_EXTENSION_POSE_FRAME
Definition rs_types.h:158
double rs2_time_t
Definition rs_types.h:274
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:263
void(* rs2_options_changed_callback_ptr)(const rs2_options_list *)
Definition rs_types.h:272
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:48
@ RS2_DISTORTION_COUNT
Definition rs_types.h:55
@ RS2_DISTORTION_KANNALA_BRANDT4
Definition rs_types.h:54
@ RS2_DISTORTION_MODIFIED_BROWN_CONRADY
Definition rs_types.h:50
@ RS2_DISTORTION_BROWN_CONRADY
Definition rs_types.h:53
@ RS2_DISTORTION_NONE
Definition rs_types.h:49
@ RS2_DISTORTION_INVERSE_BROWN_CONRADY
Definition rs_types.h:51
@ RS2_DISTORTION_FTHETA
Definition rs_types.h:52
struct rs2_notification rs2_notification
Definition rs_types.h:259
void(* rs2_frame_callback_ptr)(rs2_frame *, void *)
Definition rs_types.h:269
struct rs2_firmware_log_parsed_message rs2_firmware_log_parsed_message
Definition rs_types.h:262
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:239
struct rs2_device_list rs2_device_list
Definition rs_types.h:238
struct rs2_error rs2_error
Definition rs_types.h:230
rs2_exception_type
Exception types are the different categories of errors that RealSense API might return.
Definition rs_types.h:33
@ RS2_EXCEPTION_TYPE_NOT_IMPLEMENTED
Definition rs_types.h:39
@ RS2_EXCEPTION_TYPE_COUNT
Definition rs_types.h:42
@ RS2_EXCEPTION_TYPE_CAMERA_DISCONNECTED
Definition rs_types.h:35
@ RS2_EXCEPTION_TYPE_BACKEND
Definition rs_types.h:36
@ RS2_EXCEPTION_TYPE_INVALID_VALUE
Definition rs_types.h:37
@ RS2_EXCEPTION_TYPE_UNKNOWN
Definition rs_types.h:34
@ RS2_EXCEPTION_TYPE_DEVICE_IN_RECOVERY_MODE
Definition rs_types.h:40
@ RS2_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE
Definition rs_types.h:38
@ RS2_EXCEPTION_TYPE_IO
Definition rs_types.h:41
struct rs2_raw_data_buffer rs2_raw_data_buffer
Definition rs_types.h:232
struct rs2_device_hub rs2_device_hub
Definition rs_types.h:252
rs2_matchers
Specifies types of different matchers.
Definition rs_types.h:202
@ RS2_MATCHER_DLR
Definition rs_types.h:212
@ RS2_MATCHER_DIC_C
Definition rs_types.h:217
@ RS2_MATCHER_DEFAULT
Definition rs_types.h:221
@ RS2_MATCHER_DI
Definition rs_types.h:203
@ RS2_MATCHER_DIC
Definition rs_types.h:215
@ RS2_MATCHER_DLR_C
Definition rs_types.h:208
@ RS2_MATCHER_COUNT
Definition rs_types.h:223
@ RS2_MATCHER_DI_C
Definition rs_types.h:205
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:268
struct rs2_config rs2_config
Definition rs_types.h:237
struct rs2_options_list rs2_options_list
Definition rs_types.h:256
struct rs2_pipeline rs2_pipeline
Definition rs_types.h:235
struct rs2_options rs2_options
Definition rs_types.h:255
struct rs2_terminal_parser rs2_terminal_parser
Definition rs_types.h:264
struct rs2_frame_queue rs2_frame_queue
Definition rs_types.h:234
long long rs2_metadata_type
Definition rs_types.h:275
struct rs2_frame rs2_frame
Definition rs_types.h:233
void(* rs2_log_callback_ptr)(rs2_log_severity, rs2_log_message const *, void *arg)
Definition rs_types.h:265
struct rs2_processing_block rs2_processing_block
Definition rs_types.h:247
const char * rs2_extension_to_string(rs2_extension type)
struct rs2_context rs2_context
Definition rs_types.h:251
Definition rs_types.hpp:77
Definition rs_types.hpp:27
Definition rs_types.hpp:35
Video stream intrinsics.
Definition rs_types.h:61
int height
Definition rs_types.h:63
float fx
Definition rs_types.h:66
float fy
Definition rs_types.h:67
float ppx
Definition rs_types.h:64
rs2_distortion model
Definition rs_types.h:68
int width
Definition rs_types.h:62
float ppy
Definition rs_types.h:65
float coeffs[5]
Definition rs_types.h:69
Definition rs_types.hpp:61
Motion device intrinsics: scale, bias, and variances.
Definition rs_types.h:74
float bias_variances[3]
Definition rs_types.h:82
float data[3][4]
Definition rs_types.h:79
float noise_variances[3]
Definition rs_types.h:81
Definition rs_types.hpp:43
Definition rs_types.hpp:101
Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right,...
Definition rs_types.h:94
int ij[2]
Definition rs_types.h:95
Definition rs_types.hpp:85
Definition rs_types.h:111
rs2_vector acceleration
Definition rs_types.h:114
rs2_vector angular_acceleration
Definition rs_types.h:117
rs2_vector velocity
Definition rs_types.h:113
unsigned int mapper_confidence
Definition rs_types.h:119
rs2_vector angular_velocity
Definition rs_types.h:116
unsigned int tracker_confidence
Definition rs_types.h:118
rs2_vector translation
Definition rs_types.h:112
rs2_quaternion rotation
Definition rs_types.h:115
Quaternion used to represent rotation.
Definition rs_types.h:106
float y
Definition rs_types.h:107
float z
Definition rs_types.h:107
float w
Definition rs_types.h:107
float x
Definition rs_types.h:107
Definition rs_types.hpp:93
3D vector in Euclidean coordinate space
Definition rs_types.h:100
float x
Definition rs_types.h:101
float y
Definition rs_types.h:101
float z
Definition rs_types.h:101
3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from th...
Definition rs_types.h:88
float xyz[3]
Definition rs_types.h:89