Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
rs.h
Go to the documentation of this file.
1 /* License: Apache 2.0. See LICENSE file in root directory.
2  Copyright(c) 2015 Intel Corporation. All Rights Reserved. */
3 
10 #ifndef LIBREALSENSE_RS_H
11 #define LIBREALSENSE_RS_H
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 #define RS_API_MAJOR_VERSION 1
18 #define RS_API_MINOR_VERSION 12
19 #define RS_API_PATCH_VERSION 3
20 
21 #define STRINGIFY(arg) #arg
22 #define VAR_ARG_STRING(arg) STRINGIFY(arg)
23 
24 /* Versioning rules : For each release at least one of [MJR/MNR/PTCH] triple is promoted */
25 /* : Versions that differ by RS_API_PATCH_VERSION only are interface-compatible, i.e. no user-code changes required */
26 /* : Versions that differ by MAJOR/MINOR VERSION component can introduce API changes */
27 /* Version in encoded integer format (1,9,x) -> 01090x. note that each component is limited into [0-99] range by design */
28 #define RS_API_VERSION (((RS_API_MAJOR_VERSION) * 10000) + ((RS_API_MINOR_VERSION) * 100) + (RS_API_PATCH_VERSION))
29 /* Return version in "X.Y.Z" format */
30 #define RS_API_VERSION_STR (VAR_ARG_STRING(RS_API_MAJOR_VERSION.RS_API_MINOR_VERSION.RS_API_PATCH_VERSION))
31 
33 typedef enum rs_stream
34 {
48 } rs_stream;
49 
53 typedef enum rs_format
54 {
70 } rs_format;
71 
74 {
79 
81 typedef enum rs_preset
82 {
87 } rs_preset;
88 
90 typedef enum rs_source
91 {
96 } rs_source;
97 
99 typedef enum rs_distortion
100 {
106 } rs_distortion;
107 
109 typedef enum rs_ivcam_preset
110 {
124 
128 typedef enum rs_option
129 {
200 } rs_option;
201 
203 typedef enum rs_frame_metadata
204 {
209 
213 typedef enum rs_capabilities
214 {
226 
228 typedef enum rs_blob_type {
231 } rs_blob_type;
232 
237 typedef enum rs_camera_info {
263 
265 typedef enum rs_log_severity {
274 
276 typedef enum rs_event_source
277 {
287 
293 {
298 
300 typedef struct rs_intrinsics
301 {
302  int width;
303  int height;
304  float ppx;
305  float ppy;
306  float fx;
307  float fy;
309  float coeffs[5];
310 } rs_intrinsics;
311 
314 {
315  /* Scale X cross axis cross axis Bias X */
316  /* cross axis Scale Y cross axis Bias Y */
317  /* cross axis cross axis Scale Z Bias Z */
318  float data[3][4];
320  float noise_variances[3];
321  float bias_variances[3];
323 
325 typedef struct rs_motion_intrinsics
326 {
330 
332 typedef struct rs_extrinsics
333 {
334  float rotation[9];
335  float translation[3];
336 } rs_extrinsics;
337 
339 typedef struct rs_timestamp_data
340 {
341  double timestamp;
343  unsigned long long frame_number;
345 
347 typedef struct rs_motion_data
348 {
350  unsigned int is_valid;
351  float axes[3];
353 
354 
355 typedef struct rs_context rs_context;
356 typedef struct rs_device rs_device;
357 typedef struct rs_error rs_error;
358 typedef struct rs_frameset rs_frameset;
359 typedef struct rs_frame_ref rs_frame_ref;
364 
365 typedef void (*rs_frame_callback_ptr)(rs_device * dev, rs_frame_ref * frame, void * user);
366 typedef void (*rs_motion_callback_ptr)(rs_device * , rs_motion_data, void * );
368 typedef void (*rs_log_callback_ptr)(rs_log_severity min_severity, const char * message, void * user);
369 
376 rs_context * rs_create_context(int api_version, rs_error ** error);
377 
385 void rs_delete_context(rs_context * context, rs_error ** error);
386 
393 int rs_get_device_count(const rs_context * context, rs_error ** error);
394 
402 rs_device * rs_get_device(rs_context * context, int index, rs_error ** error);
403 
410 const char * rs_get_device_name(const rs_device * device, rs_error ** error);
411 
418 const char * rs_get_device_serial(const rs_device * device, rs_error ** error);
419 
427 const char * rs_get_device_info(const rs_device * device, rs_camera_info info, rs_error ** error);
428 
435 const char * rs_get_device_usb_port_id(const rs_device * device, rs_error ** error);
436 
443 const char * rs_get_device_firmware_version(const rs_device * device, rs_error ** error);
444 
453 void rs_get_device_extrinsics(const rs_device * device, rs_stream from_stream, rs_stream to_stream, rs_extrinsics * extrin, rs_error ** error);
454 
462 void rs_get_motion_extrinsics_from(const rs_device * device, rs_stream from, rs_extrinsics * extrin, rs_error ** error);
463 
470 float rs_get_device_depth_scale(const rs_device * device, rs_error ** error);
471 
479 int rs_device_supports_option(const rs_device * device, rs_option option, rs_error ** error);
480 
488 int rs_get_stream_mode_count(const rs_device * device, rs_stream stream, rs_error ** error);
489 
501 void rs_get_stream_mode(const rs_device * device, rs_stream stream, int index, int * width, int * height, rs_format * format, int * framerate, rs_error ** error);
502 
514 void rs_enable_stream_ex(rs_device * device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_output_buffer_format output_format, rs_error ** error);
515 
526 void rs_enable_stream(rs_device * device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_error ** error);
527 
536 
543 void rs_disable_stream(rs_device * device, rs_stream stream, rs_error ** error);
544 
552 int rs_is_stream_enabled(const rs_device * device, rs_stream stream, rs_error ** error);
553 
561 int rs_get_stream_width(const rs_device * device, rs_stream stream, rs_error ** error);
562 
570 int rs_get_stream_height(const rs_device * device, rs_stream stream, rs_error ** error);
571 
580 
588 int rs_get_stream_framerate(const rs_device * device, rs_stream stream, rs_error ** error);
589 
597 void rs_get_stream_intrinsics(const rs_device * device, rs_stream stream, rs_intrinsics * intrin, rs_error ** error);
598 
605 void rs_get_motion_intrinsics(const rs_device * device, rs_motion_intrinsics * intrinsic, rs_error ** error);
606 
616 void rs_set_frame_callback(rs_device * device, rs_stream stream, rs_frame_callback_ptr on_frame, void * user, rs_error ** error);
617 
629  rs_motion_callback_ptr on_motion_event, void * motion_handler,
630  rs_timestamp_callback_ptr on_timestamp_event, void * timestamp_handler,
631  rs_error ** error);
632 
655  rs_motion_callback * motion_callback,
656  rs_timestamp_callback * timestamp_callback,
657  rs_error ** error);
658 
669 void rs_set_frame_callback_cpp(rs_device * device, rs_stream stream, rs_frame_callback * callback, rs_error ** error);
670 
676 void rs_disable_motion_tracking(rs_device * device, rs_error ** error);
677 
684 int rs_is_motion_tracking_active(rs_device * device, rs_error ** error);
685 
686 
692 void rs_start_device(rs_device * device, rs_error ** error);
693 
699 void rs_stop_device(rs_device * device, rs_error ** error);
700 
707 void rs_start_source(rs_device * device, rs_source source, rs_error ** error);
708 
715 void rs_stop_source(rs_device * device, rs_source source, rs_error ** error);
716 
723 int rs_is_device_streaming(const rs_device * device, rs_error ** error);
724 
734 void rs_get_device_option_range(rs_device * device, rs_option option, double * min, double * max, double * step, rs_error ** error);
735 
746 void rs_get_device_option_range_ex(rs_device * device, rs_option option, double * min, double * max, double * step, double * def, rs_error ** error);
747 
756 void rs_get_device_options(rs_device * device, const rs_option * options, unsigned int count, double * values, rs_error ** error);
757 
766 void rs_set_device_options(rs_device * device, const rs_option * options, unsigned int count, const double * values, rs_error ** error);
767 
775 void rs_reset_device_options_to_default(rs_device * device, const rs_option* options, int count, rs_error ** error);
776 
784 double rs_get_device_option(rs_device * device, rs_option option, rs_error ** error);
785 
786 
794 const char * rs_get_device_option_description(rs_device * device, rs_option option, rs_error ** error);
795 
796 
804 void rs_set_device_option(rs_device * device, rs_option option, double value, rs_error ** error);
805 
811 void rs_wait_for_frames(rs_device * device, rs_error ** error);
812 
819 int rs_poll_for_frames(rs_device * device, rs_error ** error);
820 
828 int rs_supports(rs_device * device, rs_capabilities capability, rs_error ** error);
829 
837 int rs_supports_camera_info(rs_device * device, rs_camera_info info_param, rs_error ** error);
838 
847 
856 
864 double rs_get_frame_timestamp(const rs_device * device, rs_stream stream, rs_error ** error);
865 
873 unsigned long long rs_get_frame_number(const rs_device * device, rs_stream stream, rs_error ** error);
874 
882 const void * rs_get_frame_data(const rs_device * device, rs_stream stream, rs_error ** error);
883 
891 void rs_release_frame(rs_device * device, rs_frame_ref * frame, rs_error ** error);
892 
899 double rs_get_detached_frame_timestamp(const rs_frame_ref * frame, rs_error ** error);
900 
910 
917 unsigned long long rs_get_detached_frame_number(const rs_frame_ref * frame, rs_error ** error);
918 
925 const void * rs_get_detached_frame_data(const rs_frame_ref * frame, rs_error ** error);
926 
933 int rs_get_detached_frame_width(const rs_frame_ref * frame, rs_error ** error);
934 
941 int rs_get_detached_frame_height(const rs_frame_ref * frame, rs_error ** error);
942 
949 int rs_get_detached_framerate(const rs_frame_ref * frame, rs_error ** error);
950 
957 int rs_get_detached_frame_stride(const rs_frame_ref * frame, rs_error ** error);
958 
965 int rs_get_detached_frame_bpp(const rs_frame_ref * frame, rs_error ** error);
966 
974 
982 
992 void rs_send_blob_to_device(rs_device * device, rs_blob_type type, void * data, int size, rs_error ** error);
993 
999 int rs_get_api_version (rs_error ** error);
1000 
1006 const char * rs_get_failed_function (const rs_error * error);
1007 
1013 const char * rs_get_failed_args (const rs_error * error);
1014 
1020 const char * rs_get_error_message (const rs_error * error);
1021 
1026 void rs_free_error (rs_error * error);
1027 
1028 const char * rs_stream_to_string (rs_stream stream);
1029 const char * rs_format_to_string (rs_format format);
1030 const char * rs_preset_to_string (rs_preset preset);
1032 const char * rs_option_to_string (rs_option option);
1033 const char * rs_capabilities_to_string(rs_capabilities capability);
1034 const char * rs_source_to_string (rs_source source);
1036 const char * rs_blob_type_to_string (rs_blob_type type);
1037 const char * rs_camera_info_to_string(rs_camera_info info);
1038 const char * rs_camera_info_to_string(rs_camera_info info);
1041 
1047 void rs_log_to_console(rs_log_severity min_severity, rs_error ** error);
1048 
1055 void rs_log_to_file(rs_log_severity min_severity, const char * file_path, rs_error ** error);
1056 
1063 void rs_log_to_callback_cpp(rs_log_severity min_severity, rs_log_callback * callback, rs_error ** error);
1064 
1072 void rs_log_to_callback(rs_log_severity min_severity, rs_log_callback_ptr on_log, void * user, rs_error ** error);
1073 
1074 #ifdef __cplusplus
1075 }
1076 #endif
1077 #endif
Definition: rs.h:38
int rs_get_stream_width(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves the width in pixels of a specific stream, equivalent to the width field from the stream's i...
int rs_supports(rs_device *device, rs_capabilities capability, rs_error **error)
Determines device capabilities.
void rs_get_motion_extrinsics_from(const rs_device *device, rs_stream from, rs_extrinsics *extrin, rs_error **error)
Retrieves extrinsic transformation between specific stream and the motion module. ...
void rs_get_stream_intrinsics(const rs_device *device, rs_stream stream, rs_intrinsics *intrin, rs_error **error)
Retrieves intrinsic camera parameters for a specific stream.
float coeffs[5]
Definition: rs.h:309
Definition: rs.h:92
Definition: rs.h:164
rs_timestamp_data timestamp_data
Definition: rs.h:349
const char * rs_stream_to_string(rs_stream stream)
void rs_start_source(rs_device *device, rs_source source, rs_error **error)
Begins streaming on all enabled streams for this device.
rs_event_source source_id
Definition: rs.h:342
void rs_disable_motion_tracking(rs_device *device, rs_error **error)
Disables motion-tracking handlers.
Definition: rs.h:86
void rs_log_to_callback_cpp(rs_log_severity min_severity, rs_log_callback *callback, rs_error **error)
Starts logging to user-provided callback.
Definition: rscore.hpp:132
void rs_enable_motion_tracking(rs_device *device, rs_motion_callback_ptr on_motion_event, void *motion_handler, rs_timestamp_callback_ptr on_timestamp_event, void *timestamp_handler, rs_error **error)
Enables and configures motion-tracking data handlers.
Definition: rs.h:220
const char * rs_source_to_string(rs_source source)
Definition: rs.h:83
Definition: rs.h:268
Definition: rs.h:144
Definition: rs.h:247
Definition: rs.h:101
int rs_supports_frame_metadata(const rs_frame_ref *frame, rs_frame_metadata frame_metadata, rs_error **error)
Determines device metadata.
void(* rs_frame_callback_ptr)(rs_device *dev, rs_frame_ref *frame, void *user)
Definition: rs.h:365
Definition: rs.h:62
Definition: rs.h:162
Definition: rs.h:219
Definition: rs.h:120
Definition: rs.h:285
const char * rs_camera_info_to_string(rs_camera_info info)
Definition: rs.h:251
int rs_get_device_count(const rs_context *context, rs_error **error)
Determines number of connected devices.
Definition: rs.h:266
frame_metadata
Types of value provided from the device with each frame.
Definition: rs.hpp:160
Definition: rs.h:121
rs_blob_type
Proprietary formats for direct communication with device firmware.
Definition: rs.h:228
void rs_log_to_console(rs_log_severity min_severity, rs_error **error)
Starts logging to console.
struct rs_intrinsics rs_intrinsics
Video stream intrinsics.
Definition: rs.h:159
rs_format rs_get_detached_frame_format(const rs_frame_ref *frame, rs_error **error)
Retrieves frame format.
float data[3][4]
Definition: rs.h:318
void rs_enable_stream_ex(rs_device *device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_output_buffer_format output_format, rs_error **error)
Enables a specific stream and requests specific properties.
void rs_get_device_options(rs_device *device, const rs_option *options, unsigned int count, double *values, rs_error **error)
Efficiently retrieves the value of an arbitrary number of options, using minimal hardware IO...
Definition: rs.h:249
void rs_set_device_options(rs_device *device, const rs_option *options, unsigned int count, const double *values, rs_error **error)
Efficiently sets the value of an arbitrary number of options, using minimal hardware IO...
rs_timestamp_domain rs_get_detached_frame_timestamp_domain(const rs_frame_ref *frame, rs_error **error)
Retrieves timestamp domain from frame reference.
void(* rs_motion_callback_ptr)(rs_device *, rs_motion_data, void *)
Definition: rs.h:366
Definition: rs.h:243
unsigned long long rs_get_detached_frame_number(const rs_frame_ref *frame, rs_error **error)
Retrieves frame number from frame reference.
struct rs_frameset rs_frameset
Definition: rs.h:358
Definition: rs.h:104
Definition: rs.h:112
Definition: rs.h:279
double rs_get_frame_timestamp(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves time at which the latest frame on a stream was captured.
const void * rs_get_frame_data(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves the contents of the latest frame on a stream.
int rs_is_device_streaming(const rs_device *device, rs_error **error)
Determines if the device is currently streaming.
Definition: rs.h:222
float ppy
Definition: rs.h:305
Definition: rs.h:117
Definition: rs.h:218
Definition: rs.h:160
const char * rs_frame_metadata_to_string(rs_frame_metadata md)
Definition: rs.h:282
Definition: rs.h:280
Definition: rs.h:223
const char * rs_distortion_to_string(rs_distortion distortion)
struct rs_timestamp_data rs_timestamp_data
Timestamp data from the motion microcontroller.
Definition: rs.h:198
void rs_delete_context(rs_context *context, rs_error **error)
Frees the relevant context object.
void(* rs_log_callback_ptr)(rs_log_severity min_severity, const char *message, void *user)
Definition: rs.h:368
void rs_set_device_option(rs_device *device, rs_option option, double value, rs_error **error)
Sets the current value of a single option.
const char * rs_get_device_name(const rs_device *device, rs_error **error)
Retrieves human-readable device model string.
Definition: rs.h:217
void rs_reset_device_options_to_default(rs_device *device, const rs_option *options, int count, rs_error **error)
Efficiently resets the value of an arbitrary number of options to default.
Motion device intrinsics: scale, bias, and variances.
Definition: rs.h:313
Definition: rs.h:238
rs_option
Defines general configuration controls.
Definition: rs.h:128
const char * rs_get_error_message(const rs_error *error)
Returns static pointer to error message.
float rs_get_device_depth_scale(const rs_device *device, rs_error **error)
Retrieves mapping between the units of the depth image and meters.
const char * rs_blob_type_to_string(rs_blob_type type)
Definition: rs.h:136
rs_output_buffer_format
Output buffer format: sets how librealsense works with frame memory.
Definition: rs.h:73
Definition: rs.h:134
const char * rs_get_device_usb_port_id(const rs_device *device, rs_error **error)
Retrieves the USB port number of the device.
rs_timestamp_domain
Specifies the clock in relation to which the frame timestamp was measured.
Definition: rs.h:292
Definition: rs.h:272
void rs_log_to_callback(rs_log_severity min_severity, rs_log_callback_ptr on_log, void *user, rs_error **error)
Starts logging to user-provided callback (C version)
void rs_log_to_file(rs_log_severity min_severity, const char *file_path, rs_error **error)
Starts logging to file.
Definition: rs.h:261
Definition: rs.h:116
rs_stream rs_get_detached_frame_stream_type(const rs_frame_ref *frame, rs_error **error)
Retrieves frame stream type.
option
Defines general configuration controls.
Definition: rs.hpp:87
struct rs_extrinsics rs_extrinsics
Cross-stream extrinsics: encode the topology describing how the different devices are connected...
void rs_get_stream_mode(const rs_device *device, rs_stream stream, int index, int *width, int *height, rs_format *format, int *framerate, rs_error **error)
Determines the properties of a specific streaming mode.
event
Source device that triggered specific timestamp event from the motion module.
Definition: rs.hpp:227
Definition: rs.h:66
Definition: rs.h:56
Definition: rs.h:278
int rs_get_stream_mode_count(const rs_device *device, rs_stream stream, rs_error **error)
Determines the number of streaming modes available for a given stream.
Definition: rs.h:132
int rs_poll_for_frames(rs_device *device, rs_error **error)
Checks if new frames are available, without blocking.
Definition: rs.h:197
double timestamp
Definition: rs.h:341
Definition: rs.h:139
float noise_variances[3]
Definition: rs.h:320
float translation[3]
Definition: rs.h:335
const char * rs_get_failed_function(const rs_error *error)
Returns static pointer to name of a failing function in case of error.
Definition: rs.h:122
rs_format rs_get_stream_format(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves the pixel format for a specific stream.
Definition: rs.h:133
rs_context * rs_create_context(int api_version, rs_error **error)
Creates RealSense context that is required for the rest of the API.
const char * rs_capabilities_to_string(rs_capabilities capability)
double rs_get_device_option(rs_device *device, rs_option option, rs_error **error)
Retrieves the current value of a single option.
void rs_get_device_option_range_ex(rs_device *device, rs_option option, double *min, double *max, double *step, double *def, rs_error **error)
Retrieves the available range of values for a supported option.
int rs_get_detached_frame_bpp(const rs_frame_ref *frame, rs_error **error)
Retrieves frame bits per pixel.
stream
Streams are different types of data provided by RealSense devices.
Definition: rs.hpp:24
Definition: rs.h:59
Definition: rs.h:283
void rs_disable_stream(rs_device *device, rs_stream stream, rs_error **error)
Disables a specific stream.
int rs_get_detached_framerate(const rs_frame_ref *frame, rs_error **error)
Retrieves frame intrinsic frame rate.
void rs_set_frame_callback(rs_device *device, rs_stream stream, rs_frame_callback_ptr on_frame, void *user, rs_error **error)
Sets up a frame callback that is called immediately when an image is available, with no synchronizati...
void rs_release_frame(rs_device *device, rs_frame_ref *frame, rs_error **error)
Releases frame handle.
Definition: rs.h:166
Definition: rs.h:111
Definition: rs.h:270
Definition: rs.h:244
Motion data from gyroscope and accelerometer from the microcontroller.
Definition: rs.h:347
void rs_get_device_extrinsics(const rs_device *device, rs_stream from_stream, rs_stream to_stream, rs_extrinsics *extrin, rs_error **error)
Retrieves extrinsic transformation between the viewpoints of two different streams.
Definition: rs.h:67
rs_camera_info
Read-only strings that can be queried from the device.
Definition: rs.h:237
int rs_device_supports_option(const rs_device *device, rs_option option, rs_error **error)
Determines if the device allows a specific option to be queried and set.
Motion module intrinsics: includes accelerometer and gyroscope intrinsics structs of type rs_motion_d...
Definition: rs.h:325
float bias_variances[3]
Definition: rs.h:321
Definition: rs.h:138
format
Formats: defines how each stream can be encoded. rs_format specifies how a frame is represented in me...
Definition: rs.hpp:42
void rs_send_blob_to_device(rs_device *device, rs_blob_type type, void *data, int size, rs_error **error)
Sends arbitrary binary data to the device.
int rs_get_detached_frame_height(const rs_frame_ref *frame, rs_error **error)
Retrieves frame intrinsic height.
Definition: rs.h:216
Definition: rs.h:230
const char * rs_get_device_firmware_version(const rs_device *device, rs_error **error)
Retrieves the version of the firmware currently installed on the device.
Definition: rs.h:68
Definition: rs.h:94
Definition: rs.h:163
Definition: rs.h:267
const char * rs_get_device_option_description(rs_device *device, rs_option option, rs_error **error)
Retrieves a static description of what a particular option does on given device.
void rs_enable_stream(rs_device *device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_error **error)
Enables a specific stream and requests specific properties.
source
Allows the user to choose between available hardware subdevices.
Definition: rs.hpp:219
const char * rs_get_failed_args(const rs_error *error)
Returns static pointer to arguments of a failing function in case of error.
Definition: rscore.hpp:125
Definition: rs.h:85
Definition: rs.h:296
rs_format
Formats: defines how each stream can be encoded.
Definition: rs.h:53
Definition: rs.h:271
const char * rs_event_to_string(rs_event_source event)
Definition: rs.h:58
Definition: rscore.hpp:118
double rs_get_detached_frame_timestamp(const rs_frame_ref *frame, rs_error **error)
Retrieves timestamp from frame reference.
Definition: rscore.hpp:146
const char * rs_get_device_info(const rs_device *device, rs_camera_info info, rs_error **error)
Retrieves camera specific information, such as versions of various internal componnents.
Definition: rs.h:253
struct rs_error rs_error
Definition: rs.h:357
Definition: rs.h:55
void rs_stop_source(rs_device *device, rs_source source, rs_error **error)
Ends data acquisition for the specified source providers.
int rs_get_detached_frame_width(const rs_frame_ref *frame, rs_error **error)
Retrieves frame intrinsic width in pixels.
Timestamp data from the motion microcontroller.
Definition: rs.h:339
Definition: rs.h:188
int rs_get_detached_frame_stride(const rs_frame_ref *frame, rs_error **error)
Retrieves frame stride, meaning the actual line width in memory in bytes (not the logical image width...
unsigned long long rs_get_frame_number(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves frame number.
Definition: rs.h:161
int rs_supports_camera_info(rs_device *device, rs_camera_info info_param, rs_error **error)
Returns true if given camera information parameter is supported by the device.
void rs_free_error(rs_error *error)
Frees memory of an error object.
Definition: rs.h:57
Definition: rs.h:63
int height
Definition: rs.h:303
void(* rs_timestamp_callback_ptr)(rs_device *, rs_timestamp_data, void *)
Definition: rs.h:367
float fy
Definition: rs.h:307
struct rs_motion_device_intrinsic rs_motion_device_intrinsic
Motion device intrinsics: scale, bias, and variances.
unsigned int is_valid
Definition: rs.h:350
int rs_get_api_version(rs_error **error)
Retrieves API version from the source code. Evaluate that the value is conformant to the established ...
Definition: rs.h:207
Definition: rs.h:93
rs_source
Source: allows you to choose between available hardware subdevices.
Definition: rs.h:90
struct rs_motion_intrinsics rs_motion_intrinsics
Motion module intrinsics: includes accelerometer and gyroscope intrinsics structs of type rs_motion_d...
int width
Definition: rs.h:302
Definition: rs.h:105
Definition: rs.h:41
Video stream intrinsics.
Definition: rs.h:300
int rs_is_motion_tracking_active(rs_device *device, rs_error **error)
Checks if data acquisition is active.
Definition: rs.h:186
Definition: rs.h:281
Definition: rs.h:95
Cross-stream extrinsics: encode the topology describing how the different devices are connected...
Definition: rs.h:332
const char * rs_timestamp_domain_to_string(rs_timestamp_domain info)
void rs_get_device_option_range(rs_device *device, rs_option option, double *min, double *max, double *step, rs_error **error)
Retrieves the available range of values for a supported option.
Definition: rs.h:206
float axes[3]
Definition: rs.h:351
const char * rs_preset_to_string(rs_preset preset)
rs_motion_device_intrinsic acc
Definition: rs.h:327
rs_preset
Presets: general preferences that are translated by librealsense into concrete resolution and FPS...
Definition: rs.h:81
Definition: rs.h:195
int rs_get_stream_framerate(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves the frame rate for a specific stream.
float rotation[9]
Definition: rs.h:334
const char * rs_format_to_string(rs_format format)
distortion
Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.
Definition: rs.hpp:76
rs_stream
Streams are different types of data provided by RealSense devices.
Definition: rs.h:33
const char * rs_option_to_string(rs_option option)
struct rs_motion_data rs_motion_data
Motion data from gyroscope and accelerometer from the microcontroller.
Definition: rs.h:269
Definition: rs.h:254
Definition: rs.h:187
Definition: rs.h:61
Definition: rs.h:224
Definition: rs.h:137
Definition: rs.h:69
unsigned long long frame_number
Definition: rs.h:343
rs_log_severity
Severity of the librealsense logger.
Definition: rs.h:265
Definition: rs.h:147
double rs_get_detached_frame_metadata(const rs_frame_ref *frame, rs_frame_metadata frame_metadata, rs_error **error)
Retrieves metadata from a frame reference.
float fx
Definition: rs.h:306
rs_capabilities
Specifies various capabilities of a RealSense device.
Definition: rs.h:213
void rs_set_frame_callback_cpp(rs_device *device, rs_stream stream, rs_frame_callback *callback, rs_error **error)
Sets up a frame callback that is called immediately when an image is available, with no synchronizati...
Definition: rs.h:284
Definition: rs.h:256
Definition: rscore.hpp:64
rs_device * rs_get_device(rs_context *context, int index, rs_error **error)
Retrieves connected device by index.
const char * rs_get_device_serial(const rs_device *device, rs_error **error)
Retrieves unique serial number of the device.
void rs_wait_for_frames(rs_device *device, rs_error **error)
Blocks until new frames are available.
Definition: rs.h:215
Definition: rs.h:145
void rs_enable_stream_preset(rs_device *device, rs_stream stream, rs_preset preset, rs_error **error)
Enables a specific stream and requests properties using a preset.
rs_motion_device_intrinsic gyro
Definition: rs.h:328
rs_distortion model
Definition: rs.h:308
Definition: rscore.hpp:139
Definition: rscore.hpp:44
rs_distortion
Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.
Definition: rs.h:99
void rs_start_device(rs_device *device, rs_error **error)
Begins streaming on all enabled streams for this device.
Definition: rs.h:60
void rs_stop_device(rs_device *device, rs_error **error)
Ends data acquisition for the specified source providers.
float ppx
Definition: rs.h:304
rs_frame_metadata
Types of value provided from the device with each frame.
Definition: rs.h:203
Definition: rs.h:142
Definition: rs.h:246
Definition: rs.h:39
Definition: rs.h:35
Definition: rs.h:40
Definition: rs.h:84
Definition: rs.h:64
int rs_is_stream_enabled(const rs_device *device, rs_stream stream, rs_error **error)
Determines if a specific stream is enabled.
Definition: rs.h:294
rs_ivcam_preset
For SR300 devices: provides optimized settings (presets) for specific types of usage.
Definition: rs.h:109
Definition: rs.h:65
int rs_get_stream_height(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves the height in pixels of a specific stream, equivalent to the height field from the stream's...
Definition: rs.h:47
Definition: rs.h:119
Definition: rs.h:37
Definition: rs.h:131
rs_event_source
Source device that triggered a specific timestamp event from the motion module.
Definition: rs.h:276
Definition: rs.h:135
const void * rs_get_detached_frame_data(const rs_frame_ref *frame, rs_error **error)
Retrieves data from frame reference.
Definition: rs.h:36
void rs_get_motion_intrinsics(const rs_device *device, rs_motion_intrinsics *intrinsic, rs_error **error)
Retrieves intrinsic camera parameters for a motion module.
Definition: rs.h:143
preset
Presets: general preferences that are translated by librealsense into concrete resolution and FPS...
Definition: rs.hpp:68
Definition: rs.h:118
void rs_enable_motion_tracking_cpp(rs_device *device, rs_motion_callback *motion_callback, rs_timestamp_callback *timestamp_callback, rs_error **error)
Enables and configures motion-tracking data handlers.
Definition: rs.h:255
Definition: rs.h:245