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 4
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;
308  rs_distortion model;
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;
342  rs_event_source source_id;
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);
367 typedef void (*rs_timestamp_callback_ptr)(rs_device * , rs_timestamp_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 
535 void rs_enable_stream_preset(rs_device * device, rs_stream stream, rs_preset preset, rs_error ** error);
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 
579 rs_format rs_get_stream_format(const rs_device * device, rs_stream stream, rs_error ** error);
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 
628 void rs_enable_motion_tracking(rs_device * device,
631  rs_error ** error);
632 
654 void rs_enable_motion_tracking_cpp(rs_device * device,
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 
846 double rs_get_detached_frame_metadata(const rs_frame_ref * frame, rs_frame_metadata frame_metadata, rs_error ** error);
847 
855 int rs_supports_frame_metadata(const rs_frame_ref * frame, rs_frame_metadata frame_metadata, rs_error ** error);
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 
909 rs_timestamp_domain rs_get_detached_frame_timestamp_domain(const rs_frame_ref * frame, rs_error ** error);
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 
973 rs_format rs_get_detached_frame_format(const rs_frame_ref * frame, rs_error ** error);
974 
981 rs_stream rs_get_detached_frame_stream_type(const rs_frame_ref * frame, rs_error ** error);
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);
1031 const char * rs_distortion_to_string (rs_distortion distortion);
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);
1035 const char * rs_event_to_string (rs_event_source event);
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);
1039 const char * rs_timestamp_domain_to_string(rs_timestamp_domain info);
1040 const char * rs_frame_metadata_to_string(rs_frame_metadata md);
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
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...
Definition: rs.cpp:257
void timestamp_callback(rs_device *, rs_timestamp_data, void *)
int rs_supports(rs_device *device, rs_capabilities capability, rs_error **error)
Determines device capabilities.
Definition: rs.cpp:442
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. ...
Definition: rs.cpp:173
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.
Definition: rs.cpp:289
rs_timestamp_data timestamp_data
Definition: rs.h:349
const char * rs_stream_to_string(rs_stream stream)
Definition: rs.cpp:754
void rs_start_source(rs_device *device, rs_source source, rs_error **error)
Begins streaming on all enabled streams for this device.
Definition: rs.cpp:390
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.cpp:366
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: rs.cpp:331
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.cpp:338
const char * rs_source_to_string(rs_source source)
Definition: rs.cpp:760
void on_timestamp_event(rs::timestamp_data entry)
Definition: rs.cpp:16
int rs_supports_frame_metadata(const rs_frame_ref *frame, rs_frame_metadata frame_metadata, rs_error **error)
Determines device metadata.
Definition: rs.cpp:466
void(* rs_frame_callback_ptr)(rs_device *dev, rs_frame_ref *frame, void *user)
Definition: rs.h:365
const char * rs_camera_info_to_string(rs_camera_info info)
Definition: rs.cpp:764
int rs_get_device_count(const rs_context *context, rs_error **error)
Determines number of connected devices.
Definition: rs.cpp:113
frame_metadata
Types of value provided from the device with each frame.
Definition: rs.hpp:160
GLint GLint GLsizei GLsizei height
Definition: glext.h:112
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.
Definition: rs.cpp:769
struct rs_intrinsics rs_intrinsics
Video stream intrinsics.
rs_format rs_get_detached_frame_format(const rs_frame_ref *frame, rs_error **error)
Retrieves frame format.
Definition: rs.cpp:555
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.
Definition: rs.cpp:207
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...
void motion_callback(rs_device *, rs_motion_data, void *)
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.
Definition: rs.cpp:505
GLuint GLsizei const GLchar * message
Definition: glext.h:2482
void(* rs_motion_callback_ptr)(rs_device *, rs_motion_data, void *)
Definition: rs.h:366
unsigned long long rs_get_detached_frame_number(const rs_frame_ref *frame, rs_error **error)
Retrieves frame number from frame reference.
Definition: rs.cpp:570
struct rs_frameset rs_frameset
Definition: rs.h:358
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.
Definition: rs.cpp:474
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.
Definition: rs.cpp:490
int rs_is_device_streaming(const rs_device *device, rs_error **error)
Determines if the device is currently streaming.
Definition: rs.cpp:413
float ppy
Definition: rs.h:305
const char * rs_frame_metadata_to_string(rs_frame_metadata md)
Definition: rs.cpp:767
const char * rs_distortion_to_string(rs_distortion distortion)
Definition: rs.cpp:757
struct rs_timestamp_data rs_timestamp_data
Timestamp data from the motion microcontroller.
void rs_delete_context(rs_context *context, rs_error **error)
Frees the relevant context object.
Definition: rs.cpp:106
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.
Definition: rs.cpp:712
const char * rs_get_device_name(const rs_device *device, rs_error **error)
Retrieves human-readable device model string.
Definition: rs.cpp:128
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.
Definition: rs.cpp:654
Motion device intrinsics: scale, bias, and variances.
Definition: rs.h:313
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.
Definition: rs.cpp:751
float rs_get_device_depth_scale(const rs_device *device, rs_error **error)
Retrieves mapping between the units of the depth image and meters.
Definition: rs.cpp:420
const char * rs_blob_type_to_string(rs_blob_type type)
Definition: rs.cpp:763
GLuint GLuint stream
Definition: glext.h:1774
rs_output_buffer_format
Output buffer format: sets how librealsense works with frame memory.
Definition: rs.h:73
const char * rs_get_device_usb_port_id(const rs_device *device, rs_error **error)
Retrieves the USB port number of the device.
Definition: rs.cpp:149
rs_timestamp_domain
Specifies the clock in relation to which the frame timestamp was measured.
Definition: rs.h:292
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)
Definition: rs.cpp:324
void rs_log_to_file(rs_log_severity min_severity, const char *file_path, rs_error **error)
Starts logging to file.
Definition: rs.cpp:775
rs_stream rs_get_detached_frame_stream_type(const rs_frame_ref *frame, rs_error **error)
Retrieves frame stream type.
Definition: rs.cpp:562
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.
Definition: rs.cpp:198
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.cpp:190
int rs_poll_for_frames(rs_device *device, rs_error **error)
Checks if new frames are available, without blocking.
Definition: rs.cpp:435
double timestamp
Definition: rs.h:341
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.cpp:749
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.cpp:273
rs_context * rs_create_context(int api_version, rs_error **error)
Creates RealSense context that is required for the rest of the API.
Definition: rs.cpp:75
const char * rs_capabilities_to_string(rs_capabilities capability)
Definition: rs.cpp:759
double rs_get_device_option(rs_device *device, rs_option option, rs_error **error)
Retrieves the current value of a single option.
Definition: rs.cpp:694
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.
Definition: rs.cpp:645
int rs_get_detached_frame_bpp(const rs_frame_ref *frame, rs_error **error)
Retrieves frame bits per pixel.
Definition: rs.cpp:548
void rs_disable_stream(rs_device *device, rs_stream stream, rs_error **error)
Disables a specific stream.
Definition: rs.cpp:241
GLuint index
Definition: glext.h:655
int rs_get_detached_framerate(const rs_frame_ref *frame, rs_error **error)
Retrieves frame intrinsic frame rate.
Definition: rs.cpp:533
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...
Definition: rs.cpp:306
void rs_release_frame(rs_device *device, rs_frame_ref *frame, rs_error **error)
Releases frame handle.
Definition: rs.cpp:577
GLuint GLuint GLsizei count
Definition: glext.h:111
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.cpp:163
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.
Definition: rs.cpp:182
Motion module intrinsics: includes accelerometer and gyroscope intrinsics structs of type rs_motion_d...
Definition: rs.h:325
auto timestamp_handler
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.
Definition: rs.cpp:731
int rs_get_detached_frame_height(const rs_frame_ref *frame, rs_error **error)
Retrieves frame intrinsic height.
Definition: rs.cpp:526
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.cpp:156
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * data
Definition: glext.h:223
auto motion_handler
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.
Definition: rs.cpp:704
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.
Definition: rs.cpp:220
const char * rs_get_failed_args(const rs_error *error)
Returns static pointer to arguments of a failing function in case of error.
Definition: rs.cpp:750
rs_format
Formats: defines how each stream can be encoded.
Definition: rs.h:53
const char * rs_event_to_string(rs_event_source event)
Definition: rs.cpp:761
double rs_get_detached_frame_timestamp(const rs_frame_ref *frame, rs_error **error)
Retrieves timestamp from frame reference.
Definition: rs.cpp:498
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.cpp:142
void rs_stop_source(rs_device *device, rs_source source, rs_error **error)
Ends data acquisition for the specified source providers.
Definition: rs.cpp:405
int rs_get_detached_frame_width(const rs_frame_ref *frame, rs_error **error)
Retrieves frame intrinsic width in pixels.
Definition: rs.cpp:519
Timestamp data from the motion microcontroller.
Definition: rs.h:339
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...
Definition: rs.cpp:540
unsigned long long rs_get_frame_number(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves frame number.
Definition: rs.cpp:482
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.
Definition: rs.cpp:450
void rs_free_error(rs_error *error)
Frees memory of an error object.
Definition: rs.cpp:748
GLsizei const GLfloat * value
Definition: glext.h:693
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.cpp:721
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
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.cpp:375
struct _cl_event * event
Definition: glext.h:2917
typedef void(APIENTRYP PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode
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)
Definition: rs.cpp:765
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.cpp:635
const char * rs_preset_to_string(rs_preset preset)
Definition: rs.cpp:756
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
int rs_get_stream_framerate(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves the frame rate for a specific stream.
Definition: rs.cpp:281
GLenum GLsizei GLsizei GLint * values
Definition: glext.h:1484
const char * rs_format_to_string(rs_format format)
Definition: rs.cpp:755
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
GLint GLint GLsizei width
Definition: glext.h:112
const char * rs_option_to_string(rs_option option)
Definition: rs.cpp:758
struct rs_motion_data rs_motion_data
Motion data from gyroscope and accelerometer from the microcontroller.
GLsizei GLsizei GLchar * source
Definition: glext.h:672
rs_device * dev
GLsizeiptr size
Definition: glext.h:532
unsigned long long frame_number
Definition: rs.h:343
rs_log_severity
Severity of the librealsense logger.
Definition: rs.h:265
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.
Definition: rs.cpp:458
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.cpp:315
rs_device * rs_get_device(rs_context *context, int index, rs_error **error)
Retrieves connected device by index.
Definition: rs.cpp:120
const char * rs_get_device_serial(const rs_device *device, rs_error **error)
Retrieves unique serial number of the device.
Definition: rs.cpp:135
void rs_wait_for_frames(rs_device *device, rs_error **error)
Blocks until new frames are available.
Definition: rs.cpp:428
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.
Definition: rs.cpp:232
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:112
rs_motion_device_intrinsic gyro
Definition: rs.h:328
rs_distortion model
Definition: rs.h:308
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.cpp:383
void rs_stop_device(rs_device *device, rs_error **error)
Ends data acquisition for the specified source providers.
Definition: rs.cpp:398
float ppx
Definition: rs.h:304
rs_frame_metadata
Types of value provided from the device with each frame.
Definition: rs.h:203
void on_motion_event(rs::motion_data entry)
int rs_is_stream_enabled(const rs_device *device, rs_stream stream, rs_error **error)
Determines if a specific stream is enabled.
Definition: rs.cpp:249
rs_ivcam_preset
For SR300 devices: provides optimized settings (presets) for specific types of usage.
Definition: rs.h:109
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.cpp:265
rs_event_source
Source device that triggered a specific timestamp event from the motion module.
Definition: rs.h:276
const void * rs_get_detached_frame_data(const rs_frame_ref *frame, rs_error **error)
Retrieves data from frame reference.
Definition: rs.cpp:512
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.cpp:298
GLuint GLuint GLsizei GLenum type
Definition: glext.h:111
preset
Presets: general preferences that are translated by librealsense into concrete resolution and FPS...
Definition: rs.hpp:68
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.cpp:352
GLenum GLenum const GLfloat * coeffs
Definition: glext.h:9593


librealsense
Author(s): Sergey Dorodnicov , Mark Horn , Reagan Lopez
autogenerated on Fri Mar 13 2020 03:16:17