Intel® RealSense™ Cross Platform API  2.13.0
Intel Realsense Cross-platform API
rs_sensor.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 
10 #ifndef LIBREALSENSE_RS2_SENSOR_H
11 #define LIBREALSENSE_RS2_SENSOR_H
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 #include "rs_types.h"
18 
22 typedef enum rs2_camera_info {
36 
38 typedef enum rs2_stream
39 {
51 } rs2_stream;
52 const char* rs2_stream_to_string(rs2_stream stream);
53 
55 typedef enum rs2_format
56 {
78 } rs2_format;
79 const char* rs2_format_to_string(rs2_format format);
80 
82 typedef struct rs2_extrinsics
83 {
84  float rotation[9];
85  float translation[3];
87 
93 
100 int rs2_get_sensors_count(const rs2_sensor_list* info_list, rs2_error** error);
101 
106 void rs2_delete_sensor(rs2_sensor* sensor);
107 
114 rs2_sensor* rs2_create_sensor(const rs2_sensor_list* list, int index, rs2_error** error);
115 
123 
131 const char* rs2_get_sensor_info(const rs2_sensor* sensor, rs2_camera_info info, rs2_error** error);
132 
139 int rs2_supports_sensor_info(const rs2_sensor* sensor, rs2_camera_info info, rs2_error** error);
140 
148 int rs2_is_sensor_extendable_to(const rs2_sensor* sensor, rs2_extension extension, rs2_error** error);
149 
155 float rs2_get_depth_scale(rs2_sensor* sensor, rs2_error** error);
156 
162 float rs2_depth_stereo_frame_get_baseline(const rs2_frame* frame_ref, rs2_error** error);
163 
173 void rs2_set_region_of_interest(const rs2_sensor* sensor, int min_x, int min_y, int max_x, int max_y, rs2_error** error);
174 
184 void rs2_get_region_of_interest(const rs2_sensor* sensor, int* min_x, int* min_y, int* max_x, int* max_y, rs2_error** error);
185 
192 void rs2_open(rs2_sensor* device, const rs2_stream_profile* profile, rs2_error** error);
193 
202 void rs2_open_multiple(rs2_sensor* device, const rs2_stream_profile** profiles, int count, rs2_error** error);
203 
209 void rs2_close(const rs2_sensor* sensor, rs2_error** error);
210 
218 void rs2_start(const rs2_sensor* sensor, rs2_frame_callback_ptr on_frame, void* user, rs2_error** error);
219 
226 void rs2_start_cpp(const rs2_sensor* sensor, rs2_frame_callback* callback, rs2_error** error);
227 
234 void rs2_start_queue(const rs2_sensor* sensor, rs2_frame_queue* queue, rs2_error** error);
235 
241 void rs2_stop(const rs2_sensor* sensor, rs2_error** error);
242 
249 void rs2_set_notifications_callback(const rs2_sensor* sensor, rs2_notification_callback_ptr on_notification, void* user, rs2_error** error);
250 
258 
265 const char* rs2_get_notification_description(rs2_notification* notification, rs2_error** error);
266 
274 
282 
290 
297 const char* rs2_get_notification_serialized_data(rs2_notification* notification, rs2_error** error);
298 
306 
313 const rs2_stream_profile* rs2_get_stream_profile(const rs2_stream_profile_list* list, int index, rs2_error** error);
314 
325 void rs2_get_stream_profile_data(const rs2_stream_profile* mode, rs2_stream* stream, rs2_format* format, int* index, int* unique_id, int* framerate, rs2_error** error);
326 
335 void rs2_set_stream_profile_data(rs2_stream_profile* mode, rs2_stream stream, int index, rs2_format format, rs2_error** error);
336 
346 rs2_stream_profile* rs2_clone_stream_profile(const rs2_stream_profile* mode, rs2_stream stream, int index, rs2_format format, rs2_error** error);
347 
354 
362 int rs2_stream_profile_is(const rs2_stream_profile* mode, rs2_extension type, rs2_error** error);
363 
371 void rs2_get_video_stream_resolution(const rs2_stream_profile* mode, int* width, int* height, rs2_error** error);
372 
380 
389 
397 
403 
410 void rs2_get_extrinsics(const rs2_stream_profile* from,
411  const rs2_stream_profile* to,
412  rs2_extrinsics* extrin, rs2_error** error);
413 
421  const rs2_stream_profile* to,
422  rs2_extrinsics extrin, rs2_error** error);
423 
430 void rs2_get_video_stream_intrinsics(const rs2_stream_profile* mode, rs2_intrinsics* intrinsics, rs2_error** error);
431 
432 
433 #ifdef __cplusplus
434 }
435 #endif
436 #endif
Definition: rs_sensor.h:72
void rs2_register_extrinsics(const rs2_stream_profile *from, const rs2_stream_profile *to, rs2_extrinsics extrin, rs2_error **error)
int rs2_get_sensors_count(const rs2_sensor_list *info_list, rs2_error **error)
rs2_camera_info
Read-only strings that can be queried from the device. Not all information attributes are available o...
Definition: rs_sensor.h:22
Definition: rs_types.hpp:25
const char * rs2_format_to_string(rs2_format format)
Definition: rs_sensor.h:63
Definition: rs_sensor.h:76
float rs2_get_depth_scale(rs2_sensor *sensor, rs2_error **error)
Definition: rs_sensor.h:27
Definition: rs_sensor.h:28
Definition: rs_types.hpp:39
struct rs2_frame_queue rs2_frame_queue
Definition: rs_types.h:152
void rs2_get_video_stream_resolution(const rs2_stream_profile *mode, int *width, int *height, rs2_error **error)
rs2_sensor * rs2_create_sensor(const rs2_sensor_list *list, int index, rs2_error **error)
Definition: rs_sensor.h:24
float translation[3]
Definition: rs_sensor.h:85
Definition: rs_sensor.h:30
void rs2_get_extrinsics(const rs2_stream_profile *from, const rs2_stream_profile *to, rs2_extrinsics *extrin, rs2_error **error)
rs2_device * rs2_create_device_from_sensor(const rs2_sensor *sensor, rs2_error **error)
Definition: rs_sensor.h:75
void rs2_set_region_of_interest(const rs2_sensor *sensor, int min_x, int min_y, int max_x, int max_y, rs2_error **error)
sets the active region of interest to be used by auto-exposure algorithm
Definition: rs_sensor.h:31
Definition: rs_sensor.h:58
Definition: rs_sensor.h:44
struct rs2_sensor_list rs2_sensor_list
Definition: rs_types.h:169
Definition: rs_sensor.h:48
void rs2_stop(const rs2_sensor *sensor, rs2_error **error)
Definition: rs_sensor.h:61
void rs2_start_queue(const rs2_sensor *sensor, rs2_frame_queue *queue, rs2_error **error)
int rs2_stream_profile_is(const rs2_stream_profile *mode, rs2_extension type, rs2_error **error)
const char * rs2_get_notification_serialized_data(rs2_notification *notification, rs2_error **error)
Definition: rs_sensor.h:23
Definition: rs_sensor.h:47
rs2_log_severity rs2_get_notification_severity(rs2_notification *notification, rs2_error **error)
Definition: rs_sensor.h:59
Definition: rs_sensor.h:45
rs2_stream_profile * rs2_clone_stream_profile(const rs2_stream_profile *mode, rs2_stream stream, int index, rs2_format format, rs2_error **error)
struct rs2_sensor rs2_sensor
Definition: rs_types.h:170
float rotation[9]
Definition: rs_sensor.h:84
Definition: rs_sensor.h:42
void rs2_open(rs2_sensor *device, const rs2_stream_profile *profile, rs2_error **error)
void rs2_set_stream_profile_data(rs2_stream_profile *mode, rs2_stream stream, int index, rs2_format format, rs2_error **error)
Definition: rs_sensor.h:62
Definition: rs_sensor.h:60
void rs2_get_stream_profile_data(const rs2_stream_profile *mode, rs2_stream *stream, rs2_format *format, int *index, int *unique_id, int *framerate, rs2_error **error)
struct rs2_notification rs2_notification
Definition: rs_types.h:173
int rs2_is_stream_profile_default(const rs2_stream_profile *mode, rs2_error **error)
Exposes RealSense structs.
void rs2_start(const rs2_sensor *sensor, rs2_frame_callback_ptr on_frame, void *user, rs2_error **error)
void rs2_set_notifications_callback(const rs2_sensor *sensor, rs2_notification_callback_ptr on_notification, void *user, rs2_error **error)
void rs2_delete_sensor(rs2_sensor *sensor)
void rs2_get_region_of_interest(const rs2_sensor *sensor, int *min_x, int *min_y, int *max_x, int *max_y, rs2_error **error)
gets the active region of interest to be used by auto-exposure algorithm
Definition: rs_sensor.h:50
rs2_time_t rs2_get_notification_timestamp(rs2_notification *notification, rs2_error **error)
Definition: rs_sensor.h:32
Definition: rs_sensor.h:49
void rs2_delete_stream_profile(rs2_stream_profile *mode)
struct rs2_stream_profile_list rs2_stream_profile_list
Definition: rs_types.h:157
const rs2_stream_profile * rs2_get_stream_profile(const rs2_stream_profile_list *list, int index, rs2_error **error)
void rs2_set_notifications_callback_cpp(const rs2_sensor *sensor, rs2_notifications_callback *callback, rs2_error **error)
struct rs2_stream_profile rs2_stream_profile
Definition: rs_types.h:158
Definition: rs_sensor.h:57
rs2_format
Format identifies how binary data is encoded within a frame.
Definition: rs_sensor.h:55
int rs2_supports_sensor_info(const rs2_sensor *sensor, rs2_camera_info info, rs2_error **error)
Definition: rs_sensor.h:25
Definition: rs_sensor.h:71
Definition: rs_sensor.h:33
Definition: rs_sensor.h:77
Definition: rs_sensor.h:73
Definition: rs_sensor.h:41
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition: rs_sensor.h:38
void rs2_get_video_stream_intrinsics(const rs2_stream_profile *mode, rs2_intrinsics *intrinsics, rs2_error **error)
Definition: rs_sensor.h:43
Definition: rs_sensor.h:46
Definition: rs_sensor.h:69
Cross-stream extrinsics: encode the topology describing how the different devices are connected...
Definition: rs_sensor.h:82
const char * rs2_camera_info_to_string(rs2_camera_info info)
int rs2_is_sensor_extendable_to(const rs2_sensor *sensor, rs2_extension extension, rs2_error **error)
const char * rs2_stream_to_string(rs2_stream stream)
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:94
rs2_notification_category
Category of the librealsense notifications.
Definition: rs_types.h:17
Definition: rs_sensor.h:40
void(* rs2_notification_callback_ptr)(rs2_notification *, void *)
Definition: rs_types.h:175
void rs2_delete_stream_profiles_list(rs2_stream_profile_list *list)
void rs2_close(const rs2_sensor *sensor, rs2_error **error)
struct rs2_device rs2_device
Definition: rs_types.h:148
rs2_stream_profile_list * rs2_get_stream_profiles(rs2_sensor *device, rs2_error **error)
Video stream intrinsics.
Definition: rs_types.h:56
void rs2_open_multiple(rs2_sensor *device, const rs2_stream_profile **profiles, int count, rs2_error **error)
void rs2_start_cpp(const rs2_sensor *sensor, rs2_frame_callback *callback, rs2_error **error)
Definition: rs_sensor.h:65
rs2_notification_category rs2_get_notification_category(rs2_notification *notification, rs2_error **error)
Motion device intrinsics: scale, bias, and variances.
Definition: rs_types.h:69
struct rs2_extrinsics rs2_extrinsics
Cross-stream extrinsics: encode the topology describing how the different devices are connected...
void rs2_delete_sensor_list(rs2_sensor_list *info_list)
void(* rs2_frame_callback_ptr)(rs2_frame *, void *)
Definition: rs_types.h:177
Definition: rs_sensor.h:74
float rs2_depth_stereo_frame_get_baseline(const rs2_frame *frame_ref, rs2_error **error)
const char * rs2_get_sensor_info(const rs2_sensor *sensor, rs2_camera_info info, rs2_error **error)
const char * rs2_get_notification_description(rs2_notification *notification, rs2_error **error)
int rs2_get_stream_profiles_count(const rs2_stream_profile_list *list, rs2_error **error)
struct rs2_error rs2_error
Definition: rs_types.h:149
double rs2_time_t
Definition: rs_types.h:180
rs2_log_severity
Severity of the librealsense logger.
Definition: rs_types.h:82
Definition: rs_sensor.h:67
void rs2_get_motion_intrinsics(const rs2_stream_profile *mode, rs2_motion_device_intrinsic *intrinsics, rs2_error **error)
Definition: rs_sensor.h:70
Definition: rs_sensor.h:29
struct rs2_frame rs2_frame
Definition: rs_types.h:151
Definition: rs_sensor.h:64
Definition: rs_sensor.h:66
Definition: rs_sensor.h:68