Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
Loading...
Searching...
No Matches
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
14extern "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
33typedef enum rs_stream
34{
49
53typedef enum rs_format
54{
71
74{
79
81typedef enum rs_preset
82{
88
90typedef enum rs_source
91{
97
99typedef enum rs_distortion
100{
107
109typedef enum rs_ivcam_preset
110{
124
128typedef enum rs_option
129{
201
204{
209
213typedef enum rs_capabilities
214{
226
228typedef enum rs_blob_type {
232
237typedef enum rs_camera_info {
263
265typedef enum rs_log_severity {
274
276typedef enum rs_event_source
277{
287
293{
298
300typedef 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];
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];
321 float bias_variances[3];
323
326{
330
332typedef struct rs_extrinsics
333{
334 float rotation[9];
335 float translation[3];
337
339typedef struct rs_timestamp_data
340{
341 double timestamp;
343 unsigned long long frame_number;
345
347typedef struct rs_motion_data
348{
350 unsigned int is_valid;
351 float axes[3];
353
354
355typedef struct rs_context rs_context;
356typedef struct rs_device rs_device;
357typedef struct rs_error rs_error;
364
365typedef void (*rs_frame_callback_ptr)(rs_device * dev, rs_frame_ref * frame, void * user);
366typedef void (*rs_motion_callback_ptr)(rs_device * , rs_motion_data, void * );
368typedef void (*rs_log_callback_ptr)(rs_log_severity min_severity, const char * message, void * user);
369
376rs_context * rs_create_context(int api_version, rs_error ** error);
377
385void rs_delete_context(rs_context * context, rs_error ** error);
386
393int rs_get_device_count(const rs_context * context, rs_error ** error);
394
402rs_device * rs_get_device(rs_context * context, int index, rs_error ** error);
403
410const char * rs_get_device_name(const rs_device * device, rs_error ** error);
411
418const char * rs_get_device_serial(const rs_device * device, rs_error ** error);
419
427const char * rs_get_device_info(const rs_device * device, rs_camera_info info, rs_error ** error);
428
435const char * rs_get_device_usb_port_id(const rs_device * device, rs_error ** error);
436
443const char * rs_get_device_firmware_version(const rs_device * device, rs_error ** error);
444
453void rs_get_device_extrinsics(const rs_device * device, rs_stream from_stream, rs_stream to_stream, rs_extrinsics * extrin, rs_error ** error);
454
462void rs_get_motion_extrinsics_from(const rs_device * device, rs_stream from, rs_extrinsics * extrin, rs_error ** error);
463
470float rs_get_device_depth_scale(const rs_device * device, rs_error ** error);
471
479int rs_device_supports_option(const rs_device * device, rs_option option, rs_error ** error);
480
488int rs_get_stream_mode_count(const rs_device * device, rs_stream stream, rs_error ** error);
489
501void 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
514void 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
526void rs_enable_stream(rs_device * device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_error ** error);
527
535void rs_enable_stream_preset(rs_device * device, rs_stream stream, rs_preset preset, rs_error ** error);
536
543void rs_disable_stream(rs_device * device, rs_stream stream, rs_error ** error);
544
552int rs_is_stream_enabled(const rs_device * device, rs_stream stream, rs_error ** error);
553
561int rs_get_stream_width(const rs_device * device, rs_stream stream, rs_error ** error);
562
570int rs_get_stream_height(const rs_device * device, rs_stream stream, rs_error ** error);
571
580
588int rs_get_stream_framerate(const rs_device * device, rs_stream stream, rs_error ** error);
589
597void rs_get_stream_intrinsics(const rs_device * device, rs_stream stream, rs_intrinsics * intrin, rs_error ** error);
598
605void rs_get_motion_intrinsics(const rs_device * device, rs_motion_intrinsics * intrinsic, rs_error ** error);
606
616void 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
669void rs_set_frame_callback_cpp(rs_device * device, rs_stream stream, rs_frame_callback * callback, rs_error ** error);
670
677
685
686
692void rs_start_device(rs_device * device, rs_error ** error);
693
699void rs_stop_device(rs_device * device, rs_error ** error);
700
707void rs_start_source(rs_device * device, rs_source source, rs_error ** error);
708
715void rs_stop_source(rs_device * device, rs_source source, rs_error ** error);
716
723int rs_is_device_streaming(const rs_device * device, rs_error ** error);
724
734void rs_get_device_option_range(rs_device * device, rs_option option, double * min, double * max, double * step, rs_error ** error);
735
746void rs_get_device_option_range_ex(rs_device * device, rs_option option, double * min, double * max, double * step, double * def, rs_error ** error);
747
756void rs_get_device_options(rs_device * device, const rs_option * options, unsigned int count, double * values, rs_error ** error);
757
766void rs_set_device_options(rs_device * device, const rs_option * options, unsigned int count, const double * values, rs_error ** error);
767
775void rs_reset_device_options_to_default(rs_device * device, const rs_option* options, int count, rs_error ** error);
776
784double rs_get_device_option(rs_device * device, rs_option option, rs_error ** error);
785
786
794const char * rs_get_device_option_description(rs_device * device, rs_option option, rs_error ** error);
795
796
804void rs_set_device_option(rs_device * device, rs_option option, double value, rs_error ** error);
805
811void rs_wait_for_frames(rs_device * device, rs_error ** error);
812
819int rs_poll_for_frames(rs_device * device, rs_error ** error);
820
828int rs_supports(rs_device * device, rs_capabilities capability, rs_error ** error);
829
837int rs_supports_camera_info(rs_device * device, rs_camera_info info_param, rs_error ** error);
838
846double rs_get_detached_frame_metadata(const rs_frame_ref * frame, rs_frame_metadata frame_metadata, rs_error ** error);
847
855int rs_supports_frame_metadata(const rs_frame_ref * frame, rs_frame_metadata frame_metadata, rs_error ** error);
856
864double rs_get_frame_timestamp(const rs_device * device, rs_stream stream, rs_error ** error);
865
873unsigned long long rs_get_frame_number(const rs_device * device, rs_stream stream, rs_error ** error);
874
882const void * rs_get_frame_data(const rs_device * device, rs_stream stream, rs_error ** error);
883
891void rs_release_frame(rs_device * device, rs_frame_ref * frame, rs_error ** error);
892
900
910
917unsigned long long rs_get_detached_frame_number(const rs_frame_ref * frame, rs_error ** error);
918
925const void * rs_get_detached_frame_data(const rs_frame_ref * frame, rs_error ** error);
926
934
942
950
958
966
974
982
992void rs_send_blob_to_device(rs_device * device, rs_blob_type type, void * data, int size, rs_error ** error);
993
1000
1006const char * rs_get_failed_function (const rs_error * error);
1007
1013const char * rs_get_failed_args (const rs_error * error);
1014
1020const char * rs_get_error_message (const rs_error * error);
1021
1027
1028const char * rs_stream_to_string (rs_stream stream);
1029const char * rs_format_to_string (rs_format format);
1030const char * rs_preset_to_string (rs_preset preset);
1031const char * rs_distortion_to_string (rs_distortion distortion);
1032const char * rs_option_to_string (rs_option option);
1034const char * rs_source_to_string (rs_source source);
1038const char * rs_camera_info_to_string(rs_camera_info info);
1041
1047void rs_log_to_console(rs_log_severity min_severity, rs_error ** error);
1048
1055void rs_log_to_file(rs_log_severity min_severity, const char * file_path, rs_error ** error);
1056
1063void rs_log_to_callback_cpp(rs_log_severity min_severity, rs_log_callback * callback, rs_error ** error);
1064
1072void 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
const char * rs_get_device_name(const rs_device *device, rs_error **error)
Retrieves human-readable device model string.
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.
const char * rs_preset_to_string(rs_preset preset)
int rs_get_detached_framerate(const rs_frame_ref *frame, rs_error **error)
Retrieves frame intrinsic frame rate.
rs_format rs_get_stream_format(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves the pixel format for a specific stream.
const char * rs_format_to_string(rs_format format)
void rs_delete_context(rs_context *context, rs_error **error)
Frees the relevant context object.
const char * rs_get_failed_function(const rs_error *error)
Returns static pointer to name of a failing function in case of error.
void rs_log_to_console(rs_log_severity min_severity, rs_error **error)
Starts logging to console.
void rs_log_to_file(rs_log_severity min_severity, const char *file_path, rs_error **error)
Starts logging to file.
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.
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...
const void * rs_get_detached_frame_data(const rs_frame_ref *frame, rs_error **error)
Retrieves data from frame reference.
struct rs_error rs_error
Definition: rs.h:357
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_get_detached_frame_bpp(const rs_frame_ref *frame, rs_error **error)
Retrieves frame bits per pixel.
int rs_is_stream_enabled(const rs_device *device, rs_stream stream, rs_error **error)
Determines if a specific stream is enabled.
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...
rs_timestamp_domain rs_get_detached_frame_timestamp_domain(const rs_frame_ref *frame, rs_error **error)
Retrieves timestamp domain from frame reference.
const char * rs_stream_to_string(rs_stream stream)
int rs_get_detached_frame_width(const rs_frame_ref *frame, rs_error **error)
Retrieves frame intrinsic width in pixels.
void rs_free_error(rs_error *error)
Frees memory of an error object.
rs_context * rs_create_context(int api_version, rs_error **error)
Creates RealSense context that is required for the rest of the API.
int rs_get_detached_frame_height(const rs_frame_ref *frame, rs_error **error)
Retrieves frame intrinsic height.
rs_stream
Streams are different types of data provided by RealSense devices.
Definition: rs.h:34
@ RS_STREAM_DEPTH_ALIGNED_TO_COLOR
Definition: rs.h:44
@ RS_STREAM_DEPTH_ALIGNED_TO_RECTIFIED_COLOR
Definition: rs.h:45
@ RS_STREAM_POINTS
Definition: rs.h:40
@ RS_STREAM_INFRARED2_ALIGNED_TO_DEPTH
Definition: rs.h:43
@ RS_STREAM_INFRARED
Definition: rs.h:37
@ RS_STREAM_DEPTH
Definition: rs.h:35
@ RS_STREAM_COUNT
Definition: rs.h:47
@ RS_STREAM_RECTIFIED_COLOR
Definition: rs.h:41
@ RS_STREAM_FISHEYE
Definition: rs.h:39
@ RS_STREAM_COLOR_ALIGNED_TO_DEPTH
Definition: rs.h:42
@ RS_STREAM_COLOR
Definition: rs.h:36
@ RS_STREAM_DEPTH_ALIGNED_TO_INFRARED2
Definition: rs.h:46
@ RS_STREAM_INFRARED2
Definition: rs.h:38
const char * rs_option_to_string(rs_option option)
rs_frame_metadata
Types of value provided from the device with each frame.
Definition: rs.h:204
@ RS_FRAME_METADATA_ACTUAL_FPS
Definition: rs.h:206
@ RS_FRAME_METADATA_COUNT
Definition: rs.h:207
@ RS_FRAME_METADATA_ACTUAL_EXPOSURE
Definition: rs.h:205
unsigned long long rs_get_frame_number(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves frame number.
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.
int rs_is_device_streaming(const rs_device *device, rs_error **error)
Determines if the device is currently streaming.
float rs_get_device_depth_scale(const rs_device *device, rs_error **error)
Retrieves mapping between the units of the depth image and meters.
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.
rs_event_source
Source device that triggered a specific timestamp event from the motion module.
Definition: rs.h:277
@ RS_EVENT_G1_SYNC
Definition: rs.h:283
@ RS_EVENT_G0_SYNC
Definition: rs.h:282
@ RS_EVENT_SOURCE_COUNT
Definition: rs.h:285
@ RS_EVENT_IMU_ACCEL
Definition: rs.h:278
@ RS_EVENT_IMU_MOTION_CAM
Definition: rs.h:281
@ RS_EVENT_IMU_DEPTH_CAM
Definition: rs.h:280
@ RS_EVENT_IMU_GYRO
Definition: rs.h:279
@ RS_EVENT_G2_SYNC
Definition: rs.h:284
const char * rs_camera_info_to_string(rs_camera_info info)
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...
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.
void rs_wait_for_frames(rs_device *device, rs_error **error)
Blocks until new frames are available.
void rs_disable_motion_tracking(rs_device *device, rs_error **error)
Disables motion-tracking handlers.
void rs_log_to_callback_cpp(rs_log_severity min_severity, rs_log_callback *callback, rs_error **error)
Starts logging to user-provided callback.
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.
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.
rs_distortion
Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.
Definition: rs.h:100
@ RS_DISTORTION_FTHETA
Definition: rs.h:104
@ RS_DISTORTION_COUNT
Definition: rs.h:105
@ RS_DISTORTION_MODIFIED_BROWN_CONRADY
Definition: rs.h:102
@ RS_DISTORTION_INVERSE_BROWN_CONRADY
Definition: rs.h:103
@ RS_DISTORTION_NONE
Definition: rs.h:101
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.
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.
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.
double rs_get_device_option(rs_device *device, rs_option option, rs_error **error)
Retrieves the current value of a single option.
double rs_get_detached_frame_timestamp(const rs_frame_ref *frame, rs_error **error)
Retrieves timestamp from frame reference.
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_set_device_option(rs_device *device, rs_option option, double value, rs_error **error)
Sets the current value of a single option.
void rs_stop_device(rs_device *device, rs_error **error)
Ends data acquisition for the specified source providers.
int rs_supports_frame_metadata(const rs_frame_ref *frame, rs_frame_metadata frame_metadata, rs_error **error)
Determines device metadata.
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.
void(* rs_motion_callback_ptr)(rs_device *, rs_motion_data, void *)
Definition: rs.h:366
rs_output_buffer_format
Output buffer format: sets how librealsense works with frame memory.
Definition: rs.h:74
@ RS_OUTPUT_BUFFER_FORMAT_COUNT
Definition: rs.h:77
@ RS_OUTPUT_BUFFER_FORMAT_CONTINUOUS
Definition: rs.h:75
@ RS_OUTPUT_BUFFER_FORMAT_NATIVE
Definition: rs.h:76
const char * rs_blob_type_to_string(rs_blob_type type)
const char * rs_get_failed_args(const rs_error *error)
Returns static pointer to arguments of a failing function in case of error.
const char * rs_timestamp_domain_to_string(rs_timestamp_domain info)
rs_format rs_get_detached_frame_format(const rs_frame_ref *frame, rs_error **error)
Retrieves frame format.
int rs_get_api_version(rs_error **error)
Retrieves API version from the source code. Evaluate that the value is conformant to the established ...
void rs_get_motion_intrinsics(const rs_device *device, rs_motion_intrinsics *intrinsic, rs_error **error)
Retrieves intrinsic camera parameters for a motion module.
rs_preset
Presets: general preferences that are translated by librealsense into concrete resolution and FPS.
Definition: rs.h:82
@ RS_PRESET_BEST_QUALITY
Definition: rs.h:83
@ RS_PRESET_LARGEST_IMAGE
Definition: rs.h:84
@ RS_PRESET_HIGHEST_FRAMERATE
Definition: rs.h:85
@ RS_PRESET_COUNT
Definition: rs.h:86
rs_log_severity
Severity of the librealsense logger.
Definition: rs.h:265
@ RS_LOG_SEVERITY_INFO
Definition: rs.h:267
@ RS_LOG_SEVERITY_COUNT
Definition: rs.h:272
@ RS_LOG_SEVERITY_ERROR
Definition: rs.h:269
@ RS_LOG_SEVERITY_WARN
Definition: rs.h:268
@ RS_LOG_SEVERITY_DEBUG
Definition: rs.h:266
@ RS_LOG_SEVERITY_NONE
Definition: rs.h:271
@ RS_LOG_SEVERITY_FATAL
Definition: rs.h:270
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.
rs_device * rs_get_device(rs_context *context, int index, rs_error **error)
Retrieves connected device by index.
int rs_poll_for_frames(rs_device *device, rs_error **error)
Checks if new frames are available, without blocking.
rs_option
Defines general configuration controls.
Definition: rs.h:129
@ RS_OPTION_R200_AUTO_EXPOSURE_RIGHT_EDGE
Definition: rs.h:175
@ RS_OPTION_COLOR_BACKLIGHT_COMPENSATION
Definition: rs.h:130
@ RS_OPTION_HARDWARE_LOGGER_ENABLED
Definition: rs.h:196
@ RS_OPTION_R200_AUTO_EXPOSURE_TOP_EDGE
Definition: rs.h:172
@ RS_OPTION_SR300_AUTO_RANGE_ENABLE_LASER
Definition: rs.h:149
@ RS_OPTION_F200_LASER_POWER
Definition: rs.h:142
@ RS_OPTION_R200_AUTO_EXPOSURE_KP_EXPOSURE
Definition: rs.h:170
@ RS_OPTION_R200_LR_EXPOSURE
Definition: rs.h:160
@ RS_OPTION_FISHEYE_ENABLE_AUTO_EXPOSURE
Definition: rs.h:190
@ RS_OPTION_R200_DEPTH_CONTROL_LR_THRESHOLD
Definition: rs.h:185
@ RS_OPTION_SR300_AUTO_RANGE_UPPER_THRESHOLD
Definition: rs.h:156
@ RS_OPTION_R200_DEPTH_CONTROL_TEXTURE_DIFFERENCE_THRESHOLD
Definition: rs.h:182
@ RS_OPTION_COLOR_ENABLE_AUTO_WHITE_BALANCE
Definition: rs.h:141
@ RS_OPTION_SR300_AUTO_RANGE_MIN_LASER
Definition: rs.h:153
@ RS_OPTION_COLOR_CONTRAST
Definition: rs.h:132
@ RS_OPTION_F200_DYNAMIC_FPS
Definition: rs.h:147
@ RS_OPTION_R200_DEPTH_CLAMP_MAX
Definition: rs.h:164
@ RS_OPTION_FISHEYE_STROBE
Definition: rs.h:188
@ RS_OPTION_TOTAL_FRAME_DROPS
Definition: rs.h:197
@ RS_OPTION_R200_DEPTH_CONTROL_SCORE_MINIMUM_THRESHOLD
Definition: rs.h:179
@ RS_OPTION_FISHEYE_AUTO_EXPOSURE_SKIP_FRAMES
Definition: rs.h:194
@ RS_OPTION_R200_DEPTH_UNITS
Definition: rs.h:162
@ RS_OPTION_R200_DEPTH_CLAMP_MIN
Definition: rs.h:163
@ RS_OPTION_COLOR_GAMMA
Definition: rs.h:135
@ RS_OPTION_COLOR_SHARPNESS
Definition: rs.h:138
@ RS_OPTION_R200_EMITTER_ENABLED
Definition: rs.h:161
@ RS_OPTION_R200_DEPTH_CONTROL_NEIGHBOR_THRESHOLD
Definition: rs.h:184
@ RS_OPTION_R200_DEPTH_CONTROL_ESTIMATE_MEDIAN_DECREMENT
Definition: rs.h:176
@ RS_OPTION_R200_AUTO_EXPOSURE_KP_DARK_THRESHOLD
Definition: rs.h:171
@ RS_OPTION_COLOR_BRIGHTNESS
Definition: rs.h:131
@ RS_OPTION_R200_AUTO_EXPOSURE_BOTTOM_EDGE
Definition: rs.h:173
@ RS_OPTION_SR300_AUTO_RANGE_MAX_MOTION_VERSUS_RANGE
Definition: rs.h:151
@ RS_OPTION_COLOR_HUE
Definition: rs.h:136
@ RS_OPTION_F200_MOTION_RANGE
Definition: rs.h:144
@ RS_OPTION_R200_AUTO_EXPOSURE_KP_GAIN
Definition: rs.h:169
@ RS_OPTION_R200_AUTO_EXPOSURE_MEAN_INTENSITY_SET_POINT
Definition: rs.h:167
@ RS_OPTION_FISHEYE_AUTO_EXPOSURE_ANTIFLICKER_RATE
Definition: rs.h:192
@ RS_OPTION_F200_ACCURACY
Definition: rs.h:143
@ RS_OPTION_R200_DISPARITY_SHIFT
Definition: rs.h:166
@ RS_OPTION_COUNT
Definition: rs.h:198
@ RS_OPTION_SR300_AUTO_RANGE_START_LASER
Definition: rs.h:155
@ RS_OPTION_COLOR_WHITE_BALANCE
Definition: rs.h:139
@ RS_OPTION_SR300_AUTO_RANGE_START_MOTION_VERSUS_RANGE
Definition: rs.h:152
@ RS_OPTION_FISHEYE_GAIN
Definition: rs.h:187
@ RS_OPTION_SR300_AUTO_RANGE_MIN_MOTION_VERSUS_RANGE
Definition: rs.h:150
@ RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED
Definition: rs.h:158
@ RS_OPTION_COLOR_EXPOSURE
Definition: rs.h:133
@ RS_OPTION_R200_DEPTH_CONTROL_SECOND_PEAK_THRESHOLD
Definition: rs.h:183
@ RS_OPTION_R200_AUTO_EXPOSURE_BRIGHT_RATIO_SET_POINT
Definition: rs.h:168
@ RS_OPTION_R200_DEPTH_CONTROL_SCORE_MAXIMUM_THRESHOLD
Definition: rs.h:180
@ RS_OPTION_FISHEYE_EXTERNAL_TRIGGER
Definition: rs.h:189
@ RS_OPTION_R200_LR_GAIN
Definition: rs.h:159
@ RS_OPTION_SR300_AUTO_RANGE_ENABLE_MOTION_VERSUS_RANGE
Definition: rs.h:148
@ RS_OPTION_FISHEYE_AUTO_EXPOSURE_PIXEL_SAMPLE_RATE
Definition: rs.h:193
@ RS_OPTION_R200_AUTO_EXPOSURE_LEFT_EDGE
Definition: rs.h:174
@ RS_OPTION_COLOR_GAIN
Definition: rs.h:134
@ RS_OPTION_R200_DISPARITY_MULTIPLIER
Definition: rs.h:165
@ RS_OPTION_COLOR_ENABLE_AUTO_EXPOSURE
Definition: rs.h:140
@ RS_OPTION_FISHEYE_AUTO_EXPOSURE_MODE
Definition: rs.h:191
@ RS_OPTION_SR300_AUTO_RANGE_LOWER_THRESHOLD
Definition: rs.h:157
@ RS_OPTION_R200_DEPTH_CONTROL_ESTIMATE_MEDIAN_INCREMENT
Definition: rs.h:177
@ RS_OPTION_FISHEYE_EXPOSURE
Definition: rs.h:186
@ RS_OPTION_COLOR_SATURATION
Definition: rs.h:137
@ RS_OPTION_SR300_AUTO_RANGE_MAX_LASER
Definition: rs.h:154
@ RS_OPTION_F200_FILTER_OPTION
Definition: rs.h:145
@ RS_OPTION_R200_DEPTH_CONTROL_MEDIAN_THRESHOLD
Definition: rs.h:178
@ RS_OPTION_F200_CONFIDENCE_THRESHOLD
Definition: rs.h:146
@ RS_OPTION_R200_DEPTH_CONTROL_TEXTURE_COUNT_THRESHOLD
Definition: rs.h:181
@ RS_OPTION_FRAMES_QUEUE_SIZE
Definition: rs.h:195
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.
void(* rs_log_callback_ptr)(rs_log_severity min_severity, const char *message, void *user)
Definition: rs.h:368
int rs_supports(rs_device *device, rs_capabilities capability, rs_error **error)
Determines device capabilities.
const char * rs_distortion_to_string(rs_distortion distortion)
const char * rs_get_error_message(const rs_error *error)
Returns static pointer to error message.
void rs_start_source(rs_device *device, rs_source source, rs_error **error)
Begins streaming on all enabled streams for this device.
const char * rs_get_device_serial(const rs_device *device, rs_error **error)
Retrieves unique serial number of the device.
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...
rs_format
Formats: defines how each stream can be encoded.
Definition: rs.h:54
@ RS_FORMAT_Y16
Definition: rs.h:65
@ RS_FORMAT_RGBA8
Definition: rs.h:62
@ RS_FORMAT_Y8
Definition: rs.h:64
@ RS_FORMAT_XYZ32F
Definition: rs.h:58
@ RS_FORMAT_ANY
Definition: rs.h:55
@ RS_FORMAT_Z16
Definition: rs.h:56
@ RS_FORMAT_RGB8
Definition: rs.h:60
@ RS_FORMAT_COUNT
Definition: rs.h:69
@ RS_FORMAT_RAW8
Definition: rs.h:68
@ RS_FORMAT_YUYV
Definition: rs.h:59
@ RS_FORMAT_RAW10
Definition: rs.h:66
@ RS_FORMAT_RAW16
Definition: rs.h:67
@ RS_FORMAT_BGRA8
Definition: rs.h:63
@ RS_FORMAT_DISPARITY16
Definition: rs.h:57
@ RS_FORMAT_BGR8
Definition: rs.h:61
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_timestamp_callback_ptr)(rs_device *, rs_timestamp_data, void *)
Definition: rs.h:367
int rs_is_motion_tracking_active(rs_device *device, rs_error **error)
Checks if data acquisition is active.
const char * rs_capabilities_to_string(rs_capabilities capability)
rs_timestamp_domain
Specifies the clock in relation to which the frame timestamp was measured.
Definition: rs.h:293
@ RS_TIMESTAMP_DOMAIN_COUNT
Definition: rs.h:296
@ RS_TIMESTAMP_DOMAIN_CAMERA
Definition: rs.h:294
@ RS_TIMESTAMP_DOMAIN_MICROCONTROLLER
Definition: rs.h:295
const char * rs_event_to_string(rs_event_source event)
int rs_get_stream_framerate(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves the frame rate for a specific stream.
rs_blob_type
Proprietary formats for direct communication with device firmware.
Definition: rs.h:228
@ RS_BLOB_TYPE_COUNT
Definition: rs.h:230
@ RS_BLOB_TYPE_MOTION_MODULE_FIRMWARE_UPDATE
Definition: rs.h:229
void rs_stop_source(rs_device *device, rs_source source, rs_error **error)
Ends data acquisition for the specified source providers.
rs_source
Source: allows you to choose between available hardware subdevices.
Definition: rs.h:91
@ RS_SOURCE_VIDEO
Definition: rs.h:92
@ RS_SOURCE_ALL
Definition: rs.h:94
@ RS_SOURCE_MOTION_TRACKING
Definition: rs.h:93
@ RS_SOURCE_COUNT
Definition: rs.h:95
unsigned long long rs_get_detached_frame_number(const rs_frame_ref *frame, rs_error **error)
Retrieves frame number from frame reference.
const char * rs_source_to_string(rs_source source)
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.
rs_camera_info
Read-only strings that can be queried from the device.
Definition: rs.h:237
@ RS_CAMERA_INFO_ISP_FW_VERSION
Definition: rs.h:245
@ RS_CAMERA_INFO_BUILD_DATE
Definition: rs.h:249
@ RS_CAMERA_INFO_CONTENT_VERSION
Definition: rs.h:246
@ RS_CAMERA_INFO_3RD_LENS_TYPE
Definition: rs.h:256
@ RS_CAMERA_INFO_FOCUS_ALIGNMENT_DATE
Definition: rs.h:252
@ RS_CAMERA_INFO_FOCUS_VALUE
Definition: rs.h:254
@ RS_CAMERA_INFO_CALIBRATION_DATE
Definition: rs.h:250
@ RS_CAMERA_INFO_IMAGER_MODEL_NUMBER
Definition: rs.h:248
@ RS_CAMERA_INFO_NOMINAL_BASELINE
Definition: rs.h:259
@ RS_CAMERA_INFO_LENS_COATING__TYPE
Definition: rs.h:257
@ RS_CAMERA_INFO_OEM_ID
Definition: rs.h:244
@ RS_CAMERA_INFO_MOTION_MODULE_FIRMWARE_VERSION
Definition: rs.h:242
@ RS_CAMERA_INFO_COUNT
Definition: rs.h:261
@ RS_CAMERA_INFO_MODULE_VERSION
Definition: rs.h:247
@ RS_CAMERA_INFO_ADAPTER_BOARD_FIRMWARE_VERSION
Definition: rs.h:241
@ RS_CAMERA_INFO_PROGRAM_DATE
Definition: rs.h:251
@ RS_CAMERA_INFO_DEVICE_SERIAL_NUMBER
Definition: rs.h:239
@ RS_CAMERA_INFO_3RD_LENS_COATING_TYPE
Definition: rs.h:258
@ RS_CAMERA_INFO_LENS_TYPE
Definition: rs.h:255
@ RS_CAMERA_INFO_CAMERA_TYPE
Definition: rs.h:243
@ RS_CAMERA_INFO_DEVICE_NAME
Definition: rs.h:238
@ RS_CAMERA_INFO_CAMERA_FIRMWARE_VERSION
Definition: rs.h:240
@ RS_CAMERA_INFO_3RD_NOMINAL_BASELINE
Definition: rs.h:260
@ RS_CAMERA_INFO_EMITTER_TYPE
Definition: rs.h:253
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.
rs_capabilities
Specifies various capabilities of a RealSense device.
Definition: rs.h:214
@ RS_CAPABILITIES_INFRARED2
Definition: rs.h:218
@ RS_CAPABILITIES_DEPTH
Definition: rs.h:215
@ RS_CAPABILITIES_ADAPTER_BOARD
Definition: rs.h:222
@ RS_CAPABILITIES_MOTION_MODULE_FW_UPDATE
Definition: rs.h:221
@ RS_CAPABILITIES_COLOR
Definition: rs.h:216
@ RS_CAPABILITIES_MOTION_EVENTS
Definition: rs.h:220
@ RS_CAPABILITIES_FISH_EYE
Definition: rs.h:219
@ RS_CAPABILITIES_INFRARED
Definition: rs.h:217
@ RS_CAPABILITIES_COUNT
Definition: rs.h:224
@ RS_CAPABILITIES_ENUMERATION
Definition: rs.h:223
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.
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_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.
const char * rs_get_device_usb_port_id(const rs_device *device, rs_error **error)
Retrieves the USB port number of the 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.
void(* rs_frame_callback_ptr)(rs_device *dev, rs_frame_ref *frame, void *user)
Definition: rs.h:365
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)
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_start_device(rs_device *device, rs_error **error)
Begins streaming on all enabled streams for this device.
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.
void rs_release_frame(rs_device *device, rs_frame_ref *frame, rs_error **error)
Releases frame handle.
rs_stream rs_get_detached_frame_stream_type(const rs_frame_ref *frame, rs_error **error)
Retrieves frame stream type.
int rs_get_device_count(const rs_context *context, rs_error **error)
Determines number of connected devices.
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.
void rs_disable_stream(rs_device *device, rs_stream stream, rs_error **error)
Disables a specific stream.
const char * rs_frame_metadata_to_string(rs_frame_metadata md)
rs_ivcam_preset
For SR300 devices: provides optimized settings (presets) for specific types of usage.
Definition: rs.h:110
@ RS_IVCAM_PRESET_BACKGROUND_SEGMENTATION
Definition: rs.h:113
@ RS_IVCAM_PRESET_GR_CURSOR
Definition: rs.h:118
@ RS_IVCAM_PRESET_COUNT
Definition: rs.h:122
@ RS_IVCAM_PRESET_OBJECT_SCANNING
Definition: rs.h:115
@ RS_IVCAM_PRESET_GESTURE_RECOGNITION
Definition: rs.h:114
@ RS_IVCAM_PRESET_FACE_ANALYTICS
Definition: rs.h:116
@ RS_IVCAM_PRESET_MID_RANGE
Definition: rs.h:120
@ RS_IVCAM_PRESET_LONG_RANGE
Definition: rs.h:112
@ RS_IVCAM_PRESET_FACE_LOGIN
Definition: rs.h:117
@ RS_IVCAM_PRESET_IR_ONLY
Definition: rs.h:121
@ RS_IVCAM_PRESET_SHORT_RANGE
Definition: rs.h:111
@ RS_IVCAM_PRESET_DEFAULT
Definition: rs.h:119
Definition: rscore.hpp:119
Definition: rscore.hpp:65
Cross-stream extrinsics: encode the topology describing how the different devices are connected.
Definition: rs.h:333
float translation[3]
Definition: rs.h:335
float rotation[9]
Definition: rs.h:334
Definition: rscore.hpp:133
Definition: rscore.hpp:45
Video stream intrinsics.
Definition: rs.h:301
float fy
Definition: rs.h:307
float coeffs[5]
Definition: rs.h:309
rs_distortion model
Definition: rs.h:308
float ppy
Definition: rs.h:305
float fx
Definition: rs.h:306
int height
Definition: rs.h:303
int width
Definition: rs.h:302
float ppx
Definition: rs.h:304
Definition: rscore.hpp:147
Definition: rscore.hpp:126
Motion data from gyroscope and accelerometer from the microcontroller.
Definition: rs.h:348
rs_timestamp_data timestamp_data
Definition: rs.h:349
float axes[3]
Definition: rs.h:351
unsigned int is_valid
Definition: rs.h:350
Motion device intrinsics: scale, bias, and variances.
Definition: rs.h:314
float noise_variances[3]
Definition: rs.h:320
float data[3][4]
Definition: rs.h:318
float bias_variances[3]
Definition: rs.h:321
Motion module intrinsics: includes accelerometer and gyroscope intrinsics structs of type rs_motion_d...
Definition: rs.h:326
rs_motion_device_intrinsic acc
Definition: rs.h:327
rs_motion_device_intrinsic gyro
Definition: rs.h:328
Definition: rscore.hpp:140
Timestamp data from the motion microcontroller.
Definition: rs.h:340
unsigned long long frame_number
Definition: rs.h:343
rs_event_source source_id
Definition: rs.h:342
double timestamp
Definition: rs.h:341