Classes | Macros | Typedefs | Enumerations | Functions
rs.h File Reference

Exposes librealsense functionality for C compilers. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rs_extrinsics
 Cross-stream extrinsics: encode the topology describing how the different devices are connected. More...
 
struct  rs_intrinsics
 Video stream intrinsics. More...
 
struct  rs_motion_data
 Motion data from gyroscope and accelerometer from the microcontroller. More...
 
struct  rs_motion_device_intrinsic
 Motion device intrinsics: scale, bias, and variances. More...
 
struct  rs_motion_intrinsics
 Motion module intrinsics: includes accelerometer and gyroscope intrinsics structs of type rs_motion_device_intrinsic. More...
 
struct  rs_timestamp_data
 Timestamp data from the motion microcontroller. More...
 

Macros

#define RS_API_MAJOR_VERSION   1
 
#define RS_API_MINOR_VERSION   12
 
#define RS_API_PATCH_VERSION   4
 
#define RS_API_VERSION   (((RS_API_MAJOR_VERSION) * 10000) + ((RS_API_MINOR_VERSION) * 100) + (RS_API_PATCH_VERSION))
 
#define RS_API_VERSION_STR   (VAR_ARG_STRING(RS_API_MAJOR_VERSION.RS_API_MINOR_VERSION.RS_API_PATCH_VERSION))
 
#define STRINGIFY(arg)   #arg
 
#define VAR_ARG_STRING(arg)   STRINGIFY(arg)
 

Typedefs

typedef enum rs_blob_type rs_blob_type
 Proprietary formats for direct communication with device firmware. More...
 
typedef enum rs_camera_info rs_camera_info
 Read-only strings that can be queried from the device. More...
 
typedef enum rs_capabilities rs_capabilities
 Specifies various capabilities of a RealSense device. More...
 
typedef struct rs_context rs_context
 
typedef struct rs_device rs_device
 
typedef enum rs_distortion rs_distortion
 Distortion model: defines how pixel coordinates should be mapped to sensor coordinates. More...
 
typedef struct rs_error rs_error
 
typedef enum rs_event_source rs_event_source
 Source device that triggered a specific timestamp event from the motion module. More...
 
typedef struct rs_extrinsics rs_extrinsics
 Cross-stream extrinsics: encode the topology describing how the different devices are connected. More...
 
typedef enum rs_format rs_format
 Formats: defines how each stream can be encoded. More...
 
typedef struct rs_frame_callback rs_frame_callback
 
typedef void(* rs_frame_callback_ptr) (rs_device *dev, rs_frame_ref *frame, void *user)
 
typedef enum rs_frame_metadata rs_frame_metadata
 Types of value provided from the device with each frame. More...
 
typedef struct rs_frame_ref rs_frame_ref
 
typedef struct rs_frameset rs_frameset
 
typedef struct rs_intrinsics rs_intrinsics
 Video stream intrinsics. More...
 
typedef enum rs_ivcam_preset rs_ivcam_preset
 For SR300 devices: provides optimized settings (presets) for specific types of usage. More...
 
typedef struct rs_log_callback rs_log_callback
 
typedef void(* rs_log_callback_ptr) (rs_log_severity min_severity, const char *message, void *user)
 
typedef enum rs_log_severity rs_log_severity
 Severity of the librealsense logger. More...
 
typedef struct rs_motion_callback rs_motion_callback
 
typedef void(* rs_motion_callback_ptr) (rs_device *, rs_motion_data, void *)
 
typedef struct rs_motion_data rs_motion_data
 Motion data from gyroscope and accelerometer from the microcontroller. More...
 
typedef struct rs_motion_device_intrinsic rs_motion_device_intrinsic
 Motion device intrinsics: scale, bias, and variances. More...
 
typedef struct rs_motion_intrinsics rs_motion_intrinsics
 Motion module intrinsics: includes accelerometer and gyroscope intrinsics structs of type rs_motion_device_intrinsic. More...
 
typedef enum rs_option rs_option
 Defines general configuration controls. More...
 
typedef enum rs_output_buffer_format rs_output_buffer_format
 Output buffer format: sets how librealsense works with frame memory. More...
 
typedef enum rs_preset rs_preset
 Presets: general preferences that are translated by librealsense into concrete resolution and FPS. More...
 
typedef enum rs_source rs_source
 Source: allows you to choose between available hardware subdevices. More...
 
typedef enum rs_stream rs_stream
 Streams are different types of data provided by RealSense devices. More...
 
typedef struct rs_timestamp_callback rs_timestamp_callback
 
typedef void(* rs_timestamp_callback_ptr) (rs_device *, rs_timestamp_data, void *)
 
typedef struct rs_timestamp_data rs_timestamp_data
 Timestamp data from the motion microcontroller. More...
 
typedef enum rs_timestamp_domain rs_timestamp_domain
 Specifies the clock in relation to which the frame timestamp was measured. More...
 

Enumerations

enum  rs_blob_type { RS_BLOB_TYPE_MOTION_MODULE_FIRMWARE_UPDATE, RS_BLOB_TYPE_COUNT }
 Proprietary formats for direct communication with device firmware. More...
 
enum  rs_camera_info {
  RS_CAMERA_INFO_DEVICE_NAME, RS_CAMERA_INFO_DEVICE_SERIAL_NUMBER, RS_CAMERA_INFO_CAMERA_FIRMWARE_VERSION, RS_CAMERA_INFO_ADAPTER_BOARD_FIRMWARE_VERSION,
  RS_CAMERA_INFO_MOTION_MODULE_FIRMWARE_VERSION, RS_CAMERA_INFO_CAMERA_TYPE, RS_CAMERA_INFO_OEM_ID, RS_CAMERA_INFO_ISP_FW_VERSION,
  RS_CAMERA_INFO_CONTENT_VERSION, RS_CAMERA_INFO_MODULE_VERSION, RS_CAMERA_INFO_IMAGER_MODEL_NUMBER, RS_CAMERA_INFO_BUILD_DATE,
  RS_CAMERA_INFO_CALIBRATION_DATE, RS_CAMERA_INFO_PROGRAM_DATE, RS_CAMERA_INFO_FOCUS_ALIGNMENT_DATE, RS_CAMERA_INFO_EMITTER_TYPE,
  RS_CAMERA_INFO_FOCUS_VALUE, RS_CAMERA_INFO_LENS_TYPE, RS_CAMERA_INFO_3RD_LENS_TYPE, RS_CAMERA_INFO_LENS_COATING__TYPE,
  RS_CAMERA_INFO_3RD_LENS_COATING_TYPE, RS_CAMERA_INFO_NOMINAL_BASELINE, RS_CAMERA_INFO_3RD_NOMINAL_BASELINE, RS_CAMERA_INFO_COUNT
}
 Read-only strings that can be queried from the device. More...
 
enum  rs_capabilities {
  RS_CAPABILITIES_DEPTH, RS_CAPABILITIES_COLOR, RS_CAPABILITIES_INFRARED, RS_CAPABILITIES_INFRARED2,
  RS_CAPABILITIES_FISH_EYE, RS_CAPABILITIES_MOTION_EVENTS, RS_CAPABILITIES_MOTION_MODULE_FW_UPDATE, RS_CAPABILITIES_ADAPTER_BOARD,
  RS_CAPABILITIES_ENUMERATION, RS_CAPABILITIES_COUNT
}
 Specifies various capabilities of a RealSense device. More...
 
enum  rs_distortion {
  RS_DISTORTION_NONE, RS_DISTORTION_MODIFIED_BROWN_CONRADY, RS_DISTORTION_INVERSE_BROWN_CONRADY, RS_DISTORTION_FTHETA,
  RS_DISTORTION_COUNT
}
 Distortion model: defines how pixel coordinates should be mapped to sensor coordinates. More...
 
enum  rs_event_source {
  RS_EVENT_IMU_ACCEL, RS_EVENT_IMU_GYRO, RS_EVENT_IMU_DEPTH_CAM, RS_EVENT_IMU_MOTION_CAM,
  RS_EVENT_G0_SYNC, RS_EVENT_G1_SYNC, RS_EVENT_G2_SYNC, RS_EVENT_SOURCE_COUNT
}
 Source device that triggered a specific timestamp event from the motion module. More...
 
enum  rs_format {
  RS_FORMAT_ANY, RS_FORMAT_Z16, RS_FORMAT_DISPARITY16, RS_FORMAT_XYZ32F,
  RS_FORMAT_YUYV, RS_FORMAT_RGB8, RS_FORMAT_BGR8, RS_FORMAT_RGBA8,
  RS_FORMAT_BGRA8, RS_FORMAT_Y8, RS_FORMAT_Y16, RS_FORMAT_RAW10,
  RS_FORMAT_RAW16, RS_FORMAT_RAW8, RS_FORMAT_COUNT
}
 Formats: defines how each stream can be encoded. More...
 
enum  rs_frame_metadata { RS_FRAME_METADATA_ACTUAL_EXPOSURE, RS_FRAME_METADATA_ACTUAL_FPS, RS_FRAME_METADATA_COUNT }
 Types of value provided from the device with each frame. More...
 
enum  rs_ivcam_preset {
  RS_IVCAM_PRESET_SHORT_RANGE, RS_IVCAM_PRESET_LONG_RANGE, RS_IVCAM_PRESET_BACKGROUND_SEGMENTATION, RS_IVCAM_PRESET_GESTURE_RECOGNITION,
  RS_IVCAM_PRESET_OBJECT_SCANNING, RS_IVCAM_PRESET_FACE_ANALYTICS, RS_IVCAM_PRESET_FACE_LOGIN, RS_IVCAM_PRESET_GR_CURSOR,
  RS_IVCAM_PRESET_DEFAULT, RS_IVCAM_PRESET_MID_RANGE, RS_IVCAM_PRESET_IR_ONLY, RS_IVCAM_PRESET_COUNT
}
 For SR300 devices: provides optimized settings (presets) for specific types of usage. More...
 
enum  rs_log_severity {
  RS_LOG_SEVERITY_DEBUG, RS_LOG_SEVERITY_INFO, RS_LOG_SEVERITY_WARN, RS_LOG_SEVERITY_ERROR,
  RS_LOG_SEVERITY_FATAL, RS_LOG_SEVERITY_NONE, RS_LOG_SEVERITY_COUNT
}
 Severity of the librealsense logger. More...
 
enum  rs_option {
  RS_OPTION_COLOR_BACKLIGHT_COMPENSATION, RS_OPTION_COLOR_BRIGHTNESS, RS_OPTION_COLOR_CONTRAST, RS_OPTION_COLOR_EXPOSURE,
  RS_OPTION_COLOR_GAIN, RS_OPTION_COLOR_GAMMA, RS_OPTION_COLOR_HUE, RS_OPTION_COLOR_SATURATION,
  RS_OPTION_COLOR_SHARPNESS, RS_OPTION_COLOR_WHITE_BALANCE, RS_OPTION_COLOR_ENABLE_AUTO_EXPOSURE, RS_OPTION_COLOR_ENABLE_AUTO_WHITE_BALANCE,
  RS_OPTION_F200_LASER_POWER, RS_OPTION_F200_ACCURACY, RS_OPTION_F200_MOTION_RANGE, RS_OPTION_F200_FILTER_OPTION,
  RS_OPTION_F200_CONFIDENCE_THRESHOLD, RS_OPTION_F200_DYNAMIC_FPS, RS_OPTION_SR300_AUTO_RANGE_ENABLE_MOTION_VERSUS_RANGE, RS_OPTION_SR300_AUTO_RANGE_ENABLE_LASER,
  RS_OPTION_SR300_AUTO_RANGE_MIN_MOTION_VERSUS_RANGE, RS_OPTION_SR300_AUTO_RANGE_MAX_MOTION_VERSUS_RANGE, RS_OPTION_SR300_AUTO_RANGE_START_MOTION_VERSUS_RANGE, RS_OPTION_SR300_AUTO_RANGE_MIN_LASER,
  RS_OPTION_SR300_AUTO_RANGE_MAX_LASER, RS_OPTION_SR300_AUTO_RANGE_START_LASER, RS_OPTION_SR300_AUTO_RANGE_UPPER_THRESHOLD, RS_OPTION_SR300_AUTO_RANGE_LOWER_THRESHOLD,
  RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED, RS_OPTION_R200_LR_GAIN, RS_OPTION_R200_LR_EXPOSURE, RS_OPTION_R200_EMITTER_ENABLED,
  RS_OPTION_R200_DEPTH_UNITS, RS_OPTION_R200_DEPTH_CLAMP_MIN, RS_OPTION_R200_DEPTH_CLAMP_MAX, RS_OPTION_R200_DISPARITY_MULTIPLIER,
  RS_OPTION_R200_DISPARITY_SHIFT, RS_OPTION_R200_AUTO_EXPOSURE_MEAN_INTENSITY_SET_POINT, RS_OPTION_R200_AUTO_EXPOSURE_BRIGHT_RATIO_SET_POINT, RS_OPTION_R200_AUTO_EXPOSURE_KP_GAIN,
  RS_OPTION_R200_AUTO_EXPOSURE_KP_EXPOSURE, RS_OPTION_R200_AUTO_EXPOSURE_KP_DARK_THRESHOLD, RS_OPTION_R200_AUTO_EXPOSURE_TOP_EDGE, RS_OPTION_R200_AUTO_EXPOSURE_BOTTOM_EDGE,
  RS_OPTION_R200_AUTO_EXPOSURE_LEFT_EDGE, RS_OPTION_R200_AUTO_EXPOSURE_RIGHT_EDGE, RS_OPTION_R200_DEPTH_CONTROL_ESTIMATE_MEDIAN_DECREMENT, RS_OPTION_R200_DEPTH_CONTROL_ESTIMATE_MEDIAN_INCREMENT,
  RS_OPTION_R200_DEPTH_CONTROL_MEDIAN_THRESHOLD, RS_OPTION_R200_DEPTH_CONTROL_SCORE_MINIMUM_THRESHOLD, RS_OPTION_R200_DEPTH_CONTROL_SCORE_MAXIMUM_THRESHOLD, RS_OPTION_R200_DEPTH_CONTROL_TEXTURE_COUNT_THRESHOLD,
  RS_OPTION_R200_DEPTH_CONTROL_TEXTURE_DIFFERENCE_THRESHOLD, RS_OPTION_R200_DEPTH_CONTROL_SECOND_PEAK_THRESHOLD, RS_OPTION_R200_DEPTH_CONTROL_NEIGHBOR_THRESHOLD, RS_OPTION_R200_DEPTH_CONTROL_LR_THRESHOLD,
  RS_OPTION_FISHEYE_EXPOSURE, RS_OPTION_FISHEYE_GAIN, RS_OPTION_FISHEYE_STROBE, RS_OPTION_FISHEYE_EXTERNAL_TRIGGER,
  RS_OPTION_FISHEYE_ENABLE_AUTO_EXPOSURE, RS_OPTION_FISHEYE_AUTO_EXPOSURE_MODE, RS_OPTION_FISHEYE_AUTO_EXPOSURE_ANTIFLICKER_RATE, RS_OPTION_FISHEYE_AUTO_EXPOSURE_PIXEL_SAMPLE_RATE,
  RS_OPTION_FISHEYE_AUTO_EXPOSURE_SKIP_FRAMES, RS_OPTION_FRAMES_QUEUE_SIZE, RS_OPTION_HARDWARE_LOGGER_ENABLED, RS_OPTION_TOTAL_FRAME_DROPS,
  RS_OPTION_COUNT
}
 Defines general configuration controls. More...
 
enum  rs_output_buffer_format { RS_OUTPUT_BUFFER_FORMAT_CONTINUOUS, RS_OUTPUT_BUFFER_FORMAT_NATIVE, RS_OUTPUT_BUFFER_FORMAT_COUNT }
 Output buffer format: sets how librealsense works with frame memory. More...
 
enum  rs_preset { RS_PRESET_BEST_QUALITY, RS_PRESET_LARGEST_IMAGE, RS_PRESET_HIGHEST_FRAMERATE, RS_PRESET_COUNT }
 Presets: general preferences that are translated by librealsense into concrete resolution and FPS. More...
 
enum  rs_source { RS_SOURCE_VIDEO, RS_SOURCE_MOTION_TRACKING, RS_SOURCE_ALL, RS_SOURCE_COUNT }
 Source: allows you to choose between available hardware subdevices. More...
 
enum  rs_stream {
  RS_STREAM_DEPTH, RS_STREAM_COLOR, RS_STREAM_INFRARED, RS_STREAM_INFRARED2,
  RS_STREAM_FISHEYE, RS_STREAM_POINTS, RS_STREAM_RECTIFIED_COLOR, RS_STREAM_COLOR_ALIGNED_TO_DEPTH,
  RS_STREAM_INFRARED2_ALIGNED_TO_DEPTH, RS_STREAM_DEPTH_ALIGNED_TO_COLOR, RS_STREAM_DEPTH_ALIGNED_TO_RECTIFIED_COLOR, RS_STREAM_DEPTH_ALIGNED_TO_INFRARED2,
  RS_STREAM_COUNT
}
 Streams are different types of data provided by RealSense devices. More...
 
enum  rs_timestamp_domain { RS_TIMESTAMP_DOMAIN_CAMERA, RS_TIMESTAMP_DOMAIN_MICROCONTROLLER, RS_TIMESTAMP_DOMAIN_COUNT }
 Specifies the clock in relation to which the frame timestamp was measured. More...
 

Functions

const char * rs_blob_type_to_string (rs_blob_type type)
 
const char * rs_camera_info_to_string (rs_camera_info info)
 
const char * rs_capabilities_to_string (rs_capabilities capability)
 
rs_contextrs_create_context (int api_version, rs_error **error)
 Creates RealSense context that is required for the rest of the API. More...
 
void rs_delete_context (rs_context *context, rs_error **error)
 Frees the relevant context object. More...
 
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. More...
 
void rs_disable_motion_tracking (rs_device *device, rs_error **error)
 Disables motion-tracking handlers. More...
 
void rs_disable_stream (rs_device *device, rs_stream stream, rs_error **error)
 Disables a specific stream. More...
 
const char * rs_distortion_to_string (rs_distortion distortion)
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
const char * rs_event_to_string (rs_event_source event)
 
const char * rs_format_to_string (rs_format format)
 
const char * rs_frame_metadata_to_string (rs_frame_metadata md)
 
void rs_free_error (rs_error *error)
 Frees memory of an error object. More...
 
int rs_get_api_version (rs_error **error)
 Retrieves API version from the source code. Evaluate that the value is conformant to the established policies. More...
 
int rs_get_detached_frame_bpp (const rs_frame_ref *frame, rs_error **error)
 Retrieves frame bits per pixel. More...
 
const voidrs_get_detached_frame_data (const rs_frame_ref *frame, rs_error **error)
 Retrieves data from frame reference. More...
 
rs_format rs_get_detached_frame_format (const rs_frame_ref *frame, rs_error **error)
 Retrieves frame format. More...
 
int rs_get_detached_frame_height (const rs_frame_ref *frame, rs_error **error)
 Retrieves frame intrinsic height. More...
 
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. More...
 
unsigned long long rs_get_detached_frame_number (const rs_frame_ref *frame, rs_error **error)
 Retrieves frame number from frame reference. More...
 
rs_stream rs_get_detached_frame_stream_type (const rs_frame_ref *frame, rs_error **error)
 Retrieves frame stream type. More...
 
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) More...
 
double rs_get_detached_frame_timestamp (const rs_frame_ref *frame, rs_error **error)
 Retrieves timestamp from frame reference. More...
 
rs_timestamp_domain rs_get_detached_frame_timestamp_domain (const rs_frame_ref *frame, rs_error **error)
 Retrieves timestamp domain from frame reference. More...
 
int rs_get_detached_frame_width (const rs_frame_ref *frame, rs_error **error)
 Retrieves frame intrinsic width in pixels. More...
 
int rs_get_detached_framerate (const rs_frame_ref *frame, rs_error **error)
 Retrieves frame intrinsic frame rate. More...
 
rs_devicers_get_device (rs_context *context, int index, rs_error **error)
 Retrieves connected device by index. More...
 
int rs_get_device_count (const rs_context *context, rs_error **error)
 Determines number of connected devices. More...
 
float rs_get_device_depth_scale (const rs_device *device, rs_error **error)
 Retrieves mapping between the units of the depth image and meters. More...
 
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. More...
 
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. More...
 
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. More...
 
const char * rs_get_device_name (const rs_device *device, rs_error **error)
 Retrieves human-readable device model string. More...
 
double rs_get_device_option (rs_device *device, rs_option option, rs_error **error)
 Retrieves the current value of a single option. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
const char * rs_get_device_serial (const rs_device *device, rs_error **error)
 Retrieves unique serial number of the device. More...
 
const char * rs_get_device_usb_port_id (const rs_device *device, rs_error **error)
 Retrieves the USB port number of the device. More...
 
const char * rs_get_error_message (const rs_error *error)
 Returns static pointer to error message. More...
 
const char * rs_get_failed_args (const rs_error *error)
 Returns static pointer to arguments of a failing function in case of error. More...
 
const char * rs_get_failed_function (const rs_error *error)
 Returns static pointer to name of a failing function in case of error. More...
 
const voidrs_get_frame_data (const rs_device *device, rs_stream stream, rs_error **error)
 Retrieves the contents of the latest frame on a stream. More...
 
unsigned long long rs_get_frame_number (const rs_device *device, rs_stream stream, rs_error **error)
 Retrieves frame number. More...
 
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. More...
 
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. More...
 
void rs_get_motion_intrinsics (const rs_device *device, rs_motion_intrinsics *intrinsic, rs_error **error)
 Retrieves intrinsic camera parameters for a motion module. More...
 
rs_format rs_get_stream_format (const rs_device *device, rs_stream stream, rs_error **error)
 Retrieves the pixel format for a specific stream. More...
 
int rs_get_stream_framerate (const rs_device *device, rs_stream stream, rs_error **error)
 Retrieves the frame rate for a specific stream. More...
 
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 intrinsic. More...
 
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. More...
 
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. More...
 
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. More...
 
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 intrinsic. More...
 
int rs_is_device_streaming (const rs_device *device, rs_error **error)
 Determines if the device is currently streaming. More...
 
int rs_is_motion_tracking_active (rs_device *device, rs_error **error)
 Checks if data acquisition is active. More...
 
int rs_is_stream_enabled (const rs_device *device, rs_stream stream, rs_error **error)
 Determines if a specific stream is enabled. More...
 
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) More...
 
void rs_log_to_callback_cpp (rs_log_severity min_severity, rs_log_callback *callback, rs_error **error)
 Starts logging to user-provided callback. More...
 
void rs_log_to_console (rs_log_severity min_severity, rs_error **error)
 Starts logging to console. More...
 
void rs_log_to_file (rs_log_severity min_severity, const char *file_path, rs_error **error)
 Starts logging to file. More...
 
const char * rs_option_to_string (rs_option option)
 
int rs_poll_for_frames (rs_device *device, rs_error **error)
 Checks if new frames are available, without blocking. More...
 
const char * rs_preset_to_string (rs_preset preset)
 
void rs_release_frame (rs_device *device, rs_frame_ref *frame, rs_error **error)
 Releases frame handle. More...
 
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. More...
 
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. More...
 
void rs_set_device_option (rs_device *device, rs_option option, double value, rs_error **error)
 Sets the current value of a single option. More...
 
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. More...
 
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 synchronization logic applied. More...
 
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 synchronization logic applied. More...
 
const char * rs_source_to_string (rs_source source)
 
void rs_start_device (rs_device *device, rs_error **error)
 Begins streaming on all enabled streams for this device. More...
 
void rs_start_source (rs_device *device, rs_source source, rs_error **error)
 Begins streaming on all enabled streams for this device. More...
 
void rs_stop_device (rs_device *device, rs_error **error)
 Ends data acquisition for the specified source providers. More...
 
void rs_stop_source (rs_device *device, rs_source source, rs_error **error)
 Ends data acquisition for the specified source providers. More...
 
const char * rs_stream_to_string (rs_stream stream)
 
int rs_supports (rs_device *device, rs_capabilities capability, rs_error **error)
 Determines device capabilities. More...
 
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. More...
 
int rs_supports_frame_metadata (const rs_frame_ref *frame, rs_frame_metadata frame_metadata, rs_error **error)
 Determines device metadata. More...
 
const char * rs_timestamp_domain_to_string (rs_timestamp_domain info)
 
void rs_wait_for_frames (rs_device *device, rs_error **error)
 Blocks until new frames are available. More...
 

Detailed Description

Exposes librealsense functionality for C compilers.

Definition in file rs.h.

Macro Definition Documentation

#define RS_API_MAJOR_VERSION   1

Definition at line 17 of file rs.h.

#define RS_API_MINOR_VERSION   12

Definition at line 18 of file rs.h.

#define RS_API_PATCH_VERSION   4

Definition at line 19 of file rs.h.

#define RS_API_VERSION   (((RS_API_MAJOR_VERSION) * 10000) + ((RS_API_MINOR_VERSION) * 100) + (RS_API_PATCH_VERSION))

Definition at line 28 of file rs.h.

Definition at line 30 of file rs.h.

#define STRINGIFY (   arg)    #arg

Definition at line 21 of file rs.h.

#define VAR_ARG_STRING (   arg)    STRINGIFY(arg)

Definition at line 22 of file rs.h.

Typedef Documentation

typedef enum rs_blob_type rs_blob_type

Proprietary formats for direct communication with device firmware.

Read-only strings that can be queried from the device.

Not all information fields are available on all camera types. This information is mainly available for camera debug and troubleshooting and should not be used in applications.

Specifies various capabilities of a RealSense device.

To check if a certain capability is supported by a particular device, at runtime call dev->supports(capability).

typedef struct rs_context rs_context

Definition at line 355 of file rs.h.

typedef struct rs_device rs_device

Definition at line 356 of file rs.h.

Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.

typedef struct rs_error rs_error

Definition at line 357 of file rs.h.

Source device that triggered a specific timestamp event from the motion module.

typedef struct rs_extrinsics rs_extrinsics

Cross-stream extrinsics: encode the topology describing how the different devices are connected.

typedef enum rs_format rs_format

Formats: defines how each stream can be encoded.

rs_format specifies how a frame is represented in memory (similar to the V4L pixel format).

Definition at line 361 of file rs.h.

typedef void(* rs_frame_callback_ptr) (rs_device *dev, rs_frame_ref *frame, void *user)

Definition at line 365 of file rs.h.

Types of value provided from the device with each frame.

typedef struct rs_frame_ref rs_frame_ref

Definition at line 359 of file rs.h.

typedef struct rs_frameset rs_frameset

Definition at line 358 of file rs.h.

typedef struct rs_intrinsics rs_intrinsics

Video stream intrinsics.

For SR300 devices: provides optimized settings (presets) for specific types of usage.

Definition at line 363 of file rs.h.

typedef void(* rs_log_callback_ptr) (rs_log_severity min_severity, const char *message, void *user)

Definition at line 368 of file rs.h.

Severity of the librealsense logger.

Definition at line 360 of file rs.h.

typedef void(* rs_motion_callback_ptr) (rs_device *, rs_motion_data, void *)

Definition at line 366 of file rs.h.

Motion data from gyroscope and accelerometer from the microcontroller.

Motion device intrinsics: scale, bias, and variances.

Motion module intrinsics: includes accelerometer and gyroscope intrinsics structs of type rs_motion_device_intrinsic.

typedef enum rs_option rs_option

Defines general configuration controls.

These can generally be mapped to camera UVC controls, and unless stated otherwise, can be set/queried at any time.

Output buffer format: sets how librealsense works with frame memory.

typedef enum rs_preset rs_preset

Presets: general preferences that are translated by librealsense into concrete resolution and FPS.

typedef enum rs_source rs_source

Source: allows you to choose between available hardware subdevices.

typedef enum rs_stream rs_stream

Streams are different types of data provided by RealSense devices.

Definition at line 362 of file rs.h.

typedef void(* rs_timestamp_callback_ptr) (rs_device *, rs_timestamp_data, void *)

Definition at line 367 of file rs.h.

Timestamp data from the motion microcontroller.

Specifies the clock in relation to which the frame timestamp was measured.

When working with a motion microcontroller, motion data timestamps are always in the microcontroller timestamp domain. Some frames, however, might not succesfully receive microcontroller timestamp and will be marked as camera domain.

Enumeration Type Documentation

Proprietary formats for direct communication with device firmware.

Enumerator
RS_BLOB_TYPE_MOTION_MODULE_FIRMWARE_UPDATE 

By using this option, new firmware can be uploaded to the ZR300 motion-module

RS_BLOB_TYPE_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 228 of file rs.h.

Read-only strings that can be queried from the device.

Not all information fields are available on all camera types. This information is mainly available for camera debug and troubleshooting and should not be used in applications.

Enumerator
RS_CAMERA_INFO_DEVICE_NAME 

Device friendly name

RS_CAMERA_INFO_DEVICE_SERIAL_NUMBER 

Device serial number

RS_CAMERA_INFO_CAMERA_FIRMWARE_VERSION 

Primary firmware version

RS_CAMERA_INFO_ADAPTER_BOARD_FIRMWARE_VERSION 

MIPI-to-USB adapter board firmware version if such board is present

RS_CAMERA_INFO_MOTION_MODULE_FIRMWARE_VERSION 

Motion module firmware version if motion module is present

RS_CAMERA_INFO_CAMERA_TYPE 

R200/LR200/ZR300 camera type

RS_CAMERA_INFO_OEM_ID 

OEM ID

RS_CAMERA_INFO_ISP_FW_VERSION 

ISP firmware version, when available

RS_CAMERA_INFO_CONTENT_VERSION 

R200/LR200/ZR300 content version

RS_CAMERA_INFO_MODULE_VERSION 

R200/LR200/ZR300 module version

RS_CAMERA_INFO_IMAGER_MODEL_NUMBER 

Primary imager model number

RS_CAMERA_INFO_BUILD_DATE 

Device build date

RS_CAMERA_INFO_CALIBRATION_DATE 

Primary calibration date

RS_CAMERA_INFO_PROGRAM_DATE 

R200/LR200/ZR300 program date

RS_CAMERA_INFO_FOCUS_ALIGNMENT_DATE 

Focus calibration date

RS_CAMERA_INFO_EMITTER_TYPE 

R200/LR200/ZR300 emitter type

RS_CAMERA_INFO_FOCUS_VALUE 

Result of the focus calibration

RS_CAMERA_INFO_LENS_TYPE 

Primary lens type

RS_CAMERA_INFO_3RD_LENS_TYPE 

Color imager lens type

RS_CAMERA_INFO_LENS_COATING__TYPE 

Lens coating type

RS_CAMERA_INFO_3RD_LENS_COATING_TYPE 

Color coating type

RS_CAMERA_INFO_NOMINAL_BASELINE 

Nominal baseline

RS_CAMERA_INFO_3RD_NOMINAL_BASELINE 

Color nominal baseline

RS_CAMERA_INFO_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 237 of file rs.h.

Specifies various capabilities of a RealSense device.

To check if a certain capability is supported by a particular device, at runtime call dev->supports(capability).

Enumerator
RS_CAPABILITIES_DEPTH 

Provides depth stream

RS_CAPABILITIES_COLOR 

Provides color stream

RS_CAPABILITIES_INFRARED 

Provides infrared stream

RS_CAPABILITIES_INFRARED2 

Provides second infrared stream

RS_CAPABILITIES_FISH_EYE 

Provides wide field of view (fish-eye) stream

RS_CAPABILITIES_MOTION_EVENTS 

Provides gyroscope and accelorometer events

RS_CAPABILITIES_MOTION_MODULE_FW_UPDATE 

Provides method for upgrading motion module firmware

RS_CAPABILITIES_ADAPTER_BOARD 

Internally MIPI-to-USB adapter

RS_CAPABILITIES_ENUMERATION 

Provides enough basic functionality to be considered supported. This is to catch at runtime various outdated engineering samples.

RS_CAPABILITIES_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 213 of file rs.h.

Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.

Enumerator
RS_DISTORTION_NONE 

Rectilinear images. No distortion compensation required.

RS_DISTORTION_MODIFIED_BROWN_CONRADY 

Equivalent to Brown-Conrady distortion, except that tangential distortion is applied to radially distorted points

RS_DISTORTION_INVERSE_BROWN_CONRADY 

Equivalent to Brown-Conrady distortion, except undistorts image instead of distorting it

RS_DISTORTION_FTHETA 

Distortion model of the fish-eye camera

RS_DISTORTION_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 99 of file rs.h.

Source device that triggered a specific timestamp event from the motion module.

Enumerator
RS_EVENT_IMU_ACCEL 

Event from accelerometer

RS_EVENT_IMU_GYRO 

Event from the gyroscope

RS_EVENT_IMU_DEPTH_CAM 

Event from depth camera (depth/IR frame)

RS_EVENT_IMU_MOTION_CAM 

Event from the fish-eye camera

RS_EVENT_G0_SYNC 

Event from external GPIO 0

RS_EVENT_G1_SYNC 

Event from external GPIO 1

RS_EVENT_G2_SYNC 

Event from external GPIO 2

RS_EVENT_SOURCE_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 276 of file rs.h.

enum rs_format

Formats: defines how each stream can be encoded.

rs_format specifies how a frame is represented in memory (similar to the V4L pixel format).

Enumerator
RS_FORMAT_ANY 

When passed to enable stream, librealsense will try to provide best suited format

RS_FORMAT_Z16 

16-bit linear depth values. The depth is meters is equal to depth scale * pixel value.

RS_FORMAT_DISPARITY16 

16-bit linear disparity values. The depth in meters is equal to depth scale / pixel value.

RS_FORMAT_XYZ32F 

32-bit floating point 3D coordinates.

RS_FORMAT_YUYV 

Standard YUV pixel format as described in https://en.wikipedia.org/wiki/YUV

RS_FORMAT_RGB8 

8-bit red, green and blue channels

RS_FORMAT_BGR8 

8-bit blue, green, and red channels – suitable for OpenCV

RS_FORMAT_RGBA8 

8-bit red, green and blue channels + constant alpha channel equal to FF

RS_FORMAT_BGRA8 

8-bit blue, green, and red channels + constant alpha channel equal to FF

RS_FORMAT_Y8 

8-bit per-pixel grayscale image

RS_FORMAT_Y16 

16-bit per-pixel grayscale image

RS_FORMAT_RAW10 

Four 10-bit luminance values encoded into a 5-byte macropixel

RS_FORMAT_RAW16 

16-bit raw image

RS_FORMAT_RAW8 

8-bit raw image

RS_FORMAT_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 53 of file rs.h.

Types of value provided from the device with each frame.

Enumerator
RS_FRAME_METADATA_ACTUAL_EXPOSURE 

Actual exposure at which the frame was captured

RS_FRAME_METADATA_ACTUAL_FPS 

Actual FPS at the time of capture

RS_FRAME_METADATA_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 203 of file rs.h.

For SR300 devices: provides optimized settings (presets) for specific types of usage.

Enumerator
RS_IVCAM_PRESET_SHORT_RANGE 

Preset for short range

RS_IVCAM_PRESET_LONG_RANGE 

Preset for long range

RS_IVCAM_PRESET_BACKGROUND_SEGMENTATION 

Preset for background segmentation

RS_IVCAM_PRESET_GESTURE_RECOGNITION 

Preset for gesture recognition

RS_IVCAM_PRESET_OBJECT_SCANNING 

Preset for object scanning

RS_IVCAM_PRESET_FACE_ANALYTICS 

Preset for face analytics

RS_IVCAM_PRESET_FACE_LOGIN 

Preset for face login

RS_IVCAM_PRESET_GR_CURSOR 

Preset for GR cursor

RS_IVCAM_PRESET_DEFAULT 

Preset for default

RS_IVCAM_PRESET_MID_RANGE 

Preset for mid-range

RS_IVCAM_PRESET_IR_ONLY 

Preset for IR only

RS_IVCAM_PRESET_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 109 of file rs.h.

Severity of the librealsense logger.

Enumerator
RS_LOG_SEVERITY_DEBUG 

Detailed information about ordinary operations

RS_LOG_SEVERITY_INFO 

Terse information about ordinary operations

RS_LOG_SEVERITY_WARN 

Indication of possible failure

RS_LOG_SEVERITY_ERROR 

Indication of definite failure

RS_LOG_SEVERITY_FATAL 

Indication of unrecoverable failure

RS_LOG_SEVERITY_NONE 

No logging will occur

RS_LOG_SEVERITY_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 265 of file rs.h.

enum rs_option

Defines general configuration controls.

These can generally be mapped to camera UVC controls, and unless stated otherwise, can be set/queried at any time.

Enumerator
RS_OPTION_COLOR_BACKLIGHT_COMPENSATION 

Enable/disable color backlight compensation

RS_OPTION_COLOR_BRIGHTNESS 

Color image brightness

RS_OPTION_COLOR_CONTRAST 

Color image contrast

RS_OPTION_COLOR_EXPOSURE 

Controls exposure time of color camera. Setting any value will disable auto exposure.

RS_OPTION_COLOR_GAIN 

Color image gain

RS_OPTION_COLOR_GAMMA 

Color image gamma setting

RS_OPTION_COLOR_HUE 

Color image hue

RS_OPTION_COLOR_SATURATION 

Color image saturation setting

RS_OPTION_COLOR_SHARPNESS 

Color image sharpness setting

RS_OPTION_COLOR_WHITE_BALANCE 

Controls white balance of color image. Setting any value will disable auto white balance.

RS_OPTION_COLOR_ENABLE_AUTO_EXPOSURE 

Enable/disable color image auto-exposure

RS_OPTION_COLOR_ENABLE_AUTO_WHITE_BALANCE 

Enable/disable color image auto-white-balance

RS_OPTION_F200_LASER_POWER 

Power of the F200/SR300 projector, with 0 meaning projector off

RS_OPTION_F200_ACCURACY 

Set the number of patterns projected per frame. The higher the accuracy value, the more patterns projected. Increasing the number of patterns helps to achieve better accuracy. Note that this control affects the depth FPS.

RS_OPTION_F200_MOTION_RANGE 

Motion vs. range trade-off, with lower values allowing for better motion sensitivity and higher values allowing for better depth range

RS_OPTION_F200_FILTER_OPTION 

Set the filter to apply to each depth frame. Each one of the filters is optimized per the application requirements.

RS_OPTION_F200_CONFIDENCE_THRESHOLD 

Confidence level threshold used by the depth algorithm pipe to set whether a pixel will get a valid range or will be marked with invalid range

RS_OPTION_F200_DYNAMIC_FPS 

(F200-only) Allows to reduce FPS without restarting streaming. Valid values are {2, 5, 15, 30, 60}.

RS_OPTION_SR300_AUTO_RANGE_ENABLE_MOTION_VERSUS_RANGE 

Configures SR300 depth auto-range setting. Should not be used directly but through the rs_apply_ivcam_preset method in rsutil.h.

RS_OPTION_SR300_AUTO_RANGE_ENABLE_LASER 

Configures SR300 depth auto-range setting. Should not be used directly but through the rs_apply_ivcam_preset method in rsutil.h.

RS_OPTION_SR300_AUTO_RANGE_MIN_MOTION_VERSUS_RANGE 

Configures SR300 depth auto-range setting. Should not be used directly but through the rs_apply_ivcam_preset method in rsutil.h.

RS_OPTION_SR300_AUTO_RANGE_MAX_MOTION_VERSUS_RANGE 

Configures SR300 depth auto-range setting. Should not be used directly but through the rs_apply_ivcam_preset method in rsutil.h.

RS_OPTION_SR300_AUTO_RANGE_START_MOTION_VERSUS_RANGE 

Configures SR300 depth auto-range setting. Should not be used directly but through the rs_apply_ivcam_preset method in rsutil.h.

RS_OPTION_SR300_AUTO_RANGE_MIN_LASER 

Configures SR300 depth auto-range setting. Should not be used directly but through the rs_apply_ivcam_preset method in rsutil.h.

RS_OPTION_SR300_AUTO_RANGE_MAX_LASER 

Configures SR300 depth auto-range setting. Should not be used directly but through the rs_apply_ivcam_preset method in rsutil.h.

RS_OPTION_SR300_AUTO_RANGE_START_LASER 

Configures SR300 depth auto-range setting. Should not be used directly but through the rs_apply_ivcam_preset method in rsutil.h.

RS_OPTION_SR300_AUTO_RANGE_UPPER_THRESHOLD 

Configures SR300 depth auto-range setting. Should not be used directly but through the rs_apply_ivcam_preset method in rsutil.h.

RS_OPTION_SR300_AUTO_RANGE_LOWER_THRESHOLD 

Configures SR300 depth auto-range setting. Should not be used directly but through the rs_apply_ivcam_preset method in rsutil.h.

RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED 

Enable/disable R200 auto-exposure. This will affect both the IR and depth images.

RS_OPTION_R200_LR_GAIN 

IR image gain

RS_OPTION_R200_LR_EXPOSURE 

This control allows manual adjustment of the exposure time value for the L/R imagers.

RS_OPTION_R200_EMITTER_ENABLED 

Enables/disables R200 emitter

RS_OPTION_R200_DEPTH_UNITS 

Micrometers per increment in integer depth values. 1000 is default (mm scale). Set before streaming.

RS_OPTION_R200_DEPTH_CLAMP_MIN 

Minimum depth in current depth units that will be output. Any values less than ג€˜Min Depthג€™ will be mapped to 0 during the conversion between disparity and depth. Set before streaming.

RS_OPTION_R200_DEPTH_CLAMP_MAX 

Maximum depth in current depth units that will be output. Any values greater than ג€˜Max Depthג€™ will be mapped to 0 during the conversion between disparity and depth. Set before streaming.

RS_OPTION_R200_DISPARITY_MULTIPLIER 

Disparity scale factor used when in disparity output mode. Can only be set before streaming.

RS_OPTION_R200_DISPARITY_SHIFT 

{0 - 512}. Can only be set before streaming starts.

RS_OPTION_R200_AUTO_EXPOSURE_MEAN_INTENSITY_SET_POINT 

Mean intensity set point. Requires the RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED option to be set to 1.

RS_OPTION_R200_AUTO_EXPOSURE_BRIGHT_RATIO_SET_POINT 

Bright ratio set point. Requires the RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED option to be set to 1.

RS_OPTION_R200_AUTO_EXPOSURE_KP_GAIN 

Kp gain. Requires the RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED option to be set to 1.

RS_OPTION_R200_AUTO_EXPOSURE_KP_EXPOSURE 

Kp exposure. Requires the RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED option to be set to 1.

RS_OPTION_R200_AUTO_EXPOSURE_KP_DARK_THRESHOLD 

Kp dark threshold. Requires the RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED option to be set to 1.

RS_OPTION_R200_AUTO_EXPOSURE_TOP_EDGE 

Auto-exposure region-of-interest top edge (in pixels). Requires the RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED option to be set to 1.

RS_OPTION_R200_AUTO_EXPOSURE_BOTTOM_EDGE 

Auto-exposure region-of-interest bottom edge (in pixels). Requires the RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED option to be set to 1.

RS_OPTION_R200_AUTO_EXPOSURE_LEFT_EDGE 

Auto-exposure region-of-interest left edge (in pixels). Requires the RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED option to be set to 1.

RS_OPTION_R200_AUTO_EXPOSURE_RIGHT_EDGE 

Auto-exposure region-of-interest right edge (in pixels). Requires the RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED option to be set to 1.

RS_OPTION_R200_DEPTH_CONTROL_ESTIMATE_MEDIAN_DECREMENT 

Value to subtract when estimating the median of the correlation surface

RS_OPTION_R200_DEPTH_CONTROL_ESTIMATE_MEDIAN_INCREMENT 

Value to add when estimating the median of the correlation surface

RS_OPTION_R200_DEPTH_CONTROL_MEDIAN_THRESHOLD 

Threshold: by how much the winning score exceeds the median.

RS_OPTION_R200_DEPTH_CONTROL_SCORE_MINIMUM_THRESHOLD 

Minimum correlation score that is considered acceptable

RS_OPTION_R200_DEPTH_CONTROL_SCORE_MAXIMUM_THRESHOLD 

Maximum correlation score that is considered acceptable

RS_OPTION_R200_DEPTH_CONTROL_TEXTURE_COUNT_THRESHOLD 

Parameter for determining whether the texture in the region is sufficient to justify a depth result

RS_OPTION_R200_DEPTH_CONTROL_TEXTURE_DIFFERENCE_THRESHOLD 

Parameter for determining whether the texture in the region is sufficient to justify a depth result

RS_OPTION_R200_DEPTH_CONTROL_SECOND_PEAK_THRESHOLD 

Threshold: how much the minimum correlation score must differ from the next best score.

RS_OPTION_R200_DEPTH_CONTROL_NEIGHBOR_THRESHOLD 

Neighbor threshold value for depth calculation

RS_OPTION_R200_DEPTH_CONTROL_LR_THRESHOLD 

Left-right threshold value for depth calculation

RS_OPTION_FISHEYE_EXPOSURE 

Fisheye image exposure time in msec

RS_OPTION_FISHEYE_GAIN 

Fisheye image gain

RS_OPTION_FISHEYE_STROBE 

Enable/disable fisheye strobe. When enabled, aligns timestamps to common clock-domain with the motion events.

RS_OPTION_FISHEYE_EXTERNAL_TRIGGER 

Enable/disable fisheye external trigger mode. When enabled, fisheye image will be aquired in-sync with the depth image.

RS_OPTION_FISHEYE_ENABLE_AUTO_EXPOSURE 

Enable/disable fisheye auto-exposure

RS_OPTION_FISHEYE_AUTO_EXPOSURE_MODE 

0 - static auto-exposure, 1 - anti-flicker auto-exposure, 2 - hybrid

RS_OPTION_FISHEYE_AUTO_EXPOSURE_ANTIFLICKER_RATE 

Fisheye auto-exposure anti-flicker rate. Can be 50 or 60 Hz.

RS_OPTION_FISHEYE_AUTO_EXPOSURE_PIXEL_SAMPLE_RATE 

In Fisheye auto-exposure sample frame every given number of pixels

RS_OPTION_FISHEYE_AUTO_EXPOSURE_SKIP_FRAMES 

In Fisheye auto-exposure sample every given number of frames

RS_OPTION_FRAMES_QUEUE_SIZE 

Number of frames the user is allowed to keep per stream. Trying to hold on to more frames will cause frame-drops.

RS_OPTION_HARDWARE_LOGGER_ENABLED 

Enable/disable fetching log data from the device

RS_OPTION_TOTAL_FRAME_DROPS 

Total number of detected frame drops from all streams

RS_OPTION_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 128 of file rs.h.

Output buffer format: sets how librealsense works with frame memory.

Enumerator
RS_OUTPUT_BUFFER_FORMAT_CONTINUOUS 

Makes sure that the output frame is exposed as a single continuous buffer

RS_OUTPUT_BUFFER_FORMAT_NATIVE 

Does not convert buffer to continuous. The user has to handle pitch manually.

RS_OUTPUT_BUFFER_FORMAT_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 73 of file rs.h.

enum rs_preset

Presets: general preferences that are translated by librealsense into concrete resolution and FPS.

Enumerator
RS_PRESET_BEST_QUALITY 

Prefer best overall quality

RS_PRESET_LARGEST_IMAGE 

Prefer largest image size

RS_PRESET_HIGHEST_FRAMERATE 

Prefer highest frame rate

RS_PRESET_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 81 of file rs.h.

enum rs_source

Source: allows you to choose between available hardware subdevices.

Enumerator
RS_SOURCE_VIDEO 

Video streaming of depth, infrared, color, or fish-eye

RS_SOURCE_MOTION_TRACKING 

Motion tracking from gyroscope and accelerometer

RS_SOURCE_ALL 

Enable everything together

RS_SOURCE_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 90 of file rs.h.

enum rs_stream

Streams are different types of data provided by RealSense devices.

Enumerator
RS_STREAM_DEPTH 

Native stream of depth data produced by RealSense device

RS_STREAM_COLOR 

Native stream of color data captured by RealSense device

RS_STREAM_INFRARED 

Native stream of infrared data captured by RealSense device

RS_STREAM_INFRARED2 

Native stream of infrared data captured from a second viewpoint by RealSense device

RS_STREAM_FISHEYE 

Native stream of fish-eye (wide) data captured from the dedicate motion camera

RS_STREAM_POINTS 

Synthetic stream containing point cloud data generated by deprojecting the depth image

RS_STREAM_RECTIFIED_COLOR 

Synthetic stream containing undistorted color data with no extrinsic rotation from the depth stream

RS_STREAM_COLOR_ALIGNED_TO_DEPTH 

Synthetic stream containing color data but sharing intrinsic of depth stream

RS_STREAM_INFRARED2_ALIGNED_TO_DEPTH 

Synthetic stream containing second viewpoint infrared data but sharing intrinsic of depth stream

RS_STREAM_DEPTH_ALIGNED_TO_COLOR 

Synthetic stream containing depth data but sharing intrinsic of color stream

RS_STREAM_DEPTH_ALIGNED_TO_RECTIFIED_COLOR 

Synthetic stream containing depth data but sharing intrinsic of rectified color stream

RS_STREAM_DEPTH_ALIGNED_TO_INFRARED2 

Synthetic stream containing depth data but sharing intrinsic of second viewpoint infrared stream

RS_STREAM_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 33 of file rs.h.

Specifies the clock in relation to which the frame timestamp was measured.

When working with a motion microcontroller, motion data timestamps are always in the microcontroller timestamp domain. Some frames, however, might not succesfully receive microcontroller timestamp and will be marked as camera domain.

Enumerator
RS_TIMESTAMP_DOMAIN_CAMERA 

Frame timestamp was measured in relation to the camera clock

RS_TIMESTAMP_DOMAIN_MICROCONTROLLER 

Frame timestamp was measured in relation to the microcontroller clock

RS_TIMESTAMP_DOMAIN_COUNT 

Number of enumeration values. Not a valid input: intended to be used in for-loops.

Definition at line 292 of file rs.h.

Function Documentation

const char* rs_blob_type_to_string ( rs_blob_type  type)

Definition at line 763 of file rs.cpp.

const char * rs_camera_info_to_string ( rs_camera_info  info)

Definition at line 764 of file rs.cpp.

const char* rs_capabilities_to_string ( rs_capabilities  capability)

Definition at line 759 of file rs.cpp.

rs_context* rs_create_context ( int  api_version,
rs_error **  error 
)

Creates RealSense context that is required for the rest of the API.

Parameters
[in]api_versionUsers are expected to pass their version of RS_API_VERSION to make sure they are running the correct librealsense version.
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Context object

Definition at line 75 of file rs.cpp.

void rs_delete_context ( rs_context context,
rs_error **  error 
)

Frees the relevant context object.

This action might invalidate rs_device pointers created from this context.

Parameters
[in]contextObject that is no longer needed
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 106 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if the option can be queried and set

Definition at line 182 of file rs.cpp.

void rs_disable_motion_tracking ( rs_device device,
rs_error **  error 
)

Disables motion-tracking handlers.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 366 of file rs.cpp.

void rs_disable_stream ( rs_device device,
rs_stream  stream,
rs_error **  error 
)

Disables a specific stream.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 241 of file rs.cpp.

const char* rs_distortion_to_string ( rs_distortion  distortion)

Definition at line 757 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]on_motion_eventUser-defined routine to be invoked when a motion data arrives
[in]motion_handlerUser data point to be passed to the motion event callback
[in]on_timestamp_eventUser-defined routine to be invoked on timestamp
[in]timestamp_handlerUser data point to be passed to the motion event callback
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
See also
rs_enable_motion_tracking_cpp()

Definition at line 338 of file rs.cpp.

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.

Note:

The rs_enable_motion_tracking_cpp() method is responsible for activating the motion module on-board the device. One of the services it provides is to produce shared and high-resolution timestamps for all components that are connected to it. For Depth, IR, Color and Fisheye sensors, librealsense takes care of that and copies the timestamps on the relevant frames.

However, when you have an external device (such as a compass, magnetometer, light sensor, or other) and wish to synchronize it precisely with image and motion streams, you can connect that sensor to a GPIO that is available on some devices. Every time the sensor signals, you get a timestamp callback with a frame number, source ID, and a timestamp. This timestamp callback allows advanced users to synchronize compass events (presumably coming though I2C or some other method) with RealSense data.

This variant of rs_enable_motion_tracking() is provided specifically to enable passing lambdas with capture lists safely into the library.

Parameters
[in]deviceRelevant RealSense device
[in]motion_callbackUser-defined routine to be invoked when motion data arrives
[in]timestamp_callbackUser-defined routine to be invoked on timestamp
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
See also
rs_enable_motion_tracking()

Definition at line 352 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]widthDesired width of a frame image in pixels, or 0 if any width is acceptable
[in]heightDesired height of a frame image in pixels, or 0 if any height is acceptable
[in]formatPixel format of a frame image, or ANY if any format is acceptable
[in]framerateNumber of frames that will be streamed per second, or 0 if any frame rate is acceptable
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 220 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]widthDesired width of a frame image in pixels, or 0 if any width is acceptable
[in]heightDesired height of a frame image in pixels, or 0 if any height is acceptable
[in]formatPixel format of a frame image, or ANY if any format is acceptable
[in]framerateNumber of frames that will be streamed per second, or 0 if any frame rate is acceptable
[in]output_formatOutput buffer format (contious in memory / native with pitch)
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 207 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]presetPreset to use to enable the stream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 232 of file rs.cpp.

const char* rs_event_to_string ( rs_event_source  event)

Definition at line 761 of file rs.cpp.

const char* rs_format_to_string ( rs_format  format)

Definition at line 755 of file rs.cpp.

const char* rs_frame_metadata_to_string ( rs_frame_metadata  md)

Definition at line 767 of file rs.cpp.

void rs_free_error ( rs_error error)

Frees memory of an error object.

Parameters
[in]errorError object allocated by RealSense API function

Definition at line 748 of file rs.cpp.

int rs_get_api_version ( rs_error **  error)

Retrieves API version from the source code. Evaluate that the value is conformant to the established policies.

Parameters
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Version API encoded into integer value. For example: "1.9.3" becomes "10903".

Definition at line 721 of file rs.cpp.

int rs_get_detached_frame_bpp ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame bits per pixel.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame pad crop

Definition at line 548 of file rs.cpp.

const void* rs_get_detached_frame_data ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves data from frame reference.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Pointer to start of the frame data

Definition at line 512 of file rs.cpp.

rs_format rs_get_detached_frame_format ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame format.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame format

Definition at line 555 of file rs.cpp.

int rs_get_detached_frame_height ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame intrinsic height.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Intrinsic height

Definition at line 526 of file rs.cpp.

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.

Parameters
[in]frameCurrent frame reference
[in]frame_metadataMetadata
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Metadata value

Definition at line 458 of file rs.cpp.

unsigned long long rs_get_detached_frame_number ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame number from frame reference.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame number, in milliseconds since the device was started

Definition at line 570 of file rs.cpp.

rs_stream rs_get_detached_frame_stream_type ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame stream type.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Stream type

Definition at line 562 of file rs.cpp.

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)

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame pad crop

Definition at line 540 of file rs.cpp.

double rs_get_detached_frame_timestamp ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves timestamp from frame reference.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Timestamp of the frame, in milliseconds since the device was started

Definition at line 498 of file rs.cpp.

rs_timestamp_domain rs_get_detached_frame_timestamp_domain ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves timestamp domain from frame reference.

This method is used to check if two timestamp values are comparable (meaning, are generated from the same clock).

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Timestamp domain of the frame (camera/ microcontroller)

Definition at line 505 of file rs.cpp.

int rs_get_detached_frame_width ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame intrinsic width in pixels.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Intrinsic width

Definition at line 519 of file rs.cpp.

int rs_get_detached_framerate ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame intrinsic frame rate.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Intrinsic frame rate

Definition at line 533 of file rs.cpp.

rs_device* rs_get_device ( rs_context context,
int  index,
rs_error **  error 
)

Retrieves connected device by index.

Parameters
contextObject representing librealsense session
[in]indexZero-based index of device to retrieve
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Requested device

Definition at line 120 of file rs.cpp.

int rs_get_device_count ( const rs_context context,
rs_error **  error 
)

Determines number of connected devices.

Parameters
contextObject representing librealsense session
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Device count

Definition at line 113 of file rs.cpp.

float rs_get_device_depth_scale ( const rs_device device,
rs_error **  error 
)

Retrieves mapping between the units of the depth image and meters.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Depth in meters corresponding to a depth value of 1

Definition at line 420 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]from_streamStream whose coordinate space to transform from
[in]to_streamStream whose coordinate space to transform to
[out]extrinTransformation between the two streams
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 163 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Firmware version string, in a format that is specific to device model

Definition at line 156 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[out]infoInformation that is retrieved
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Requested camera information string, in a format specific to the device model.

Definition at line 142 of file rs.cpp.

const char* rs_get_device_name ( const rs_device device,
rs_error **  error 
)

Retrieves human-readable device model string.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Model string, such as "Intel RealSense F200" or "Intel RealSense R200"

Definition at line 128 of file rs.cpp.

double rs_get_device_option ( rs_device device,
rs_option  option,
rs_error **  error 
)

Retrieves the current value of a single option.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Value of the option

Definition at line 694 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Value of the option

Definition at line 704 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption
[out]minMinimum value that is acceptable for this option
[out]maxMaximum value that is acceptable for this option
[out]stepGranularity of options that accept discrete values, or zero if the option accepts continuous values
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 635 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption
[out]minMinimum value that is acceptable for this option
[out]maxMaximum value that is acceptable for this option
[out]stepGranularity of options that accept discrete values, or zero if the option accepts continuous values
[out]defDefault value of the option
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 645 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]optionsArray of options that should be queried
[in]countLength of options and values arrays
[out]valuesArray that receives the values of the queried options
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
const char* rs_get_device_serial ( const rs_device device,
rs_error **  error 
)

Retrieves unique serial number of the device.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Serial number, in a format specific to the device model

Definition at line 135 of file rs.cpp.

const char* rs_get_device_usb_port_id ( const rs_device device,
rs_error **  error 
)

Retrieves the USB port number of the device.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
USB port number in a string of format: "##-##"

Definition at line 149 of file rs.cpp.

const char* rs_get_error_message ( const rs_error error)

Returns static pointer to error message.

Parameters
[in]errorError object allocated by RealSense API function
Returns
Pointer to error message (memory manager by the error object)

Definition at line 751 of file rs.cpp.

const char* rs_get_failed_args ( const rs_error error)

Returns static pointer to arguments of a failing function in case of error.

Parameters
[in]errorError object allocated by RealSense API function
Returns
Pointer to arguments string (memory manager by the error object)

Definition at line 750 of file rs.cpp.

const char* rs_get_failed_function ( const rs_error error)

Returns static pointer to name of a failing function in case of error.

Parameters
[in]errorError object allocated by RealSense API function
Returns
Pointer to function name (memory manager by the error object)

Definition at line 749 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream whose latest frame is of interest
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Pointer to start of the frame data

Definition at line 490 of file rs.cpp.

unsigned long long rs_get_frame_number ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Retrieves frame number.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream whose latest frame is of interest
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame number

Definition at line 482 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream whose latest frame is of interest
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Timestamp of the frame, in milliseconds, since the device was started

Definition at line 474 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]fromStream
[out]extrinTransformation between the specific stream and motion module
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 173 of file rs.cpp.

void rs_get_motion_intrinsics ( const rs_device device,
rs_motion_intrinsics intrinsic,
rs_error **  error 
)

Retrieves intrinsic camera parameters for a motion module.

Parameters
[in]deviceRelevant RealSense device
[out]intrinsicIntrinsic parameters
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 298 of file rs.cpp.

rs_format rs_get_stream_format ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Retrieves the pixel format for a specific stream.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Pixel format of the stream

Definition at line 273 of file rs.cpp.

int rs_get_stream_framerate ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Retrieves the frame rate for a specific stream.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame rate of the stream, in frames per second

Definition at line 281 of file rs.cpp.

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 intrinsic.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Height in pixels of images from this stream

Definition at line 265 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]intrinIntrinsic parameters of the stream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 289 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]indexZero-based index of the streaming mode
[out]widthWidth of a frame image in pixels
[out]heightHeight of a frame image in pixels
[out]formatPixel format of a frame image
[out]framerateNumber of frames that will be streamed per second
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 198 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
the count of available modes

Definition at line 190 of file rs.cpp.

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 intrinsic.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Width in pixels of images from this stream

Definition at line 257 of file rs.cpp.

int rs_is_device_streaming ( const rs_device device,
rs_error **  error 
)

Determines if the device is currently streaming.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if the device is currently streaming

Definition at line 413 of file rs.cpp.

int rs_is_motion_tracking_active ( rs_device device,
rs_error **  error 
)

Checks if data acquisition is active.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if motion tracking is active

Definition at line 375 of file rs.cpp.

int rs_is_stream_enabled ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Determines if a specific stream is enabled.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if the stream is currently enabled

Definition at line 249 of file rs.cpp.

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)

Parameters
[in]on_logCallback function pointer
[in]min_severityMinimum severity to be logged
[in]userCustom pointer for the callback
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 324 of file rs.cpp.

void rs_log_to_callback_cpp ( rs_log_severity  min_severity,
rs_log_callback callback,
rs_error **  error 
)

Starts logging to user-provided callback.

Parameters
[in]callbackPointer to log into (must be created and used from C++)
[in]min_severityMinimum severity to be logged
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 331 of file rs.cpp.

void rs_log_to_console ( rs_log_severity  min_severity,
rs_error **  error 
)

Starts logging to console.

Parameters
[in]min_severityMinimum severity to be logged
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 769 of file rs.cpp.

void rs_log_to_file ( rs_log_severity  min_severity,
const char *  file_path,
rs_error **  error 
)

Starts logging to file.

Parameters
[in]file_pathRelative filename to log to. In case file exists, it will be appended to.
[in]min_severityMinimum severity to be logged
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 775 of file rs.cpp.

const char* rs_option_to_string ( rs_option  option)

Definition at line 758 of file rs.cpp.

int rs_poll_for_frames ( rs_device device,
rs_error **  error 
)

Checks if new frames are available, without blocking.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
1 if new frames are available, 0 if no new frames have arrived

Definition at line 435 of file rs.cpp.

const char* rs_preset_to_string ( rs_preset  preset)

Definition at line 756 of file rs.cpp.

void rs_release_frame ( rs_device device,
rs_frame_ref frame,
rs_error **  error 
)

Releases frame handle.

Parameters
[in]deviceRelevant RealSense device
[in]frameHandle returned either detach, clone_ref or from frame callback
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Pointer to start of the frame data

Definition at line 577 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]optionsArray of options that should be set to default
[in]countLength of the options array
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 654 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]typeType of raw data to send to the device
[in]dataRaw data pointer to send
[in]sizeSize, in bytes of the raw data to send
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 731 of file rs.cpp.

void rs_set_device_option ( rs_device device,
rs_option  option,
double  value,
rs_error **  error 
)

Sets the current value of a single option.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption whose value should be set
[in]valueValue of the option
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 712 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]optionsArray of options that should be set
[in]countLength of options and values arrays
[in]valuesArray of values to which the options should be set
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
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 synchronization logic applied.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]on_frameCallback that will receive the frame data and timestamp
[in]userUser data point to be passed to the callback
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
See also
rs_set_frame_callback_cpp()

Definition at line 306 of file rs.cpp.

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 synchronization logic applied.

This variant of rs_set_frame_callback() is provided specifically to enable passing lambdas with capture lists safely into the library.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]callbackCallback that will receive the frame data and timestamp
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
See also
rs_set_frame_callback()

Definition at line 315 of file rs.cpp.

const char* rs_source_to_string ( rs_source  source)

Definition at line 760 of file rs.cpp.

void rs_start_device ( rs_device device,
rs_error **  error 
)

Begins streaming on all enabled streams for this device.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 383 of file rs.cpp.

void rs_start_source ( rs_device device,
rs_source  source,
rs_error **  error 
)

Begins streaming on all enabled streams for this device.

Parameters
[in]deviceRelevant RealSense device
[in]sourceData source to be activated
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 390 of file rs.cpp.

void rs_stop_device ( rs_device device,
rs_error **  error 
)

Ends data acquisition for the specified source providers.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 398 of file rs.cpp.

void rs_stop_source ( rs_device device,
rs_source  source,
rs_error **  error 
)

Ends data acquisition for the specified source providers.

Parameters
[in]deviceRelevant RealSense device
[in]sourceData source to be terminated
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 405 of file rs.cpp.

const char* rs_stream_to_string ( rs_stream  stream)

Definition at line 754 of file rs.cpp.

int rs_supports ( rs_device device,
rs_capabilities  capability,
rs_error **  error 
)

Determines device capabilities.

Parameters
[in]deviceRelevant RealSense device
[in]capabilityCapability to check
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if device has this capability

Definition at line 442 of file rs.cpp.

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.

Parameters
[in]deviceRelevant RealSense device
[in]info_paramParameter to check
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if the parameter both exists and is well-defined for the specific device

Definition at line 450 of file rs.cpp.

int rs_supports_frame_metadata ( const rs_frame_ref frame,
rs_frame_metadata  frame_metadata,
rs_error **  error 
)

Determines device metadata.

Parameters
[in]frameCurrent frame reference
[in]frame_metadataMetadata
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if device has this metadata

Definition at line 466 of file rs.cpp.

const char* rs_timestamp_domain_to_string ( rs_timestamp_domain  info)

Definition at line 765 of file rs.cpp.

void rs_wait_for_frames ( rs_device device,
rs_error **  error 
)

Blocks until new frames are available.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 428 of file rs.cpp.



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