Crate realsense_sys

Crate realsense_sys 

Source
Expand description

§realsense-sys

Generate and use RealSense C library bindings as a Rust crate. This crate is used as a base layer in the more user-friendly realsense-rust crate; we recommend use of realsense-rust if possible in order to better maintain Rust memory safety.

Compatible with RealSense SDK v2.0 and up.

Default bindings are for librealsense version: 2.56.5

§Usage

This crate finds and links the RealSense SDK. Though one can use the generated bindings directly, this crate is meant as a base layer for realsense-rust.

To use this crate, add this line in your Cargo.toml.

realsense-sys = "<current version number>"

§Regenerating the API Bindings

Bindgen relies on clang to generate new FFI bindings. See the OS Use Notes below for more.

Non-Linux users: The current bindings are formatted for Linux. Users on systems other than Linux must run with the buildtime-bindgen feature to reformat the bindings. See more notes for your platform below.

Backwards compatibility: If you’re using an older librealsense version, you may enable the buildtime-bindgen feature to re-generate the bindings. We make no claims of backwards compatibility; good luck.

With all of that said: Run the following to regenerate the realsense2 SDK bindings:

cargo build --features buildtime-bindgen

§OS Use Notes

§Linux

You can install Clang using the following command:

sudo apt install libclang-dev clang

If the realsense2 SDK is installed, pkg-config will detect the realsense2.pc config file automatically. This will load the necessary headers and libraries.

§Windows

NOTE: The current bindings are formatted for Linux. Users must run with the buildtime-bindgen feature active to reformat the bindings for Windows platforms.

This installation process assumes that the RealSense SDK was installed through the .exe wizard downloadable from the librealsense asset page. This process will install the SDK in C:/Program Files (x86)/Intel RealSense SDK 2.0. If your installation is in another place, modify the prefix line in realsense2.pc to the right path.

§Install Pkg-config and Clang

Install pkg-config via Chocolatey:

  1. https://chocolatey.org/install (if not already on the system)
  2. choco install pkgconfiglite
  3. choco install llvm for bindgen (if not already installed)

§Guide Pkg-config to realsense2.pc

Set the pkg-config path in Powershell to the realsense-sys directory. One can do this in two ways:

First Option: Modify pkg-config’s environment variables

To do this, run

$Env:PKG_CONFIG_PATH="C:\Users\< path_to_repo >\realsense-rust\realsense-sys\"

This will help pkg-config find the realsense2.pc file located in this directory. This file tells pkg-config where to locate the headers and libraries necessary for RealSense operation. The Windows wizard does not provide this file, so we provide it ourselves.

It’s a good idea to set the PKG_CONFIG_PATH Environment Variable globally as well via the System Properties. BUT NOTE: Environment Variables set through the Windows System Properties will not apply until the host machine is power cycled. Yep. That’s a thing.

Second Option: Add realsense2.pc to pkg-config’s search directory

Run the following command…

pkg-config --variable pc_path pkg-config

…to identify the directory (or directories) that pkg-config uses to find *.pc files. Copy realsense2.pc to that directory. Boom, done.


§Architecture Notes

This crate provides a bindgen mapping to the low-level C-API of librealsense2.

In that respect, it is fairly straightforward in how realsense-sys maps types from the C-API to Rust, as nothing particularly unique is done other than running bindgen to generate the bindings.

The sys alias is used extensively throughout the realsense-rust crate, so you’ll often see code of the form sys::rs2_XXX.

§Understanding lifetimes

This library is generated by using bindgen on a set of C headers, usually located at /usr/include/librealsense2/rs.h (or wherever you installed librealsense2). Inherently, this makes most of the code in this module unsafe, since it is relying on the underlying C library to define what the lifetimes are for every data type.

librealsense2 does not always do the best job at documenting what the lifetime of an object is. Understand that the library is primarily a C++ library, with a C-compatible API built on top of it. This means that while some guarantees about lifetimes can be made by some types, these guarantees are not always explicit. By that, I mean that many quantities in the C++ library are managed via C++ shared_ptr or unique_ptr. However, the C API on top of this cannot expose these types, and it is often unclear if a pointer you get in the C API is a result of calling shared_ptr::get() or unique_ptr::get() under the hood. A good example of this is rs2_get_frame_sensor, which will give you a pointer to a sensor type from a shared_ptr under the hood. As a result, you do not need to manually manage this pointer and can just drop it whenever as the shared_ptr under the hood will delete the resource when it is no longer held. However, if you get the sensor from a sensor list in the low-level API by calling rs2_create_sensor then you will notice that this pointer is allocated with new, and if you were using this then it needs to be deleted by a call to rs2_delete_sensor. In both cases you get a *mut rs2_sensor from the wrapper, but the lifetime and ownership information is dealt with very differently. This makes the API fairly difficult to navigate.

In general, reading through bindings.rs in the repo will be useful in describing the documentation that Intel provides around every function in the C-API. However, you may find that such documentation is insufficient to understand the lifetimes since not every function documents the proper ownership. As a result you end up needing to understand librealsense2 in C, C++, and Rust in order to utilize the realsense-sys library safely and effectively. If you do find yourself looking for an entry point into the librealsense2 C-API, we highly suggest starting at this file and working your way out via each type.

If this seems like a lot of effor to you (it truly is!), we highly suggest using the realsense-rust wrapper, which attempts to abstract over these and provide a high-level, Rust-native API that avoids unsafe code.

§License

Apache 2.0. See LICENSE file.

Structs§

rs2_calibration_change_callback
rs2_combined_motion
\brief RS2_STREAM_MOTION / RS2_FORMAT_COMBINED_MOTION content is similar to ROS2’s Imu message
rs2_combined_motion__bindgen_ty_1
rs2_combined_motion__bindgen_ty_2
rs2_combined_motion__bindgen_ty_3
rs2_config
rs2_context
rs2_device
rs2_device_hub
rs2_device_info
rs2_device_list
rs2_device_serializer
rs2_devices_changed_callback
rs2_error
rs2_extrinsics
\brief Cross-stream extrinsics: encodes the topology describing how the different devices are oriented.
rs2_firmware_log_message
rs2_firmware_log_parsed_message
rs2_firmware_log_parser
rs2_frame
rs2_frame_callback
rs2_frame_processor_callback
rs2_frame_queue
rs2_intrinsics
\brief Video stream intrinsics.
rs2_log_callback
rs2_log_message
rs2_motion_device_intrinsic
\brief Motion device intrinsics: scale, bias, and variances.
rs2_notification
rs2_notifications_callback
rs2_option_rect
A rectangle expressed in 64 bits, used with rs2_option_value::as_rect. Same semantics as rs2_set_region_of_interest.
rs2_option_value
\brief The value of an option, in a known option type.
rs2_options
rs2_options_changed_callback
rs2_options_list
rs2_pipeline
rs2_pipeline_profile
rs2_pixel
\brief Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right, positive Y is down
rs2_playback_status_changed_callback
rs2_pose
rs2_processing_block
rs2_processing_block_list
rs2_quaternion
\brief Quaternion used to represent rotation
rs2_raw_data_buffer
rs2_sensor
rs2_sensor_list
rs2_source
rs2_stream_profile
rs2_stream_profile_list
rs2_streams_list
rs2_syncer
rs2_terminal_parser
rs2_update_progress_callback
rs2_vector
\brief 3D vector in Euclidean coordinate space
rs2_vertex
\brief 3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from the camera, positive X pointing camera right and positive Y pointing camera down

Constants§

RS2_API_BUILD_VERSION
RS2_API_MAJOR_VERSION
RS2_API_MINOR_VERSION
RS2_API_PATCH_VERSION
RS2_API_VERSION
RS2_CONFIG_FILENAME
RS2_DEFAULT_TIMEOUT
RS2_PRODUCT_LINE_ANY
RS2_PRODUCT_LINE_ANY_INTEL
RS2_PRODUCT_LINE_D400
RS2_PRODUCT_LINE_D500
RS2_PRODUCT_LINE_DEPTH
RS2_PRODUCT_LINE_L500
RS2_PRODUCT_LINE_NON_INTEL
RS2_PRODUCT_LINE_SR300
RS2_PRODUCT_LINE_SW_ONLY
RS2_PRODUCT_LINE_T200
RS2_PRODUCT_LINE_TRACKING
RS2_UNSIGNED_UPDATE_MODE_FULL
RS2_UNSIGNED_UPDATE_MODE_READ_ONLY
RS2_UNSIGNED_UPDATE_MODE_UPDATE
rs2_ambient_light_RS2_AMBIENT_LIGHT_LOW_AMBIENT
rs2_ambient_light_RS2_AMBIENT_LIGHT_NO_AMBIENT
rs2_calib_target_type_RS2_CALIB_TARGET_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_calib_target_type_RS2_CALIB_TARGET_POS_GAUSSIAN_DOT_VERTICES
< Positions of vertices as the centers of Gaussian dots with target inside the ROI
rs2_calib_target_type_RS2_CALIB_TARGET_RECT_GAUSSIAN_DOT_VERTICES
< Flat rectangle with vertices as the centers of Gaussian dots
rs2_calib_target_type_RS2_CALIB_TARGET_ROI_RECT_GAUSSIAN_DOT_VERTICES
< Flat rectangle with vertices as the centers of Gaussian dots with target inside the ROI
rs2_calibration_status_RS2_CALIBRATION_BAD_CONDITIONS
rs2_calibration_status_RS2_CALIBRATION_BAD_RESULT
rs2_calibration_status_RS2_CALIBRATION_FAILED
rs2_calibration_status_RS2_CALIBRATION_NOT_NEEDED
rs2_calibration_status_RS2_CALIBRATION_RETRY
rs2_calibration_status_RS2_CALIBRATION_SCENE_INVALID
rs2_calibration_status_RS2_CALIBRATION_SPECIAL_FRAME
rs2_calibration_status_RS2_CALIBRATION_STARTED
rs2_calibration_status_RS2_CALIBRATION_STATUS_COUNT
rs2_calibration_status_RS2_CALIBRATION_STATUS_FIRST
rs2_calibration_status_RS2_CALIBRATION_STATUS_LAST
rs2_calibration_status_RS2_CALIBRATION_SUCCESSFUL
rs2_calibration_status_RS2_CALIBRATION_TRIGGERED
rs2_calibration_type_RS2_CALIBRATION_AUTO_DEPTH_TO_RGB
rs2_calibration_type_RS2_CALIBRATION_MANUAL_DEPTH_TO_RGB
rs2_calibration_type_RS2_CALIBRATION_THERMAL
rs2_calibration_type_RS2_CALIBRATION_TYPE_COUNT
rs2_camera_info_RS2_CAMERA_INFO_ADVANCED_MODE
< True iff the device is in advanced mode
rs2_camera_info_RS2_CAMERA_INFO_ASIC_SERIAL_NUMBER
< ASIC serial number
rs2_camera_info_RS2_CAMERA_INFO_CAMERA_LOCKED
< True iff EEPROM is locked
rs2_camera_info_RS2_CAMERA_INFO_CONNECTION_TYPE
< Connection type, for example USB, GMSL, DDS
rs2_camera_info_RS2_CAMERA_INFO_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_camera_info_RS2_CAMERA_INFO_DEBUG_OP_CODE
< If device supports firmware logging, this is the command to send to get logs from firmware
rs2_camera_info_RS2_CAMERA_INFO_DFU_DEVICE_PATH
< DFU Device node path
rs2_camera_info_RS2_CAMERA_INFO_FIRMWARE_UPDATE_ID
< Firmware update ID
rs2_camera_info_RS2_CAMERA_INFO_FIRMWARE_VERSION
< Primary firmware version
rs2_camera_info_RS2_CAMERA_INFO_IP_ADDRESS
< IP address for remote camera.
rs2_camera_info_RS2_CAMERA_INFO_NAME
< Friendly name
rs2_camera_info_RS2_CAMERA_INFO_PHYSICAL_PORT
< Unique identifier of the port the device is connected to (platform specific)
rs2_camera_info_RS2_CAMERA_INFO_PRODUCT_ID
< Product ID as reported in the USB descriptor
rs2_camera_info_RS2_CAMERA_INFO_PRODUCT_LINE
< Device product line D400, etc.
rs2_camera_info_RS2_CAMERA_INFO_RECOMMENDED_FIRMWARE_VERSION
< Recommended firmware version
rs2_camera_info_RS2_CAMERA_INFO_SERIAL_NUMBER
< Device serial number
rs2_camera_info_RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR
< Designated USB specification: USB2/USB3
rs2_depth_auto_exposure_mode_RS2_DEPTH_AUTO_EXPOSURE_ACCELERATED
< Choose accelerated algorithm for auto exposure
rs2_depth_auto_exposure_mode_RS2_DEPTH_AUTO_EXPOSURE_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_depth_auto_exposure_mode_RS2_DEPTH_AUTO_EXPOSURE_REGULAR
< Choose regular algorithm for auto exposure
rs2_digital_gain_RS2_DIGITAL_GAIN_AUTO
rs2_digital_gain_RS2_DIGITAL_GAIN_HIGH
rs2_digital_gain_RS2_DIGITAL_GAIN_LOW
rs2_distortion_RS2_DISTORTION_BROWN_CONRADY
< Unmodified Brown-Conrady distortion model
rs2_distortion_RS2_DISTORTION_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_distortion_RS2_DISTORTION_FTHETA
< F-Theta fish-eye distortion model
rs2_distortion_RS2_DISTORTION_INVERSE_BROWN_CONRADY
< Equivalent to Brown-Conrady distortion, except undistorts image instead of distorting it
rs2_distortion_RS2_DISTORTION_KANNALA_BRANDT4
< Four parameter Kannala Brandt distortion model
rs2_distortion_RS2_DISTORTION_MODIFIED_BROWN_CONRADY
< Equivalent to Brown-Conrady distortion, except that tangential distortion is applied to radially distorted points
rs2_distortion_RS2_DISTORTION_NONE
< Rectilinear images. No distortion compensation required.
rs2_emitter_frequency_mode_RS2_EMITTER_FREQUENCY_57_KHZ
< Emitter frequency shall be 57 [KHZ]
rs2_emitter_frequency_mode_RS2_EMITTER_FREQUENCY_91_KHZ
< Emitter frequency shall be 91 [KHZ]
rs2_emitter_frequency_mode_RS2_EMITTER_FREQUENCY_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_exception_type_RS2_EXCEPTION_TYPE_BACKEND
< Error was returned from the underlying OS-specific layer
rs2_exception_type_RS2_EXCEPTION_TYPE_CAMERA_DISCONNECTED
< Device was disconnected, this can be caused by outside intervention, by internal firmware error or due to insufficient power
rs2_exception_type_RS2_EXCEPTION_TYPE_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_exception_type_RS2_EXCEPTION_TYPE_DEVICE_IN_RECOVERY_MODE
< Device is in recovery mode and might require firmware update
rs2_exception_type_RS2_EXCEPTION_TYPE_INVALID_VALUE
< Invalid value was passed to the API
rs2_exception_type_RS2_EXCEPTION_TYPE_IO
< IO Device failure
rs2_exception_type_RS2_EXCEPTION_TYPE_NOT_IMPLEMENTED
< The method is not implemented at this point
rs2_exception_type_RS2_EXCEPTION_TYPE_UNKNOWN
rs2_exception_type_RS2_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE
< Function precondition was violated
rs2_extension_RS2_EXTENSION_ADVANCED_MODE
rs2_extension_RS2_EXTENSION_AUTO_CALIBRATED_DEVICE
rs2_extension_RS2_EXTENSION_AUTO_CALIBRATION_FILTER
rs2_extension_RS2_EXTENSION_CALIBRATED_SENSOR
rs2_extension_RS2_EXTENSION_CALIBRATION_CHANGE_DEVICE
rs2_extension_RS2_EXTENSION_COLOR_SENSOR
rs2_extension_RS2_EXTENSION_COMPOSITE_FRAME
rs2_extension_RS2_EXTENSION_COUNT
rs2_extension_RS2_EXTENSION_DEBUG
rs2_extension_RS2_EXTENSION_DEBUG_STREAM_SENSOR
rs2_extension_RS2_EXTENSION_DECIMATION_FILTER
rs2_extension_RS2_EXTENSION_DEPTH_FRAME
rs2_extension_RS2_EXTENSION_DEPTH_HUFFMAN_DECODER
rs2_extension_RS2_EXTENSION_DEPTH_SENSOR
rs2_extension_RS2_EXTENSION_DEPTH_STEREO_SENSOR
rs2_extension_RS2_EXTENSION_DEVICE_CALIBRATION
rs2_extension_RS2_EXTENSION_DISPARITY_FILTER
rs2_extension_RS2_EXTENSION_DISPARITY_FRAME
rs2_extension_RS2_EXTENSION_FISHEYE_SENSOR
rs2_extension_RS2_EXTENSION_FW_LOGGER
rs2_extension_RS2_EXTENSION_GLOBAL_TIMER
rs2_extension_RS2_EXTENSION_HDR_MERGE
rs2_extension_RS2_EXTENSION_HOLE_FILLING_FILTER
rs2_extension_RS2_EXTENSION_INFO
rs2_extension_RS2_EXTENSION_L500_DEPTH_SENSOR
rs2_extension_RS2_EXTENSION_MAX_USABLE_RANGE_SENSOR
rs2_extension_RS2_EXTENSION_MOTION
rs2_extension_RS2_EXTENSION_MOTION_FRAME
rs2_extension_RS2_EXTENSION_MOTION_PROFILE
rs2_extension_RS2_EXTENSION_MOTION_SENSOR
rs2_extension_RS2_EXTENSION_OPTIONS
rs2_extension_RS2_EXTENSION_PLAYBACK
rs2_extension_RS2_EXTENSION_POINTS
rs2_extension_RS2_EXTENSION_POSE
rs2_extension_RS2_EXTENSION_POSE_FRAME
rs2_extension_RS2_EXTENSION_POSE_PROFILE
rs2_extension_RS2_EXTENSION_POSE_SENSOR
rs2_extension_RS2_EXTENSION_RECOMMENDED_FILTERS
rs2_extension_RS2_EXTENSION_RECORD
rs2_extension_RS2_EXTENSION_ROI
rs2_extension_RS2_EXTENSION_ROTATION_FILTER
rs2_extension_RS2_EXTENSION_SEQUENCE_ID_FILTER
rs2_extension_RS2_EXTENSION_SERIALIZABLE
rs2_extension_RS2_EXTENSION_SOFTWARE_DEVICE
rs2_extension_RS2_EXTENSION_SOFTWARE_SENSOR
rs2_extension_RS2_EXTENSION_SPATIAL_FILTER
rs2_extension_RS2_EXTENSION_TEMPORAL_FILTER
rs2_extension_RS2_EXTENSION_THRESHOLD_FILTER
rs2_extension_RS2_EXTENSION_TM2
rs2_extension_RS2_EXTENSION_TM2_SENSOR
rs2_extension_RS2_EXTENSION_UNKNOWN
rs2_extension_RS2_EXTENSION_UPDATABLE
rs2_extension_RS2_EXTENSION_UPDATE_DEVICE
rs2_extension_RS2_EXTENSION_VIDEO
rs2_extension_RS2_EXTENSION_VIDEO_FRAME
rs2_extension_RS2_EXTENSION_VIDEO_PROFILE
rs2_extension_RS2_EXTENSION_WHEEL_ODOMETER
rs2_extension_RS2_EXTENSION_ZERO_ORDER_FILTER
rs2_format_RS2_FORMAT_6DOF
< Pose data packed as floats array, containing translation vector, rotation quaternion and prediction velocities and accelerations vectors
rs2_format_RS2_FORMAT_ANY
< When passed to enable stream, librealsense will try to provide best suited format
rs2_format_RS2_FORMAT_BGR8
< 8-bit blue, green, and red channels – suitable for OpenCV
rs2_format_RS2_FORMAT_BGRA8
< 8-bit blue, green, and red channels + constant alpha channel equal to FF
rs2_format_RS2_FORMAT_COMBINED_MOTION
< Combined motion data, as in the combined_motion structure
rs2_format_RS2_FORMAT_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_format_RS2_FORMAT_DISPARITY16
< 16-bit float-point disparity values. Depth->Disparity conversion : Disparity = Baseline*FocalLength/Depth.
rs2_format_RS2_FORMAT_DISPARITY32
< 32-bit float-point disparity values. Depth->Disparity conversion : Disparity = Baseline*FocalLength/Depth
rs2_format_RS2_FORMAT_DISTANCE
< 32-bit float-point depth distance value.
rs2_format_RS2_FORMAT_FG
< 16-bit per-pixel frame grabber format.
rs2_format_RS2_FORMAT_GPIO_RAW
< Raw data from the external sensors hooked to one of the GPIO’s
rs2_format_RS2_FORMAT_INVI
< 8-bit IR stream.
rs2_format_RS2_FORMAT_INZI
< multi-planar Depth 16bit + IR 10bit.
rs2_format_RS2_FORMAT_M420
< 24-bit for every pixel: y for each pixel, and u,v data for every four pixels - packed as 2 lines of y, 1 line of u,v
rs2_format_RS2_FORMAT_MJPEG
< Bitstream encoding for video in which an image of each frame is encoded as JPEG-DIB
rs2_format_RS2_FORMAT_MOTION_RAW
< Raw data from the motion sensor
rs2_format_RS2_FORMAT_MOTION_XYZ32F
< Motion data packed as 3 32-bit float values, for X, Y, and Z axis
rs2_format_RS2_FORMAT_RAW8
< 8-bit raw image
rs2_format_RS2_FORMAT_RAW10
< Four 10 bits per pixel luminance values packed into a 5-byte macropixel
rs2_format_RS2_FORMAT_RAW16
< 16-bit raw image
rs2_format_RS2_FORMAT_RGB8
< 8-bit red, green and blue channels
rs2_format_RS2_FORMAT_RGBA8
< 8-bit red, green and blue channels + constant alpha channel equal to FF
rs2_format_RS2_FORMAT_UYVY
< Similar to the standard YUYV pixel format, but packed in a different order
rs2_format_RS2_FORMAT_W10
< Grey-scale image as a bit-packed array. 4 pixel data stream taking 5 bytes
rs2_format_RS2_FORMAT_XYZ32F
< 32-bit floating point 3D coordinates.
rs2_format_RS2_FORMAT_Y8
< 8-bit per-pixel grayscale image
rs2_format_RS2_FORMAT_Y8I
< 8-bit per pixel interleaved. 8-bit left, 8-bit right.
rs2_format_RS2_FORMAT_Y16
< 16-bit per-pixel grayscale image
rs2_format_RS2_FORMAT_Y10BPACK
< 16-bit per-pixel grayscale image unpacked from 10 bits per pixel packed ([8:8:8:8:2222]) grey-scale image. The data is unpacked to LSB and padded with 6 zero bits
rs2_format_RS2_FORMAT_Y12I
< 12-bit per pixel interleaved. 12-bit left, 12-bit right. Each pixel is stored in a 24-bit word in little-endian order.
rs2_format_RS2_FORMAT_Y16I
< 12-bit per pixel interleaved. 12-bit left, 12-bit right.
rs2_format_RS2_FORMAT_Y411
< 12-bit per-pixel.
rs2_format_RS2_FORMAT_YUYV
< 32-bit y0, u, y1, v data for every two pixels. Similar to YUV422 but packed in a different order - https://en.wikipedia.org/wiki/YUV
rs2_format_RS2_FORMAT_Z16
< 16-bit linear depth values. The depth is meters is equal to depth scale * pixel value.
rs2_format_RS2_FORMAT_Z16H
< DEPRECATED! - Variable-length Huffman-compressed 16-bit depth values.
rs2_frame_metadata_value_RS2_FRAME_METADATA_ACTUAL_EXPOSURE
< Sensor’s exposure width. When Auto Exposure (AE) is on the value is controlled by firmware. usec
rs2_frame_metadata_value_RS2_FRAME_METADATA_ACTUAL_FPS
< Actual fps, times 1000 (30.1 fps would be 30100 in the metadata)
rs2_frame_metadata_value_RS2_FRAME_METADATA_AUTO_EXPOSURE
< Auto Exposure Mode indicator. Zero corresponds to AE switched off.
rs2_frame_metadata_value_RS2_FRAME_METADATA_AUTO_WHITE_BALANCE_TEMPERATURE
< Auto white balance temperature Mode indicator. Zero corresponds to automatic mode switched off.
rs2_frame_metadata_value_RS2_FRAME_METADATA_BACKEND_TIMESTAMP
< Timestamp get from uvc driver. usec
rs2_frame_metadata_value_RS2_FRAME_METADATA_BACKLIGHT_COMPENSATION
< Color backlight compensation. Zero corresponds to switched off.
rs2_frame_metadata_value_RS2_FRAME_METADATA_BRIGHTNESS
< Color image brightness.
rs2_frame_metadata_value_RS2_FRAME_METADATA_CALIB_INFO
< FW-controlled frame counter to be using in Calibration scenarios
rs2_frame_metadata_value_RS2_FRAME_METADATA_CONTRAST
< Color image contrast.
rs2_frame_metadata_value_RS2_FRAME_METADATA_COUNT
rs2_frame_metadata_value_RS2_FRAME_METADATA_CRC
< CRC checksum of the Metadata
rs2_frame_metadata_value_RS2_FRAME_METADATA_EXPOSURE_PRIORITY
< Exposure priority.
rs2_frame_metadata_value_RS2_FRAME_METADATA_EXPOSURE_ROI_BOTTOM
< Bottom region of interest for the auto exposure Algorithm.
rs2_frame_metadata_value_RS2_FRAME_METADATA_EXPOSURE_ROI_LEFT
< Left region of interest for the auto exposure Algorithm.
rs2_frame_metadata_value_RS2_FRAME_METADATA_EXPOSURE_ROI_RIGHT
< Right region of interest for the auto exposure Algorithm.
rs2_frame_metadata_value_RS2_FRAME_METADATA_EXPOSURE_ROI_TOP
< Top region of interest for the auto exposure Algorithm.
rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_COUNTER
< A sequential index managed per-stream. Integer value
rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_EMITTER_MODE
< Emitter mode: 0 - all emitters disabled. 1 - laser enabled. 2 - auto laser enabled (opt). 3 - LED enabled (opt).
rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_LASER_POWER
< Laser power value 0-360.
rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_LASER_POWER_MODE
< Laser power mode. Zero corresponds to Laser power switched off and one for switched on. deprecated, replaced by RS2_FRAME_METADATA_FRAME_EMITTER_MODE
rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_LED_POWER
< Led power value 0-360.
rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_TIMESTAMP
< Timestamp set by device clock when data readout and transmit commence. usec
rs2_frame_metadata_value_RS2_FRAME_METADATA_GAIN_LEVEL
< A relative value increasing which will increase the Sensor’s gain factor.
When AE is set On, the value is controlled by firmware. Integer value
rs2_frame_metadata_value_RS2_FRAME_METADATA_GAMMA
< Color image gamma.
rs2_frame_metadata_value_RS2_FRAME_METADATA_GPIO_INPUT_DATA
< GPIO input data
rs2_frame_metadata_value_RS2_FRAME_METADATA_HUE
< Color image hue.
rs2_frame_metadata_value_RS2_FRAME_METADATA_INPUT_HEIGHT
< Frame input height in pixels, used as safety attribute
rs2_frame_metadata_value_RS2_FRAME_METADATA_INPUT_WIDTH
< Frame input width in pixels, used as safety attribute
rs2_frame_metadata_value_RS2_FRAME_METADATA_LOW_LIGHT_COMPENSATION
< Color lowlight compensation. Zero corresponds to switched off.
rs2_frame_metadata_value_RS2_FRAME_METADATA_MANUAL_WHITE_BALANCE
< Color image white balance.
rs2_frame_metadata_value_RS2_FRAME_METADATA_POWER_LINE_FREQUENCY
< Power Line Frequency for anti-flickering Off/50Hz/60Hz/Auto.
rs2_frame_metadata_value_RS2_FRAME_METADATA_PRESET
< Preset id, used in MIPI SKU Metadata
rs2_frame_metadata_value_RS2_FRAME_METADATA_RAW_FRAME_SIZE
< The number of transmitted payload bytes, not including metadata
rs2_frame_metadata_value_RS2_FRAME_METADATA_SATURATION
< Color image saturation.
rs2_frame_metadata_value_RS2_FRAME_METADATA_SENSOR_TIMESTAMP
< Timestamp of the middle of sensor’s exposure calculated by device. usec
rs2_frame_metadata_value_RS2_FRAME_METADATA_SEQUENCE_ID
< sub-preset sequence id
rs2_frame_metadata_value_RS2_FRAME_METADATA_SEQUENCE_NAME
< sub-preset id
rs2_frame_metadata_value_RS2_FRAME_METADATA_SEQUENCE_SIZE
< sub-preset sequence size
rs2_frame_metadata_value_RS2_FRAME_METADATA_SHARPNESS
< Color image sharpness.
rs2_frame_metadata_value_RS2_FRAME_METADATA_SUB_PRESET_INFO
< Sub-preset information
rs2_frame_metadata_value_RS2_FRAME_METADATA_TEMPERATURE
< Temperature of the device, measured at the time of the frame capture. Celsius degrees
rs2_frame_metadata_value_RS2_FRAME_METADATA_TIME_OF_ARRIVAL
< Time of arrival in system clock
rs2_frame_metadata_value_RS2_FRAME_METADATA_TRIGGER
< Frame trigger type
rs2_frame_metadata_value_RS2_FRAME_METADATA_WHITE_BALANCE
< White Balance setting as a color temperature. Kelvin degrees
rs2_gyro_sensitivity_RS2_GYRO_SENSITIVITY_3_8_MILLI_DEG_SEC
rs2_gyro_sensitivity_RS2_GYRO_SENSITIVITY_7_6_MILLI_DEG_SEC
rs2_gyro_sensitivity_RS2_GYRO_SENSITIVITY_15_3_MILLI_DEG_SEC
rs2_gyro_sensitivity_RS2_GYRO_SENSITIVITY_30_5_MILLI_DEG_SEC
rs2_gyro_sensitivity_RS2_GYRO_SENSITIVITY_61_0_MILLI_DEG_SEC
rs2_gyro_sensitivity_RS2_GYRO_SENSITIVITY_COUNT
rs2_host_perf_mode_RS2_HOST_PERF_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_host_perf_mode_RS2_HOST_PERF_DEFAULT
< no change in settings, use device defaults
rs2_host_perf_mode_RS2_HOST_PERF_HIGH
< high performance host mode, if host is strong as compared to the work and can handle workload without delay, this option sets smaller USB transactions granularity and as result larger number of transactions and workload on host, but reduces chance in device frame drops
rs2_host_perf_mode_RS2_HOST_PERF_LOW
< low performance host mode, if host cannot keep up with workload, this option may improve stability, for example, it sets larger USB transaction granularity, reduces number of transactions and improve performance and stability on relatively weak hosts as compared to the workload
rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_AUTOMATIC
rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_CUSTOM
rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_DEFAULT
rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_LOW_AMBIENT
rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_MAX_RANGE
rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_NO_AMBIENT
rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_SHORT_RANGE
rs2_log_severity_RS2_LOG_SEVERITY_ALL
< Include any/all log messages
rs2_log_severity_RS2_LOG_SEVERITY_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_log_severity_RS2_LOG_SEVERITY_DEBUG
< Detailed information about ordinary operations
rs2_log_severity_RS2_LOG_SEVERITY_ERROR
< Indication of definite failure
rs2_log_severity_RS2_LOG_SEVERITY_FATAL
< Indication of unrecoverable failure
rs2_log_severity_RS2_LOG_SEVERITY_INFO
< Terse information about ordinary operations
rs2_log_severity_RS2_LOG_SEVERITY_NONE
< No logging will occur
rs2_log_severity_RS2_LOG_SEVERITY_WARN
< Indication of possible failure
rs2_matchers_RS2_MATCHER_COUNT
rs2_matchers_RS2_MATCHER_DEFAULT
rs2_matchers_RS2_MATCHER_DI
rs2_matchers_RS2_MATCHER_DIC
rs2_matchers_RS2_MATCHER_DIC_C
rs2_matchers_RS2_MATCHER_DI_C
rs2_matchers_RS2_MATCHER_DLR
rs2_matchers_RS2_MATCHER_DLR_C
rs2_notification_category_RS2_NOTIFICATION_CATEGORY_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_notification_category_RS2_NOTIFICATION_CATEGORY_FIRMWARE_UPDATE_RECOMMENDED
< Current firmware version installed is not the latest available
rs2_notification_category_RS2_NOTIFICATION_CATEGORY_FRAMES_TIMEOUT
< Frames didn’t arrived within 5 seconds
rs2_notification_category_RS2_NOTIFICATION_CATEGORY_FRAME_CORRUPTED
< Received partial/incomplete frame
rs2_notification_category_RS2_NOTIFICATION_CATEGORY_HARDWARE_ERROR
< Error reported from the device
rs2_notification_category_RS2_NOTIFICATION_CATEGORY_HARDWARE_EVENT
< General Hardeware notification that is not an error
rs2_notification_category_RS2_NOTIFICATION_CATEGORY_POSE_RELOCALIZATION
< A relocalization event has updated the pose provided by a pose sensor
rs2_notification_category_RS2_NOTIFICATION_CATEGORY_UNKNOWN_ERROR
< Received unknown error from the device
rs2_option_RS2_OPTION_ACCURACY
< Set the number of patterns projected per frame. The higher the accuracy value the more patterns projected. Increasing the number of patterns help to achieve better accuracy. Note that this control is affecting the Depth FPS
rs2_option_RS2_OPTION_ALTERNATE_IR
< Turn on/off the alternate IR, When enabling alternate IR, the IR image is holding the amplitude of the depth correlation.
rs2_option_RS2_OPTION_AMBIENT_LIGHT
< DEPRECATED! - Use RS2_OPTION_DIGITAL_GAIN instead.
rs2_option_RS2_OPTION_APD_TEMPERATURE
< APD temperature
rs2_option_RS2_OPTION_ASIC_TEMPERATURE
< Current Asic Temperature
rs2_option_RS2_OPTION_AUTO_EXPOSURE_CONVERGE_STEP
< Allows dynamically adjust the converge step value of the target exposure in Auto-Exposure algorithm
rs2_option_RS2_OPTION_AUTO_EXPOSURE_LIMIT
< Set and get auto exposure limit in microseconds. If the requested exposure limit is greater than frame time, it will be set to frame time at runtime. Setting will not take effect until next streaming session.
rs2_option_RS2_OPTION_AUTO_EXPOSURE_LIMIT_TOGGLE
< Enable / disable color image auto-exposure
rs2_option_RS2_OPTION_AUTO_EXPOSURE_MODE
< Auto-Exposure modes: Static, Anti-Flicker and Hybrid
rs2_option_RS2_OPTION_AUTO_EXPOSURE_PRIORITY
< Allows sensor to dynamically adjust the frame rate depending on lighting conditions
rs2_option_RS2_OPTION_AUTO_GAIN_LIMIT
< Set and get auto gain limits ranging from 16 to 248. If the requested gain limit is less than 16, it will be set to 16. If the requested gain limit is greater than 248, it will be set to 248. Setting will not take effect until next streaming session.
rs2_option_RS2_OPTION_AUTO_GAIN_LIMIT_TOGGLE
< Enable / disable color image auto-gain
rs2_option_RS2_OPTION_AUTO_RX_SENSITIVITY
< Enable receiver sensitivity according to ambient light, bounded by the Receiver Gain control.
rs2_option_RS2_OPTION_AVALANCHE_PHOTO_DIODE
< Changes the exposure time of Avalanche Photo Diode in the receiver
rs2_option_RS2_OPTION_BACKLIGHT_COMPENSATION
< Enable / disable color backlight compensation
rs2_option_RS2_OPTION_BRIGHTNESS
< Color image brightness
rs2_option_RS2_OPTION_COLOR_SCHEME
< Color scheme for data visualization
rs2_option_RS2_OPTION_CONFIDENCE_THRESHOLD
< The 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
rs2_option_RS2_OPTION_CONTRAST
< Color image contrast
rs2_option_RS2_OPTION_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_option_RS2_OPTION_DEPTH_AUTO_EXPOSURE_MODE
< Select depth sensor auto exposure mode see rs2_depth_auto_exposure_mode for values
rs2_option_RS2_OPTION_DEPTH_OFFSET
< Offset from sensor to depth origin in millimetrers
rs2_option_RS2_OPTION_DEPTH_UNITS
< Number of meters represented by a single depth unit
rs2_option_RS2_OPTION_DIGITAL_GAIN
< Change the depth digital gain see rs2_digital_gain for values
rs2_option_RS2_OPTION_EMITTER_ALWAYS_ON
< Enable Laser On constantly (GS SKU Only)
rs2_option_RS2_OPTION_EMITTER_ENABLED
< Emitter select: 0 - disable all emitters. 1 - enable laser. 2 - enable auto laser. 3 - enable LED.
rs2_option_RS2_OPTION_EMITTER_FREQUENCY
< Select emitter (laser projector) frequency, see rs2_emitter_frequency for values
rs2_option_RS2_OPTION_EMITTER_ON_OFF
< When supported, this option make the camera to switch the emitter state every frame. 0 for disabled, 1 for enabled
rs2_option_RS2_OPTION_ENABLE_AUTO_EXPOSURE
< Enable / disable auto-exposure
rs2_option_RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE
< Enable / disable color image auto-white-balance
rs2_option_RS2_OPTION_ENABLE_DYNAMIC_CALIBRATION
< Enable dynamic calibration
rs2_option_RS2_OPTION_ENABLE_IR_REFLECTIVITY
< Enables data collection for calculating IR pixel reflectivity
rs2_option_RS2_OPTION_ENABLE_MAPPING
< Enable an internal map
rs2_option_RS2_OPTION_ENABLE_MAP_PRESERVATION
< Preserve previous map when starting
rs2_option_RS2_OPTION_ENABLE_MAX_USABLE_RANGE
< Turn on/off the maximum usable depth sensor range given the amount of ambient light in the scene
rs2_option_RS2_OPTION_ENABLE_MOTION_CORRECTION
< Enable/Disable automatic correction of the motion data
rs2_option_RS2_OPTION_ENABLE_POSE_JUMPING
< Enable position jumping
rs2_option_RS2_OPTION_ENABLE_RELOCALIZATION
< Enable appearance based relocalization
rs2_option_RS2_OPTION_ERROR_POLLING_ENABLED
< disable error handling
rs2_option_RS2_OPTION_EXPOSURE
< Controls exposure time of color camera. Setting any value will disable auto exposure
rs2_option_RS2_OPTION_FILTER_MAGNITUDE
< The 2D-filter effect. The specific interpretation is given within the context of the filter
rs2_option_RS2_OPTION_FILTER_OPTION
< Set the filter to apply to each depth frame. Each one of the filter is optimized per the application requirements
rs2_option_RS2_OPTION_FILTER_SMOOTH_ALPHA
< 2D-filter parameter controls the weight/radius for smoothing.
rs2_option_RS2_OPTION_FILTER_SMOOTH_DELTA
< 2D-filter range/validity threshold
rs2_option_RS2_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.
rs2_option_RS2_OPTION_FREEFALL_DETECTION_ENABLED
< Enable/disable sensor shutdown when a free-fall is detected (on by default)
rs2_option_RS2_OPTION_GAIN
< Color image gain
rs2_option_RS2_OPTION_GAMMA
< Color image gamma setting
rs2_option_RS2_OPTION_GLOBAL_TIME_ENABLED
< disable global time
rs2_option_RS2_OPTION_GYRO_SENSITIVITY
< Control of the gyro sensitivity level, see rs2_gyro_sensitivity for values
rs2_option_RS2_OPTION_HARDWARE_PRESET
< Hardware stream configuration
rs2_option_RS2_OPTION_HDR_ENABLED
< Enable / disable HDR
rs2_option_RS2_OPTION_HISTOGRAM_EQUALIZATION_ENABLED
< Perform histogram equalization post-processing on the depth data
rs2_option_RS2_OPTION_HOLES_FILL
< Enhance depth data post-processing with holes filling where appropriate
rs2_option_RS2_OPTION_HOST_PERFORMANCE
< Set host performance mode to optimize device settings so host can keep up with workload, for example, USB transaction granularity, setting option to low performance host leads to larger USB transaction size and reduced number of transactions which improves performance and stability if host is relatively weak as compared to workload
rs2_option_RS2_OPTION_HUE
< Color image hue
rs2_option_RS2_OPTION_HUMIDITY_TEMPERATURE
< Humidity temperature [Deg Celsius]
rs2_option_RS2_OPTION_INTER_CAM_SYNC_MODE
< Impose Inter-camera HW synchronization mode. Applicable for D400/L500/Rolling Shutter SKUs
rs2_option_RS2_OPTION_INVALIDATION_BYPASS
< Enable\disable pixel invalidation
rs2_option_RS2_OPTION_LASER_POWER
< Power of the laser emitter (mW), with 0 meaning projector turned off
rs2_option_RS2_OPTION_LED_POWER
< Power of the LED (light emitting diode), with 0 meaning LED off
rs2_option_RS2_OPTION_LLD_TEMPERATURE
< LDD temperature
rs2_option_RS2_OPTION_MAX_DISTANCE
< Maximum distance to the target
rs2_option_RS2_OPTION_MA_TEMPERATURE
< MA temperature
rs2_option_RS2_OPTION_MC_TEMPERATURE
< MC temperature
rs2_option_RS2_OPTION_MIN_DISTANCE
< Minimal distance to the target
rs2_option_RS2_OPTION_MOTION_MODULE_TEMPERATURE
< Current Motion-Module Temperature
rs2_option_RS2_OPTION_MOTION_RANGE
< Motion vs. Range trade-off, with lower values allowing for better motion sensitivity and higher values allowing for better depth range
rs2_option_RS2_OPTION_NOISE_ESTIMATION
< Noise estimation - indicates the noise on the IR image
rs2_option_RS2_OPTION_NOISE_FILTERING
< Control edges and background noise
rs2_option_RS2_OPTION_OHM_TEMPERATURE
< Temperature of the Optical Head Sensor
rs2_option_RS2_OPTION_OUTPUT_TRIGGER_ENABLED
< Enable / disable trigger to be outputted from the camera to any external device on every depth frame
rs2_option_RS2_OPTION_POST_PROCESSING_SHARPENING
< Changes the amount of sharpening in the post-processed image
rs2_option_RS2_OPTION_POWER_LINE_FREQUENCY
< Power Line Frequency control for anti-flickering Off/50Hz/60Hz/Auto
rs2_option_RS2_OPTION_PRE_PROCESSING_SHARPENING
< Changes the amount of sharpening in the pre-processed image
rs2_option_RS2_OPTION_PROJECTOR_TEMPERATURE
< Current Projector Temperature
rs2_option_RS2_OPTION_RECEIVER_SENSITIVITY
< Control receiver sensitivity to incoming light, both projected and ambient (same as APD on L515).
rs2_option_RS2_OPTION_REGION_OF_INTEREST
< The rectangular area used from the streaming profile
rs2_option_RS2_OPTION_RESET_CAMERA_ACCURACY_HEALTH
< DEPRECATED as of 2.46!
rs2_option_RS2_OPTION_ROTATION
rs2_option_RS2_OPTION_SATURATION
< Color image saturation setting
rs2_option_RS2_OPTION_SENSOR_MODE
< DEPRECATED! - The resolution mode: see rs2_sensor_mode for values
rs2_option_RS2_OPTION_SEQUENCE_ID
< HDR Sequence ID - 0 is not HDR; sequence ID for HDR configuration starts from 1
rs2_option_RS2_OPTION_SEQUENCE_NAME
< HDR Sequence name
rs2_option_RS2_OPTION_SEQUENCE_SIZE
< HDR Sequence size
rs2_option_RS2_OPTION_SHARPNESS
< Color image sharpness setting
rs2_option_RS2_OPTION_SOC_PVT_TEMPERATURE
< Temperature of PVT SOC
rs2_option_RS2_OPTION_STEREO_BASELINE
< The distance in mm between the first and the second imagers in stereo-based depth cameras
rs2_option_RS2_OPTION_STREAM_FILTER
< Select a stream to process
rs2_option_RS2_OPTION_STREAM_FORMAT_FILTER
< Select a stream format to process
rs2_option_RS2_OPTION_STREAM_INDEX_FILTER
< Select a stream index to process
rs2_option_RS2_OPTION_TEXTURE_SOURCE
< Texture mapping stream unique ID
rs2_option_RS2_OPTION_THERMAL_COMPENSATION
< Depth Thermal Compensation for selected D400 SKUs
rs2_option_RS2_OPTION_TOTAL_FRAME_DROPS
< Total number of detected frame drops from all streams
rs2_option_RS2_OPTION_TRANSMITTER_FREQUENCY
< changes the transmitter frequencies increasing effective range over sharpness.
rs2_option_RS2_OPTION_TRIGGER_CAMERA_ACCURACY_HEALTH
< DEPRECATED as of 2.46!
rs2_option_RS2_OPTION_VERTICAL_BINNING
< Enables vertical binning which increases the maximal sensed distance.
rs2_option_RS2_OPTION_VISUAL_PRESET
< Provide access to several recommend sets of option presets for the depth camera
rs2_option_RS2_OPTION_WHITE_BALANCE
< Controls white balance of color image. Setting any value will disable auto white balance
rs2_option_RS2_OPTION_ZERO_ORDER_ENABLED
< DEPRECATED! - Toggle Zero-Order mode
rs2_option_RS2_OPTION_ZERO_ORDER_POINT_X
< Deprecated!!! - Zero order point x
rs2_option_RS2_OPTION_ZERO_ORDER_POINT_Y
< Deprecated!!! - Zero order point y
rs2_option_type_RS2_OPTION_TYPE_BOOLEAN
rs2_option_type_RS2_OPTION_TYPE_COUNT
rs2_option_type_RS2_OPTION_TYPE_FLOAT
rs2_option_type_RS2_OPTION_TYPE_INTEGER
< 64-bit signed integer value
rs2_option_type_RS2_OPTION_TYPE_RECT
rs2_option_type_RS2_OPTION_TYPE_STRING
rs2_playback_status_RS2_PLAYBACK_STATUS_COUNT
rs2_playback_status_RS2_PLAYBACK_STATUS_PAUSED
< One or more sensors were started, but playback paused reading and paused raising data
rs2_playback_status_RS2_PLAYBACK_STATUS_PLAYING
< One or more sensors were started, playback is reading and raising data
rs2_playback_status_RS2_PLAYBACK_STATUS_STOPPED
< All sensors were stopped, or playback has ended (all data was read). This is the initial playback status
rs2_playback_status_RS2_PLAYBACK_STATUS_UNKNOWN
< Unknown state
rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_CUSTOM
rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_DEFAULT
rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_HAND
rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_HIGH_ACCURACY
rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_HIGH_DENSITY
rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_MEDIUM_DENSITY
rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_REMOVE_IR_PATTERN
rs2_sensor_mode_RS2_SENSOR_MODE_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_sensor_mode_RS2_SENSOR_MODE_QVGA
rs2_sensor_mode_RS2_SENSOR_MODE_VGA
rs2_sensor_mode_RS2_SENSOR_MODE_XGA
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_BACKGROUND_SEGMENTATION
< Preset for background segmentation
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_DEFAULT
< Camera default settings
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_FACE_ANALYTICS
< Preset for face analytics
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_FACE_LOGIN
< Preset for face login
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_GESTURE_RECOGNITION
< Preset for gesture recognition
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_GR_CURSOR
< Preset for GR cursor
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_IR_ONLY
< Preset for IR only
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_LONG_RANGE
< Preset for long range
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_MID_RANGE
< Preset for mid-range
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_OBJECT_SCANNING
< Preset for object scanning
rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_SHORT_RANGE
< Preset for short range
rs2_stream_RS2_STREAM_ACCEL
< Native stream of accelerometer motion data produced by RealSense device
rs2_stream_RS2_STREAM_ANY
rs2_stream_RS2_STREAM_COLOR
< Native stream of color data captured by RealSense device
rs2_stream_RS2_STREAM_CONFIDENCE
< 4 bit per-pixel depth confidence level
rs2_stream_RS2_STREAM_COUNT
rs2_stream_RS2_STREAM_DEPTH
< Native stream of depth data produced by RealSense device
rs2_stream_RS2_STREAM_FISHEYE
< Native stream of fish-eye (wide) data captured from the dedicate motion camera
rs2_stream_RS2_STREAM_GPIO
< Signals from external device connected through GPIO
rs2_stream_RS2_STREAM_GYRO
< Native stream of gyroscope motion data produced by RealSense device
rs2_stream_RS2_STREAM_INFRARED
< Native stream of infrared data captured by RealSense device
rs2_stream_RS2_STREAM_MOTION
< Native stream of combined motion data (incl. accel & gyro)
rs2_stream_RS2_STREAM_POSE
< 6 Degrees of Freedom pose data, calculated by RealSense device
rs2_timestamp_domain_RS2_TIMESTAMP_DOMAIN_COUNT
< Number of enumeration values. Not a valid input: intended to be used in for-loops.
rs2_timestamp_domain_RS2_TIMESTAMP_DOMAIN_GLOBAL_TIME
< Frame timestamp was measured in relation to the camera clock and converted to OS system clock by constantly measure the difference
rs2_timestamp_domain_RS2_TIMESTAMP_DOMAIN_HARDWARE_CLOCK
< Frame timestamp was measured in relation to the camera clock
rs2_timestamp_domain_RS2_TIMESTAMP_DOMAIN_SYSTEM_TIME
< Frame timestamp was measured in relation to the OS system clock

Functions§

rs2_allocate_composite_frame
Allocate new composite frame, aggregating a set of existing frames \param[in] source Frame pool to allocate the frame from \param[in] frames Array of existing frames \param[in] count Number of input frames \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return reference to a newly allocated frame, must be released with release_frame when composite frame gets released it will automatically release all of the input frames
rs2_allocate_points
Allocate new points frame using a frame-source provided from a processing block \param[in] source Frame pool to allocate the frame from \param[in] new_stream New stream profile to assign to newly created frame \param[in] original A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable) \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return reference to a newly allocated frame, must be released with release_frame memory for the frame is likely to be re-used from previous frame, but in lack of available frames in the pool will be allocated from the free store
rs2_allocate_synthetic_motion_frame
Allocate new motion frame using a frame-source provided form a processing block \param[in] source Frame pool to allocate the frame from \param[in] new_stream New stream profile to assign to newly created frame \param[in] original A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable) \param[in] frame_type New value for frame type for the allocated frame \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return reference to a newly allocated frame, must be released with release_frame memory for the frame is likely to be re-used from previous frame, but in lack of available frames in the pool will be allocated from the free store
rs2_allocate_synthetic_video_frame
Allocate new video frame using a frame-source provided form a processing block \param[in] source Frame pool to allocate the frame from \param[in] new_stream New stream profile to assign to newly created frame \param[in] original A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable) \param[in] new_bpp New value for bits per pixel for the allocated frame \param[in] new_width New value for width for the allocated frame \param[in] new_height New value for height for the allocated frame \param[in] new_stride New value for stride in bytes for the allocated frame \param[in] frame_type New value for frame type for the allocated frame \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return reference to a newly allocated frame, must be released with release_frame memory for the frame is likely to be re-used from previous frame, but in lack of available frames in the pool will be allocated from the free store
rs2_ambient_light_to_string
rs2_build_debug_protocol_command
Build debug_protocol raw data command from opcode, parameters and data. The result can be used as raw_data_to_send parameter in send_and_receive_raw_data \param[in] device RealSense device to send data to \param[in] opcode Commad opcode \param[in] param1 First input parameter \param[in] param2 Second parameter \param[in] param3 Third parameter \param[in] param4 Fourth parameter \param[in] data Input Data (up to 1024 bytes) \param[in] size_of_data Size of input data in bytes \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return rs2_raw_data_buffer which includes raw command
rs2_calculate_target_z
Calculate Z for calibration target - distance to the target’s plane \param[in] queue1-3: A frame queue of raw images used to calculate and extract the distance to a predefined target pattern. For D400 the indexes 1-3 correspond to Left IR, Right IR and Depth with only the Left IR being used \param[in] target_width: Expected target’s horizontal dimension in mm \param[in] target_height: Expected target’s vertical dimension in mm \param[in] callback: Optional callback for reporting progress status \param[in] client_data: Optional client data for the callback \return Calculated distance (Z) to target in millimeter, or negative number if failed
rs2_calculate_target_z_cpp
Calculate Z for calibration target - distance to the target’s plane \param[in] queue1-3: A frame queue of raw images used to calculate and extract the distance to a predefined target pattern. For D400 the indexes 1-3 correspond to Left IR, Right IR and Depth with only the Left IR being used \param[in] target_width: Expected target’s horizontal dimension in mm \param[in] target_height: Expected target’s vertical dimension in mm \param[in] callback: Optional callback for reporting progress status \return Calculated distance (Z) to target in millimeter, or negative number if failed
rs2_calib_target_type_to_string
rs2_calibration_status_to_string
rs2_calibration_type_to_string
rs2_camera_info_to_string
rs2_check_firmware_compatibility
Checks if the device and the provided firmware image are compatible \param[in] device Device to update \param[in] fw_image Firmware image buffer \param[in] fw_image_size Firmware image buffer size in bytes \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Non-zero if the firmware is compatible with the device and 0 otherwise
rs2_clone_stream_profile
Creates a copy of stream profile, assigning new values to some of the fields \param[in] mode input stream profile \param[in] stream stream type for the profile \param[in] format binary data format of the profile \param[in] index stream index the profile in case there are multiple streams of the same type \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return new stream profile, must be deleted by rs2_delete_stream_profile
rs2_clone_video_stream_profile
Creates a copy of stream profile, assigning new values to some of the fields \param[in] mode input stream profile \param[in] stream stream type for the profile \param[in] format binary data format of the profile \param[in] width new width for the profile \param[in] height new height for the profile \param[in] intr new intrinsics for the profile \param[in] index stream index the profile in case there are multiple streams of the same type \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return new stream profile, must be deleted by rs2_delete_stream_profile
rs2_close
stop any streaming from specified subdevice \param[in] sensor RealSense device \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_config_can_resolve
Check if the config can resolve the configuration filters, to find a matching device and streams profiles. The resolution conditions are as described in \c resolve().
rs2_config_disable_all_streams
Disable all device stream explicitly, to remove any requests on the streams profiles. The streams can still be enabled due to pipeline computer vision module request. This call removes any filter on the streams configuration.
rs2_config_disable_indexed_stream
Disable a device stream explicitly, to remove any requests on this stream profile. The stream can still be enabled due to pipeline computer vision module request. This call removes any filter on the stream configuration.
rs2_config_disable_stream
Disable a device stream explicitly, to remove any requests on this stream type. The stream can still be enabled due to pipeline computer vision module request. This call removes any filter on the stream configuration.
rs2_config_enable_all_stream
Enable all device streams explicitly. The conditions and behavior of this method are similar to those of \c enable_stream(). This filter enables all raw streams of the selected device. The device is either selected explicitly by the application, or by the pipeline requirements or default. The list of streams is device dependent.
rs2_config_enable_device
Select a specific device explicitly by its serial number, to be used by the pipeline. The conditions and behavior of this method are similar to those of \c enable_stream(). This method is required if the application needs to set device or sensor settings prior to pipeline streaming, to enforce the pipeline to use the configured device.
rs2_config_enable_device_from_file
Select a recorded device from a file, to be used by the pipeline through playback. The device available streams are as recorded to the file, and \c resolve() considers only this device and configuration as available. This request cannot be used if enable_record_to_file() is called for the current config, and vise versa By default, playback is repeated once the file ends. To control this, see ‘rs2_config_enable_device_from_file_repeat_option’.
rs2_config_enable_device_from_file_repeat_option
Select a recorded device from a file, to be used by the pipeline through playback. The device available streams are as recorded to the file, and \c resolve() considers only this device and configuration as available. This request cannot be used if enable_record_to_file() is called for the current config, and vise versa
rs2_config_enable_record_to_file
Requires that the resolved device would be recorded to file This request cannot be used if enable_device_from_file() is called for the current config, and vise versa
rs2_config_enable_stream
Enable a device stream explicitly, with selected stream parameters. The method allows the application to request a stream with specific configuration. If no stream is explicitly enabled, the pipeline configures the device and its streams according to the attached computer vision modules and processing blocks requirements, or default configuration for the first available device. The application can configure any of the input stream parameters according to its requirement, or set to 0 for don’t care value. The config accumulates the application calls for enable configuration methods, until the configuration is applied. Multiple enable stream calls for the same stream with conflicting parameters override each other, and the last call is maintained. Upon calling \c resolve(), the config checks for conflicts between the application configuration requests and the attached computer vision modules and processing blocks requirements, and fails if conflicts are found. Before \c resolve() is called, no conflict check is done.
rs2_config_resolve
Resolve the configuration filters, to find a matching device and streams profiles. The method resolves the user configuration filters for the device and streams, and combines them with the requirements of the computer vision modules and processing blocks attached to the pipeline. If there are no conflicts of requests, it looks for an available device, which can satisfy all requests, and selects the first matching streams configuration. In the absence of any request, the rs2::config selects the first available device and the first color and depth streams configuration. The pipeline profile selection during \c start() follows the same method. Thus, the selected profile is the same, if no change occurs to the available devices occurs. Resolving the pipeline configuration provides the application access to the pipeline selected device for advanced control. The returned configuration is not applied to the device, so the application doesn’t own the device sensors. However, the application can call \c enable_device(), to enforce the device returned by this method is selected by pipeline \c start(), and configure the device and sensors options or extensions before streaming starts.
rs2_connect_tm2_controller
Connects to a given tm2 controller \param[in] device Device to connect to the controller \param[in] mac_addr The MAC address of the desired controller \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_context_add_device
Create a new device and add it to the context \param ctx The context to which the new device will be added \param file The file from which the device should be created \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored @return A pointer to a device that plays data from the file, or null in case of failure
rs2_context_add_software_device
Add an instance of software device to the context \param ctx The context to which the new device will be added \param dev Instance of software device to register into the context \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_context_remove_device
Removes a playback device from the context, if exists \param[in] ctx The context from which the device should be removed \param[in] file The file name that was used to add the device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_context_unload_tracking_module
Removes tracking module. function query_devices() locks the tracking module in the tm_context object. If the tracking module device is not used it should be removed using this function, so that other applications could find it. This function can be used both before the call to query_device() to prevent enabling tracking modules or afterwards to release them.
rs2_create_align
Creates Align processing block. \param[in] align_to stream type to be used as the target of frameset alignment \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_colorizer
Creates Depth-Colorizer processing block that can be used to quickly visualize the depth data This block will accept depth frames as input and replace them by depth frames with format RGB8 Non-depth frames are passed through Further customization will be added soon (format, color-map, histogram equalization control) \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_config
Create a config instance The config allows pipeline users to request filters for the pipeline streams and device selection and configuration. This is an optional step in pipeline creation, as the pipeline resolves its streaming device internally. Config provides its users a way to set the filters and test if there is no conflict with the pipeline requirements from the device. It also allows the user to find a matching device for the config filters and the pipeline, in order to select a device explicitly, and modify its controls before streaming starts.
rs2_create_context
\brief Creates RealSense context that is required for the rest of the API. Context settings are taken from the library configuration file’s ‘context’ key. \param[in] api_version Users are expected to pass their version of \c RS2_API_VERSION to make sure they are running the correct librealsense version. \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored. \return Context object
rs2_create_context_ex
\brief Creates RealSense context that is required for the rest of the API, and accepts a settings JSON. \param[in] api_version Users are expected to pass their version of \c RS2_API_VERSION to make sure they are running the correct librealsense version. \param[in] json_settings Pointer to a string containing a JSON configuration to use, or null if none Possible : : inherit: true - (bool) whether to inherit and override library configuration file values: the ‘context’ key in the file is taken as-is ‘/context’ is merged, if it exists then the context-settings are merged dds: {} - DDS settings: (requires BUILD_WITH_DDS) enabled: false - (bool) whether DDS is enabled domain: 0 - (int) the number of the DDS domain [0-232] participant: - (string) the name of the participant (see additional settings in realdds/doc/device.md#Settings) format-conversion: full - (string) how to convert formats full: provide all conversions (e.g., YUYV -> RGB8 etc.) basic: use mostly raw camera formats (no RGB8 etc.); convert interleaved (Y8I -> 2xY8) raw: leave all formats from camera as they are options-update-interval: 1000 - (uint32_t) time interval in milliseconds for option value change notifications (see rs2_set_options_changed_callback) \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored. \return Context object
rs2_create_decimation_filter_block
Creates Depth post-processing filter block. This block accepts depth frames, applies decimation filter and plots modified prames Note that due to the modifiedframe size, the decimated frame repaces the original one \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_device
Creates a device by index. The device object represents a physical camera and provides the means to manipulate it. \param[in] info_list the list containing the device to retrieve \param[in] index The zero based index of device to retrieve \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return The requested device, should be released by rs2_delete_device
rs2_create_device_from_sensor
This is a helper function allowing the user to discover the device from one of its sensors \param[in] sensor Pointer to a sensor \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return new device wrapper for the device of the sensor. Needs to be released by delete_device
rs2_create_device_hub
\brief Creates RealSense device_hub . \param[in] context The context for the device hub \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored. \return Device hub object
rs2_create_disparity_transform_block
Creates a post processing block that provides for depth<->disparity domain transformation for stereo-based depth modules \param[in] transform_to_disparity flag select the transform direction: true = depth->disparity, and vice versa \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_error
rs2_create_flash_backup
Create backup of camera flash memory. Such backup does not constitute valid firmware image, and cannot be loaded back to the device, but it does contain all calibration and device information. \param[in] device Device to update \param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1 \param[in] client_data Optional client data for the callback \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_flash_backup_cpp
Create backup of camera flash memory. Such backup does not constitute valid firmware image, and cannot be loaded back to the device, but it does contain all calibration and device information. \param[in] device Device to update \param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1 \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_frame_queue
create frame queue. frame queues are the simplest x-platform synchronization primitive provided by librealsense to help developers who are not using async APIs \param[in] capacity max number of frames to allow to be stored in the queue before older frames will start to get dropped \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return handle to the frame queue, must be released using rs2_delete_frame_queue
rs2_create_hdr_merge_processing_block
Creates a hdr_merge processing block. The block merges between two depth frames with different exposure values \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_hole_filling_filter_block
Creates Depth post-processing hole filling block. The filter replaces empty pixels with data from adjacent pixels based on the method selected \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_huffman_depth_decompress_block
Creates Depth frame decompression module. Decoded frames compressed and transmitted with Z16H variable-lenght Huffman code to standartized Z16 Depth data format. Using the compression allows to reduce the Depth frames bandwidth by more than 50 percent \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Huffman-code decompression processing block
rs2_create_pipeline
Create a pipeline instance The pipeline simplifies the user interaction with the device and computer vision processing modules. The class abstracts the camera configuration and streaming, and the vision modules triggering and threading. It lets the application focus on the computer vision output of the modules, or the device output data. The pipeline can manage computer vision modules, which are implemented as a processing blocks. The pipeline is the consumer of the processing block interface, while the application consumes the computer vision interface. \param[in] ctx context \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_playback_device
Creates a playback device to play the content of the given file \param[in] file Path to the file to play \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return A pointer to a device that plays data from the file, or null in case of failure
rs2_create_pointcloud
Creates Point-Cloud processing block. This block accepts depth frames and outputs Points frames In addition, given non-depth frame, the block will align texture coordinate to the non-depth stream \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_processing_block
This method creates new custom processing block. This lets the users pass frames between module boundaries for processing This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as sync, colorizer, etc.. \param proc Processing function to be applied to every frame entering the block \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return new processing block, to be released by rs2_delete_processing_block
rs2_create_processing_block_fptr
This method creates new custom processing block from function pointer. This lets the users pass frames between module boundaries for processing This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as sync, colorizer, etc.. \param proc Processing function pointer to be applied to every frame entering the block \param context User context (can be anything or null) to be passed later as ctx param of the callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return new processing block, to be released by rs2_delete_processing_block
rs2_create_rates_printer_block
Creates a rates printer block. The printer prints the actual FPS of the invoked frame stream. The block ignores reapiting frames and calculats the FPS only if the frame number of the relevant frame was changed. \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_record_device
Creates a recording device to record the given device and save it to the given file \param[in] device The device to record \param[in] file The desired path to which the recorder should save the data \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return A pointer to a device that records its data to file, or null in case of failure
rs2_create_record_device_ex
Creates a recording device to record the given device and save it to the given file \param[in] device The device to record \param[in] file The desired path to which the recorder should save the data \param[in] compression_enabled Indicates if compression is enabled, 0 means false, otherwise true \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return A pointer to a device that records its data to file, or null in case of failure
rs2_create_rotation_filter_block
Creates post-processing filter block. This block accepts frames and applies rotation filter \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_sensor
create sensor by index \param[in] index the zero based index of sensor to retrieve \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the requested sensor, should be released by rs2_delete_sensor
rs2_create_sequence_id_filter
Creates a sequence_id_filter processing block. The block lets frames with the selected sequence id pass and blocks frames with other values \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_spatial_filter_block
Creates Depth post-processing spatial filter block. This block accepts depth frames, applies spatial filters and plots modified prames \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_sync_processing_block
Creates Sync processing block. This block accepts arbitrary frames and output composite frames of best matches Some frames may be released within the syncer if they are waiting for match for too long Syncronization is done (mostly) based on timestamps so good hardware timestamps are a pre-condition \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_temporal_filter_block
Creates Depth post-processing filter block. This block accepts depth frames, applies temporal filter \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_threshold
Creates depth thresholding processing block By controlling min and max options on the block, one could filter out depth values that are either too large or too small, as a software post-processing step \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_units_transform
Creates depth units transformation processing block All of the pixels are transformed from depth units into meters. \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_y411_decoder
Creates y411 decoder processing block. This block accepts raw y411 frames and outputs frames in RGB8. https://www.fourcc.org/pixel-format/yuv-y411/ Y411 is disguised as NV12 to allow Linux compatibility. Both are 12bpp encodings that allow high-resolution modes in the camera to still fit within the USB3 limits (YUY wasn’t enough).
rs2_create_yuy_decoder
Creates YUY decoder processing block. This block accepts raw YUY frames and outputs frames of other formats. YUY is a common video format used by a variety of web-cams. It benefits from packing pixels into 2 bytes per pixel without signficant quality drop. YUY representation can be converted back to more usable RGB form, but this requires somewhat costly conversion. The SDK will automatically try to use SSE2 and AVX instructions and CUDA where available to get best performance. Other implementations (using GLSL, OpenCL, Neon and NCS) should follow. \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_create_zero_order_invalidation_block
Creates Depth post-processing zero order fix block. The filter invalidates pixels that has a wrong value due to zero order effect \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return zero order fix processing block
rs2_delete_config
Deletes an instance of a config
rs2_delete_context
\brief Frees the relevant context object. \param[in] context Object that is no longer needed
rs2_delete_device
Delete RealSense device \param[in] device Realsense device to delete
rs2_delete_device_hub
\brief Frees the relevant device hub object. \param[in] hub Object that is no longer needed
rs2_delete_device_list
Deletes device list, any devices created using this list will remain unaffected. \param[in] info_list List to delete
rs2_delete_frame_queue
deletes frame queue and releases all frames inside it \param[in] queue queue to delete
rs2_delete_option_value
Clean up a value and all it points to \param[in] handle value to delete
rs2_delete_options_list
Deletes options list \param[in] list list to delete
rs2_delete_pipeline
Delete a pipeline instance. Upon destruction, the pipeline will implicitly stop itself \param[in] pipe to delete
rs2_delete_pipeline_profile
Deletes an instance of a pipeline profile
rs2_delete_processing_block
Deletes the processing block \param[in] block Processing block
rs2_delete_raw_data
Delete rs2_raw_data_buffer \param[in] buffer rs2_raw_data_buffer returned by rs2_send_and_receive_raw_data
rs2_delete_recommended_processing_blocks
Deletes processing blocks list \param[in] list list to delete
rs2_delete_sensor
delete relasense sensor \param[in] sensor realsense sensor to delete
rs2_delete_sensor_list
Deletes sensors list, any sensors created from this list will remain unaffected \param[in] info_list list to delete
rs2_delete_stream_profile
Delete stream profile allocated by rs2_clone_stream_profile Should not be called on stream profiles returned by the device \param[in] mode input stream profile
rs2_delete_stream_profiles_list
delete stream profiles list \param[in] list the list of supported profiles returned by rs2_get_supported_profiles
rs2_deproject_pixel_to_point
rs2_depth_auto_exposure_mode_to_string
rs2_depth_frame_get_distance
Given the 2D depth coordinate (x,y) provide the corresponding depth in metric units \param[in] frame_ref 2D depth pixel coordinates (Left-Upper corner origin) \param[in] x,y 2D depth pixel coordinates (Left-Upper corner origin) \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_depth_frame_get_units
retrieve the scaling factor to use when converting a depth frame’s get_data() units to meters \return float - depth, in meters, per 1 unit stored in the frame data
rs2_depth_stereo_frame_get_baseline
Retrieve the stereoscopic baseline value from frame. Applicable to stereo-based depth modules \param[out] float Stereoscopic baseline in millimeters \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_device_hub_is_device_connected
Checks if device is still connected \param[in] hub The device hub object \param[in] device The device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored. \return 1 if the device is connected, 0 otherwise
rs2_device_hub_wait_for_device
If any device is connected return it, otherwise wait until next RealSense device connects. Calling this method multiple times will cycle through connected devices \param[in] ctx The context to creat the device \param[in] hub The device hub object \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored. \return device object
rs2_device_is_connected
\param[in] device Realsense device to query \return True if device is still present in the system
rs2_device_list_contains
Checks if a specific device is contained inside a device list. \param[in] info_list The list of devices to check in \param[in] device RealSense device to check for \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return True if the device is in the list and false otherwise
rs2_digital_gain_to_string
rs2_disconnect_tm2_controller
Disconnects a given tm2 controller \param[in] device Device to disconnect the controller from \param[in] id The ID of the desired controller \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_distortion_to_string
rs2_embedded_frames_count
Get number of frames embedded within a composite frame \param[in] composite Composite input frame \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Number of embedded frames
rs2_emitter_frequency_mode_to_string
rs2_enable_rolling_log_file
Enable rolling log file when used with rs2_log_to_file: Upon reaching (max_size/2) bytes, the log will be renamed with an “.old” suffix and a new log created. Any previous .old file will be erased. Must have permissions to remove/rename files in log file directory. \param[in] max_size max file size in megabytes \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_enqueue_frame
enqueue new frame into a queue \param[in] frame frame handle to enqueue (this operation passed ownership to the queue) \param[in] queue the frame queue data structure
rs2_enter_update_state
Enter the device to update state, this will cause the updatable device to disconnect and reconnect as update device. \param[in] device Device to update \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_exception_type_to_string
rs2_export_localization_map
rs2_export_to_ply
When called on Points frame type, this method creates a ply file of the model with the given file name. \param[in] frame Points frame \param[in] fname The name for the ply file \param[in] texture Texture frame \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_extension_to_string
rs2_extension_type_to_string
rs2_extract_frame
Extract frame from within a composite frame \param[in] composite Composite frame \param[in] index Index of the frame to extract within the composite frame \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return returns reference to a frame existing within the composite frame If you wish to keep this frame after the composite is released, you need to call acquire_ref Otherwise the resulting frame lifetime is bound by owning composite frame
rs2_extract_target_dimensions
Extract the target dimensions on the specific target \param[in] frame Left or right camera frame of specified size based on the target type \param[in] calib_type Calibration target type \param[in] target_dims_size Target dimension array size. 4 for RS2_CALIB_TARGET_RECT_GAUSSIAN_DOT_VERTICES and 8 for RS2_CALIB_TARGET_POS_GAUSSIAN_DOT_VERTICES. \param[out] target_dims The array to hold the result target dimensions calculated. For type RS2_CALIB_TARGET_RECT_GAUSSIAN_DOT_VERTICES, the four rectangle side sizes in pixels with the order of top, bottom, left, and right For type RS2_CALIB_TARGET_POS_GAUSSIAN_DOT_VERTICES, the four vertices coordinates in pixels with the order of top, bottom, left, and right \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_format_to_string
rs2_fov
rs2_frame_add_ref
create additional reference to a frame without duplicating frame data \param[in] frame handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return new frame reference, has to be released by rs2_release_frame
rs2_frame_metadata_to_string
rs2_frame_metadata_value_to_string
rs2_frame_queue_size
queries the number of frames \param[in] queue to delete \returns the number of frames currently stored in queue
rs2_free_error
rs2_get_active_streams
check how subdevice is streaming \param[in] sensor input RealSense subdevice \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return list of stream profiles that given subdevice is currently streaming, should be released by rs2_delete_profiles_list
rs2_get_api_version
Retrieve the API version from the source code. Evaluate that the value is conformant to the established policies \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the version API encoded into integer value “1.9.3” -> 10903
rs2_get_calibration_config
rs2_get_calibration_config \param[in] device Device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return JSON string representing the calibration config as rs2_raw_data_buffer
rs2_get_calibration_table
Read current calibration table from flash. \return Calibration table
rs2_get_debug_stream_profiles
retrieve list of debug stream profiles that given subdevice can provide \param[in] sensor input RealSense subdevice \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return list of debug stream profiles that given subdevice can provide, should be released by rs2_delete_profiles_list
rs2_get_depth_scale
When called on a depth sensor, this method will return the number of meters represented by a single depth unit \param[in] sensor depth sensor \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the number of meters represented by a single depth unit
rs2_get_device_count
Determines number of devices in a list. \param[in] info_list The list of connected devices captured using rs2_query_devices \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Device count
rs2_get_device_info
Retrieve camera specific information, like versions of various internal components. \param[in] device The RealSense device \param[in] info Camera info type to retrieve \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return The requested camera info string, in a format specific to the device model
rs2_get_error_message
rs2_get_extrinsics
\param[in] from origin stream profile \param[in] to target stream profile \param[out] extrin extrinsics from origin to target \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_get_failed_args
rs2_get_failed_function
rs2_get_frame_bits_per_pixel
retrieve bits per pixels in the frame image (note that bits per pixel is not necessarily divided by 8, as in 12bpp) \param[in] frame handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return bits per pixel
rs2_get_frame_data
retrieve data from frame handle \param[in] frame handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the pointer to the start of the frame data
rs2_get_frame_data_size
retrieve data size from frame handle \param[in] frame handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the size of the frame data
rs2_get_frame_height
retrieve frame height in pixels \param[in] frame handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return frame height in pixels
rs2_get_frame_metadata
retrieve metadata from frame handle \param[in] frame handle returned from a callback \param[in] frame_metadata the rs2_frame_metadata whose latest frame we are interested in \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the metadata value
rs2_get_frame_number
retrieve frame number from frame handle \param[in] frame handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the frame number
rs2_get_frame_points_count
When called on Points frame type, this method returns the number of vertices in the frame \param[in] frame Points frame \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Number of vertices
rs2_get_frame_sensor
retrieve frame parent sensor from frame handle \param[in] frame handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the parent sensor of the frame
rs2_get_frame_stream_profile
Returns the stream profile that was used to start the stream of this frame \param[in] frame frame reference, owned by the user \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Pointer to the stream profile object, lifetime is managed elsewhere
rs2_get_frame_stride_in_bytes
retrieve frame stride in bytes (number of bytes from start of line N to start of line N+1) \param[in] frame handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return stride in bytes
rs2_get_frame_texture_coordinates
When called on Points frame type, this method returns a pointer to an array of texture coordinates per vertex Each coordinate represent a (u,v) pair within [0,1] range, to be mapped to texture image \param[in] frame Points frame \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Pointer to an array of texture coordinates, lifetime is managed by the frame
rs2_get_frame_timestamp
retrieve timestamp from frame handle in milliseconds \param[in] frame handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the timestamp of the frame in milliseconds
rs2_get_frame_timestamp_domain
retrieve timestamp domain from frame handle. timestamps can only be comparable if they are in common domain (for example, depth timestamp might come from system time while color timestamp might come from the device) this method is used to check if two timestamp values are comparable (generated from the same clock) \param[in] frameset handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the timestamp domain of the frame (camera / microcontroller / system time)
rs2_get_frame_vertices
When called on Points frame type, this method returns a pointer to an array of 3D vertices of the model The coordinate system is: X right, Y up, Z away from the camera. Units: Meters \param[in] frame Points frame \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Pointer to an array of vertices, lifetime is managed by the frame
rs2_get_frame_width
retrieve frame width in pixels \param[in] frame handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return frame width in pixels
rs2_get_full_log_message
rs2_get_librealsense_exception_type
rs2_get_log_message_filename
rs2_get_log_message_line_number
rs2_get_max_usable_depth_range
When called on a depth sensor, this method will return the maximum range of the camera given the amount of ambient light in the scene \param[in] sensor depth sensor \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the max usable range in meters
rs2_get_motion_intrinsics
Obtain the intrinsics of a specific stream configuration from the device. \param[in] mode input stream profile \param[out] intrinsics Pointer to the struct to store the data in \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_get_notification_category
retrieve category from notification handle \param[in] notification handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the notification category
rs2_get_notification_description
retrieve description from notification handle \param[in] notification handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the notification description
rs2_get_notification_serialized_data
retrieve serialized data from notification handle \param[in] notification handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the serialized data (in JSON format)
rs2_get_notification_severity
retrieve severity from notification handle \param[in] notification handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the notification severity
rs2_get_notification_timestamp
retrieve timestamp from notification handle \param[in] notification handle returned from a callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the notification timestamp
rs2_get_option
read option value from the sensor \param[in] options the options container \param[in] option option id to be queried \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return value of the option
rs2_get_option_description
get option description \param[in] options the options container \param[in] option option id to be checked \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return human-readable option description
rs2_get_option_from_list
get the specific option from options list \param[in] i the index of the option \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the option ID
rs2_get_option_name
get option name \param[in] options the options container \param[in] option option id to be checked \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return human-readable option name
rs2_get_option_range
retrieve the available range of values of a supported option \param[in] sensor the RealSense device \param[in] option the option whose range should be queried \param[out] min the minimum value which will be accepted for this option \param[out] max the maximum value which will be accepted for this option \param[out] step the granularity of options which accept discrete values, or zero if the option accepts continuous values \param[out] def the default value of the option \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_get_option_value
read option value from the sensor \param[in] options the options container \param[in] option_id option id to be queried \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return pointer to the value structure of the option; use rs2_delete_option_value to clean up
rs2_get_option_value_description
get option value description (in case specific option value hold special meaning) \param[in] options the options container \param[in] option option id to be checked \param[in] value value of the option \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return human-readable description of a specific value of an option or null if no special meaning
rs2_get_option_value_from_list
get the specific option from options list \param[in] i the index of the option \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return temporary (goes away with the options-list) pointer to the option-value struct
rs2_get_options_list
get the list of supported options of options container \param[in] options the options container \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_get_options_list_size
get the size of options list \param[in] options the option list \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_get_processing_block
Returns specific processing blocks from processing blocks list \param[in] list the processing blocks list \param[in] index the requested processing block \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return processing block
rs2_get_processing_block_info
Retrieve processing block specific information, like name. \param[in] block The processing block \param[in] info processing block info type to retrieve \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return The requested processing block info string, in a format specific to the device model
rs2_get_raw_data
Retrieve char array from rs2_raw_data_buffer \param[in] buffer rs2_raw_data_buffer returned by rs2_send_and_receive_raw_data \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return raw data
rs2_get_raw_data_size
get the size of rs2_raw_data_buffer \param[in] buffer pointer to rs2_raw_data_buffer returned by rs2_send_and_receive_raw_data \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return size of rs2_raw_data_buffer
rs2_get_raw_log_message
rs2_get_recommended_processing_blocks
Returns the list of recommended processing blocks for a specific sensor. Order and configuration of the blocks are decided by the sensor \param[in] sensor input sensor \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return list of supported sensor recommended processing blocks
rs2_get_recommended_processing_blocks_count
Returns the processing blocks list size \param[in] list the processing blocks list \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the processing block list size
rs2_get_region_of_interest
\brief gets the active region of interest to be used by auto-exposure algorithm \param[in] sensor the RealSense sensor \param[out] min_x lower horizontal bound in pixels \param[out] min_y lower vertical bound in pixels \param[out] max_x upper horizontal bound in pixels \param[out] max_y upper vertical bound in pixels \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_get_sensor_info
retrieve sensor specific information, like versions of various internal components \param[in] sensor the RealSense sensor \param[in] info camera info type to retrieve \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the requested camera info string, in a format specific to the device model
rs2_get_sensors_count
Determines number of sensors in a list \param[in] info_list The list of connected sensors captured using rs2_query_sensors \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Sensors count
rs2_get_static_node
Retrieve a named location tag \param[in] sensor T2xx position-tracking sensor \param[in] guid Null-terminated string of up to 127 characters \param[out] pos Position in meters of the tagged (stored) location \param[out] orient Quaternion orientation of the tagged (stored) location \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Non-zero if succeeded, otherwise 0
rs2_get_stereo_baseline
Retrieve the stereoscopic baseline value from sensor. Applicable to stereo-based depth modules \param[out] float Stereoscopic baseline in millimeters \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_get_stream_profile
Get pointer to specific stream profile \param[in] list the list of supported profiles returned by rs2_get_supported_profiles \param[in] index the zero based index of the streaming mode \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_get_stream_profile_data
Extract common parameters of a stream profiles \param[in] mode input stream profile \param[out] stream stream type of the input profile \param[out] format binary data format of the input profile \param[out] index stream index the input profile in case there are multiple streams of the same type \param[out] unique_id identifier for the stream profile, unique within the application \param[out] framerate expected rate for data frames to arrive, meaning expected number of frames per second \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_get_stream_profile_name
Returns the stream profile name \param[in] profile stream profile whose name we want to get \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Stream name, as a null terminated string
rs2_get_stream_profiles
check if physical subdevice is supported \param[in] sensor input RealSense subdevice \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return list of stream profiles that given subdevice can provide, should be released by rs2_delete_profiles_list
rs2_get_stream_profiles_count
get the number of supported stream profiles \param[in] list the list of supported profiles returned by rs2_get_supported_profiles \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return number of supported subdevice profiles
rs2_get_time
return the time at specific time point \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the time at specific time point, in live and record mode it will return the system time and in playback mode it will return the recorded time
rs2_get_video_stream_intrinsics
When called on a video profile, returns the intrinsics of specific stream configuration \param[in] mode input stream profile \param[out] intrinsics resulting intrinsics for the video profile \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_get_video_stream_resolution
When called on a video stream profile, will return the width and the height of the stream \param[in] mode input stream profile \param[out] width width in pixels of the video stream \param[out] height height in pixels of the video stream \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_gyro_sensitivity_to_string
rs2_hardware_reset
Send hardware reset request to the device. The actual reset is asynchronous. Note: Invalidates all handles to this device. \param[in] device The RealSense device to reset \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_host_perf_mode_to_string
rs2_hw_monitor_get_opcode_string
rs2_import_localization_map
Imports a localization map from file to tm2 tracking device \param[in] sensor TM2 position-tracking sensor \param[in] lmap_blob Localization map raw buffer, serialized \param[in] blob_size The buffer’s size in bytes \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Non-zero if succeeded, otherwise 0
rs2_is_device_extendable_to
Test if the given device can be extended to the requested extension. \param[in] device Realsense device \param[in] extension The extension to which the device should be tested if it is extendable \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Non-zero value iff the device can be extended to the given extension
rs2_is_frame_extendable_to
Test if the given frame can be extended to the requested extension \param[in] frame Realsense frame \param[in] extension_type The extension to which the frame should be tested if it is extendable \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return non-zero value iff the frame can be extended to the given extension
rs2_is_option_read_only
check if an option is read-only \param[in] options the options container \param[in] option option id to be checked \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return true if option is read-only
rs2_is_processing_block_extendable_to
Test if the given processing block can be extended to the requested extension \param[in] block processing block \param[in] extension The extension to which the sensor should be tested if it is extendable \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return non-zero value iff the processing block can be extended to the given extension
rs2_is_sensor_extendable_to
Test if the given sensor can be extended to the requested extension \param[in] sensor Realsense sensor \param[in] extension The extension to which the sensor should be tested if it is extendable \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return non-zero value iff the sensor can be extended to the given extension
rs2_is_stream_profile_default
Returns non-zero if selected profile is recommended for the sensor This is an optional hint we offer to suggest profiles with best performance-quality tradeof \param[in] mode input stream profile \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return non-zero if selected profile is recommended for the sensor
rs2_keep_frame
communicate to the library you intend to keep the frame alive for a while this will remove the frame from the regular count of the frame pool once this function is called, the SDK can no longer guarantee 0-allocations during frame cycling \param[in] frame handle returned from a callback
rs2_l500_visual_preset_to_string
rs2_load_json
rs2_load_wheel_odometry_config
Load Wheel odometer settings from host to device \param[in] odometry_config_buf odometer configuration/calibration blob serialized from jsom file \return true on success
rs2_log
Add custom message into librealsense log \param[in] severity The log level for the message to be written under \param[in] message Message to be logged \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_log_severity_to_string
rs2_log_to_callback
rs2_log_to_callback_cpp
rs2_log_to_console
rs2_log_to_file
rs2_loopback_disable
Restores the given device into normal operation mode \param[in] device Device to restore to normal operation mode \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_loopback_enable
Enter the given device into loopback operation mode that uses the given file as input for raw data \param[in] device Device to enter into loopback operation mode \param[in] from_file Path to bag file with raw data for loopback \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_loopback_is_enabled
Checks if the device is in loopback mode or not \param[in] device Device to check for operation mode \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return true if the device is in loopback operation mode
rs2_matchers_to_string
rs2_notification_category_to_string
rs2_open
open subdevice for exclusive access, by committing to a configuration \param[in] device relevant RealSense device \param[in] profile stream profile that defines single stream configuration \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_open_multiple
open subdevice for exclusive access, by committing to composite configuration, specifying one or more stream profiles this method should be used for interdependent streams, such as depth and infrared, that have to be configured together \param[in] device relevant RealSense device \param[in] profiles list of stream profiles discovered by get_stream_profiles \param[in] count number of simultaneous stream profiles to configure \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_option_from_string
Get the specific rs2_option identifier given its name if found, or RS2_OPTION_COUNT if not. See rs2_option_to_string() for the reverse. \param[in] option_name the case-sensitive option name
rs2_option_to_string
Returns the option name if the option exists, or “UNKNOWN” otherwise. See rs2_option_from_string() for the reverse. \param[in] option the option identifier
rs2_option_type_to_string
Returns the option type as a string, or “UNKNOWN” otherwise. \param[in] type the option type identifier
rs2_override_extrinsics
\brief Override extrinsics of a given sensor that supports calibrated_sensor.
rs2_override_intrinsics
\brief Override intrinsics of a given sensor that supports calibrated_sensor.
rs2_pipeline_get_active_profile
Return the active device and streams profiles, used by the pipeline. The pipeline streams profiles are selected during \c start(). The method returns a valid result only when the pipeline is active - between calls to \c start() and \c stop(). After \c stop() is called, the pipeline doesn’t own the device, thus, the pipeline selected device may change in subsequent activations.
rs2_pipeline_poll_for_frames
Check if a new set of frames is available and retrieve the latest undelivered set. The frames set includes time-synchronized frames of each enabled stream in the pipeline. The method returns without blocking the calling thread, with status of new frames available or not. If available, it fetches the latest frames set. Device frames, which were produced while the function wasn’t called, are dropped. To avoid frame drops, this method should be called as fast as the device frame rate. The application can maintain the frames handles to defer processing. However, if the application maintains too long history, the device may lack memory resources to produce new frames, and the following calls to this method shall return no new frames, until resources are retained. \param[in] pipe the pipeline \param[out] output_frame frame handle to be released using rs2_release_frame \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return true if new frame was stored to output_frame
rs2_pipeline_profile_get_device
Retrieve the device used by the pipeline. The device class provides the application access to control camera additional settings - get device information, sensor options information, options value query and set, sensor specific extensions. Since the pipeline controls the device streams configuration, activation state and frames reading, calling the device API functions, which execute those operations, results in unexpected behavior. The pipeline streaming device is selected during pipeline \c start(). Devices of profiles, which are not returned by pipeline \c start() or \c get_active_profile(), are not guaranteed to be used by the pipeline.
rs2_pipeline_profile_get_streams
Return the selected streams profiles, which are enabled in this profile.
rs2_pipeline_set_device
Set the device to be used in the pipline. The function is used to assign the device, useful when the user wish to set controls that cannot be set while streaming. \param[in] pipe the pipeline. \param[in] device the device to be used in the pipline.
rs2_pipeline_start
Start the pipeline streaming with its default configuration. The pipeline streaming loop captures samples from the device, and delivers them to the attached computer vision modules and processing blocks, according to each module requirements and threading model. During the loop execution, the application can access the camera streams by calling \c wait_for_frames() or \c poll_for_frames(). The streaming loop runs until the pipeline is stopped. Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised.
rs2_pipeline_start_with_callback
Start the pipeline streaming with its default configuration. The pipeline captures samples from the device, and delivers them to the through the provided frame callback. Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised. When starting the pipeline with a callback both \c wait_for_frames() or \c poll_for_frames() will throw exception.
rs2_pipeline_start_with_callback_cpp
Start the pipeline streaming with its default configuration. The pipeline captures samples from the device, and delivers them to the through the provided frame callback. Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised. When starting the pipeline with a callback both \c wait_for_frames() or \c poll_for_frames() will throw exception.
rs2_pipeline_start_with_config
Start the pipeline streaming according to the configuraion. The pipeline streaming loop captures samples from the device, and delivers them to the attached computer vision modules and processing blocks, according to each module requirements and threading model. During the loop execution, the application can access the camera streams by calling \c wait_for_frames() or \c poll_for_frames(). The streaming loop runs until the pipeline is stopped. Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised. The pipeline selects and activates the device upon start, according to configuration or a default configuration. When the rs2::config is provided to the method, the pipeline tries to activate the config \c resolve() result. If the application requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails. Available configurations and devices may change between config \c resolve() call and pipeline start, in case devices are connected or disconnected, or another application acquires ownership of a device.
rs2_pipeline_start_with_config_and_callback
Start the pipeline streaming according to the configuraion. The pipeline captures samples from the device, and delivers them to the through the provided frame callback. Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised. When starting the pipeline with a callback both \c wait_for_frames() or \c poll_for_frames() will throw exception. The pipeline selects and activates the device upon start, according to configuration or a default configuration. When the rs2::config is provided to the method, the pipeline tries to activate the config \c resolve() result. If the application requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails. Available configurations and devices may change between config \c resolve() call and pipeline start, in case devices are connected or disconnected, or another application acquires ownership of a device.
rs2_pipeline_start_with_config_and_callback_cpp
Start the pipeline streaming according to the configuraion. The pipeline captures samples from the device, and delivers them to the through the provided frame callback. Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised. When starting the pipeline with a callback both \c wait_for_frames() or \c poll_for_frames() will throw exception. The pipeline selects and activates the device upon start, according to configuration or a default configuration. When the rs2::config is provided to the method, the pipeline tries to activate the config \c resolve() result. If the application requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails. Available configurations and devices may change between config \c resolve() call and pipeline start, in case devices are connected or disconnected, or another application acquires ownership of a device.
rs2_pipeline_stop
Stop the pipeline streaming. The pipeline stops delivering samples to the attached computer vision modules and processing blocks, stops the device streaming and releases the device resources used by the pipeline. It is the application’s responsibility to release any frame reference it owns. The method takes effect only after \c start() was called, otherwise an exception is raised. \param[in] pipe pipeline \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_pipeline_try_wait_for_frames
Wait until a new set of frames becomes available. The frames set includes time-synchronized frames of each enabled stream in the pipeline. The method blocks the calling thread, and fetches the latest unread frames set. Device frames, which were produced while the function wasn’t called, are dropped. To avoid frame drops, this method should be called as fast as the device frame rate. The application can maintain the frames handles to defer processing. However, if the application maintains too long history, the device may lack memory resources to produce new frames, and the following call to this method shall fail to retrieve new frames, until resources are retained. \param[in] pipe the pipeline \param[in] timeout_ms max time in milliseconds to wait until a frame becomes available \param[out] output_frame frame handle to be released using rs2_release_frame \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return true if new frame was stored to output_frame
rs2_pipeline_wait_for_frames
Wait until a new set of frames becomes available. The frames set includes time-synchronized frames of each enabled stream in the pipeline. The method blocks the calling thread, and fetches the latest unread frames set. Device frames, which were produced while the function wasn’t called, are dropped. To avoid frame drops, this method should be called as fast as the device frame rate. The application can maintain the frames handles to defer processing. However, if the application maintains too long history, the device may lack memory resources to produce new frames, and the following call to this method shall fail to retrieve new frames, until resources are retained. \param[in] pipe the pipeline \param[in] timeout_ms Max time in milliseconds to wait until an exception will be thrown \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Set of coherent frames
rs2_playback_device_get_current_status
Returns the current state of the playback device \param[in] device A playback device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Current state of the playback
rs2_playback_device_get_file_path
Gets the path of the file used by the playback device \param[in] device A playback device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Path to the file used by the playback device
rs2_playback_device_is_real_time
Indicates if playback is in real time mode or non real time \param[in] device A playback device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return True iff playback is in real time mode. 0 means false, otherwise true
rs2_playback_device_pause
Un-pauses the playback Calling resume() while playback status is “Playing” or “Stopped” does nothing \param[in] device A playback device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_playback_device_resume
Pauses the playback Calling pause() in “Paused” status does nothing If pause() is called while playback status is “Playing” or “Stopped”, the playback will not play until resume() is called \param[in] device A playback device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_playback_device_set_playback_speed
Set the playing speed
rs2_playback_device_set_real_time
Set the playback to work in real time or non real time
rs2_playback_device_set_status_changed_callback
Register to receive callback from playback device upon its status changes
rs2_playback_device_stop
Stops the playback Calling stop() will stop all streaming playbakc sensors and will reset the playback (returning to beginning of file) \param[in] device A playback device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_playback_get_duration
Gets the total duration of the file in units of nanoseconds \param[in] device A playback device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Total duration of the file in units of nanoseconds
rs2_playback_get_position
Gets the current position of the playback in the file in terms of time. Units are expressed in nanoseconds \param[in] device A playback device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Current position of the playback in the file in terms of time. Units are expressed in nanoseconds
rs2_playback_seek
Set the playback to a specified time point of the played data \param[in] device A playback device. \param[in] time The time point to which playback should seek, expressed in units of nanoseconds (zero value = start) \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_playback_status_to_string
rs2_poll_for_frame
poll if a new frame is available and dequeue if it is \param[in] queue the frame queue data structure \param[out] output_frame frame handle to be released using rs2_release_frame \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return true if new frame was stored to output_frame
rs2_pose_frame_get_pose_data
When called on Pose frame type, this method returns the transformation represented by the pose data \param[in] frame Pose frame \param[out] pose Pointer to a user allocated struct, which contains the pose info after a successful return \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_process_calibration_frame
During host assisted calibration (Tare or on-chip), this is used to pump new depth frames until calibration is done. \param[in] f The next frame. \param[in] timeout_ms Timeout in ms (use 5000 msec unless instructed otherwise) \param[out] health The health check numbers before and after calibration \return New calibration table
rs2_process_frame
This method is used to pass frame into a processing block \param[in] block Processing block \param[in] frame Frame to process, ownership is moved to the block object \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_processing_block_register_simple_option
This method adds a custom option to a custom processing block. This is a simple float that can be accessed via rs2_set_option and rs2_get_option This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as save_to_ply, etc.. \param[in] block Processing block \param[in] option_id an int ID for referencing the option \param[in] min the minimum value which will be accepted for this option \param[in] max the maximum value which will be accepted for this option \param[in] step the granularity of options which accept discrete values, or zero if the option accepts continuous values \param[in] def the default value of the option. This will be the initial value. \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return true if adding the option succeeds. false if it fails e.g. an option with this id is already registered
rs2_project_color_pixel_to_depth_pixel
rs2_project_point_to_pixel
rs2_query_devices
create a static snapshot of all connected devices at the time of the call \param context Object representing librealsense session \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the list of devices, should be released by rs2_delete_device_list
rs2_query_devices_ex
create a static snapshot of all connected devices at the time of the call \param context Object representing librealsense session \param product_mask Controls what kind of devices will be returned \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return the list of devices, should be released by rs2_delete_device_list
rs2_query_sensors
Create a static snapshot of all connected sensors within a specific device. \param[in] device Specific RealSense device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return The list of sensors, should be released by rs2_delete_sensor_list
rs2_record_device_filename
Gets the name of the file to which the recorder is writing \param[in] device A recording device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return The name of the file to which the recorder is writing
rs2_record_device_pause
Pause the recording device without stopping the actual device from streaming. Pausing will cause the device to stop writing new data to the file, in particular, frames and changes to extensions \param[in] device A recording device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_record_device_resume
Unpause the recording device. Resume will cause the device to continue writing new data to the file, in particular, frames and changes to extensions \param[in] device A recording device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_register_calibration_change_callback
Adds a callback for a sensor that gets called when calibration (intrinsics) changes, e.g. due to auto-calibration \param[in] sensor the sensor \param[in] callback the C callback function that gets called \param[in] user user argument that gets passed to the callback function \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_register_calibration_change_callback_cpp
Adds a callback for a sensor that gets called when calibration (intrinsics) changes, e.g. due to auto-calibration \param[in] sensor the sensor \param[in] callback the C++ callback interface that gets called \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_register_extrinsics
\param[in] from origin stream profile \param[in] to target stream profile \param[out] extrin extrinsics from origin to target \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_release_frame
relases the frame handle \param[in] frame handle returned from a callback
rs2_remove_static_node
Remove a named location tag \param[in] sensor T2xx position-tracking sensor \param[in] guid Null-terminated string of up to 127 characters \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Non-zero if succeeded, otherwise 0
rs2_reset_logger
rs2_reset_sensor_calibration
Reset the sensor DSM parameters This should ideally be done when the stream is NOT running. May not take effect immediately. \param[in] sensor Sensor that supports the CALIBRATED_SENSOR extension \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_reset_to_factory_calibration
Reset device to factory calibration \param[in] device The RealSense device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_rs400_visual_preset_to_string
rs2_run_focal_length_calibration
Run target-based focal length calibration \param[in] device: device to calibrate \param[in] left_queue: container for left IR frames with resoluton of 1280x720 and the target in the center of 320x240 pixels ROI. \param[in] right_queue: container for right IR frames with resoluton of 1280x720 and the target in the center of 320x240 pixels ROI \param[in] target_width: the rectangle width in mm on the target \param[in] target_height: the rectangle height in mm on the target \param[in] adjust_both_sides: 1 for adjusting both left and right camera calibration tables, and 0 for adjusting right camera calibraion table only \param[out] ratio: the corrected ratio from the calibration \param[out] angle: the target’s tilt angle \param[in] callback: Optional callback for update progress notifications, the progress value is normailzed to 1 \param[in] client_data: Optional client data for the callback \return New calibration table
rs2_run_focal_length_calibration_cpp
Run target-based focal length calibration \param[in] device: device to calibrate \param[in] left_queue: container for left IR frames with resoluton of 1280x720 and the target in the center of 320x240 pixels ROI. \param[in] right_queue: container for right IR frames with resoluton of 1280x720 and the target in the center of 320x240 pixels ROI \param[in] target_width: the rectangle width in mm on the target \param[in] target_height: the rectangle height in mm on the target \param[in] adjust_both_sides: 1 for adjusting both left and right camera calibration tables, and 0 for adjusting right camera calibraion table only \param[out] ratio: the corrected ratio from the calibration \param[out] angle: the target’s tilt angle \param[in] callback: Optional callback for update progress notifications, the progress value is normailzed to 1 \return New calibration table
rs2_run_on_chip_calibration
This will improve the depth noise. \param[in] json_content Json string to configure regular speed on chip calibration parameters: { “calib type” : 0, “speed”: 3, “scan parameter”: 0, “adjust both sides”: 0, “white wall mode”: 0, “host assistance”: 0 } calib_type - calibraton type: 0 = regular, 1 = focal length, 2 = both regular and focal length in order 30 = regular for version 3, 31 = focal length for version 3, 32 = both regular and focal length in order for version 3, 33 = regular for second part of version 3 speed - for regular calibration, value can be one of: Very fast = 0, Fast = 1, Medium = 2, Slow = 3, White wall = 4, default is Slow for type 0 and Fast for type 2 scan_parameter - for regular calibration. value can be one of: Py scan (default) = 0, Rx scan = 1 adjust_both_sides - for focal length calibration. value can be one of: 0 = adjust right only, 1 = adjust both sides white_wall_mode - white wall mode: 0 for normal mode and 1 for white wall mode host_assistance: 0 for no assistance, 1 for starting with assistance, 2 for first part feeding host data to firmware, 3 for second part of feeding host data to firmware (calib_type 2 only) if json is nullptr it will be ignored and calibration will use the default parameters \param[out] health The absolute value of regular calibration Health-Check captures how far camera calibration is from the optimal one [0, 0.25) - Good [0.25, 0.75) - Can be Improved [0.75, ) - Requires Calibration The absolute value of focal length calibration Health-Check captures how far camera calibration is from the optimal one [0, 0.15) - Good [0.15, 0.75) - Can be Improved [0.75, ) - Requires Calibration The two health numbers are encoded in one integer as follows for calib_type 2: Regular health number times 1000 are bits 0 to 11 Regular health number is negative if bit 24 is 1 Focal length health number times 1000 are bits 12 to 23 Focal length health number is negative if bit 25 is 1 \param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1 \param[in] client_data Optional client data for the callback \param[in] timeout_ms Timeout in ms (use 5000 msec unless instructed otherwise) \return New calibration table
rs2_run_on_chip_calibration_cpp
This will improve the depth noise. \param[in] json_content Json string to configure regular speed on chip calibration parameters: { “calib type” : 0, “speed”: 3, “scan parameter”: 0, “adjust both sides”: 0, “white wall mode”: 0, “host assistance”: 0 } calib_type - calibraton type: 0 = regular, 1 = focal length, 2 = both regular and focal length in order, speed - for regular calibration. value can be one of: Very fast = 0, Fast = 1, Medium = 2, Slow = 3, White wall = 4, default is Slow for type 0 and Fast for type 2 scan_parameter - for regular calibration. value can be one of: Py scan (default) = 0, Rx scan = 1 adjust_both_sides - for focal length calibration. value can be one of: 0 = adjust right only, 1 = adjust both sides host_assistance: 0 for no assistance, 1 for starting with assistance, 2 for first part feeding host data to firmware, 3 for second part of feeding host data to firmware (calib_type 2 only) white_wall_mode - white wall mode: 0 for normal mode and 1 for white wall mode if json is nullptr it will be ignored and calibration will use the default parameters \param[out] health The absolute value of regular calibration Health-Check captures how far camera calibration is from the optimal one [0, 0.25) - Good [0.25, 0.75) - Can be Improved [0.75, ) - Requires Calibration The absolute value of focal length calibration Health-Check captures how far camera calibration is from the optimal one [0, 0.15) - Good [0.15, 0.75) - Can be Improved [0.75, ) - Requires Calibration The two health numbers are encoded in one integer as follows for calib_type 2: Regular health number times 1000 are bits 0 to 11 Regular health number is negative if bit 24 is 1 Focal length health number times 1000 are bits 12 to 23 Focal length health number is negative if bit 25 is 1 \param[in] callback Optional callback to get progress notifications \param[in] timeout_ms Timeout in ms (use 5000 msec unless instructed otherwise) \return New calibration table
rs2_run_tare_calibration
This will adjust camera absolute distance to flat target. User needs to enter the known ground truth. \param[in] ground_truth_mm Ground truth in mm must be between 60 and 10000 \param[in] json_content Json string to configure tare calibration parameters: { “average_step_count”: 20, “step count”: 20, “accuracy”: 2, “scan parameter”: 0, “data sampling”: 0, “host assistance”: 0, “depth”: 0 } average step count - number of frames to average, must be between 1 - 30, default = 20 step count - max iteration steps, must be between 5 - 30, default = 10 accuracy - Subpixel accuracy level, value can be one of: Very high = 0 (0.025%), High = 1 (0.05%), Medium = 2 (0.1%), Low = 3 (0.2%), Default = Very high (0.025%), default is Medium scan_parameter - value can be one of: Py scan (default) = 0, Rx scan = 1 data_sampling - value can be one of:polling data sampling = 0, interrupt data sampling = 1 host_assistance: 0 for no assistance, 1 for starting with assistance, 2 for feeding host data to firmware depth: 0 for not relating to depth, > 0 for feeding depth from host to firmware, -1 for ending to feed depth from host to firmware if json is nullptr it will be ignored and calibration will use the default parameters \param[in] content_size Json string size if its 0 the json will be ignored and calibration will use the default parameters \param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1 \param[in] client_data Optional client data for the callback \param[in] timeout_ms Timeout in ms (use 5000 msec unless instructed otherwise) \param[out] health The health check numbers before and after calibration \return New calibration table
rs2_run_tare_calibration_cpp
This will adjust camera absolute distance to flat target. User needs to enter the known ground truth. \param[in] ground_truth_mm Ground truth in mm must be between 60 and 10000 \param[in] json_content Json string to configure tare calibration parameters: { “average step count”: 20, “step count”: 20, “accuracy”: 2, “scan parameter”: 0, “data sampling”: 0, “host assistance”: 0, “depth” : 0 } average step count - number of frames to average, must be between 1 - 30, default = 20 step count - max iteration steps, must be between 5 - 30, default = 10 accuracy - Subpixel accuracy level, value can be one of: Very high = 0 (0.025%), High = 1 (0.05%), Medium = 2 (0.1%), Low = 3 (0.2%), Default = Very high (0.025%), default is Medium scan_parameter - value can be one of: Py scan (default) = 0, Rx scan = 1 data_sampling - value can be one of:polling data sampling = 0, interrupt data sampling = 1 host_assistance: 0 for no assistance, 1 for starting with assistance, 2 for feeding host data to firmware depth: 0 for not relating to depth, > 0 for feeding depth from host to firmware, -1 for ending to feed depth from host to firmware if json is nullptr it will be ignored and calibration will use the default parameters \param[in] content_size Json string size if its 0 the json will be ignored and calibration will use the default parameters \param[out] health The absolute value of regular calibration Health-Check captures how far camera calibration is from the optimal one [0, 0.25) - Good [0.25, 0.75) - Can be Improved [0.75, ) - Requires Calibration \param[in] callback Optional callback to get progress notifications \param[in] timeout_ms Timeout in ms (use 5000 msec unless instructed otherwise) \param[out] health The health check numbers before and after calibration \return New calibration table
rs2_run_uv_map_calibration
Depth-RGB UV-Map calibration. Applicable for D400 cameras \param[in] device: device to calibrate \param[in] left_queue: the frame queue for left IR frames with resoluton of 1280x720 and the target captured in the center of 320x240 pixels ROI. \param[in] color_queue: the frame queue for RGB frames with resoluton of 1280x720 and the target in the center of 320x240 pixels ROI \param[in] depth_queue: the frame queue for Depth frames with resoluton of 1280x720 \param[in] py_px_only: 1 for calibrating color camera py and px only, 1 for calibrating color camera py, px, fy, and fx. \param[out] health: The four health check numbers in order of px, py, fx, fy for the calibration \param[in] health_size: number of health check numbers, which is 4 by default \param[in] callback: Optional callback for update progress notifications, the progress value is normailzed to 1 \param[in] client_data: Optional client data for the callback \return New calibration table
rs2_run_uv_map_calibration_cpp
Depth-RGB UV-Map calibration. Applicable for D400 cameras \param[in] device: device to calibrate \param[in] left_queue: the frame queue for left IR frames with resoluton of 1280x720 and the target captured in the center of 320x240 pixels ROI. \param[in] color_queue: the frame queue for RGB frames with resoluton of 1280x720 and the target in the center of 320x240 pixels ROI \param[in] depth_queue: the frame queue for Depth frames with resoluton of 1280x720 \param[in] py_px_only: 1 for calibrating color camera py and px only, 1 for calibrating color camera py, px, fy, and fx. \param[out] health: The four health check numbers in order of px, py, fx, fy for the calibration \param[in] health_size: number of health check numbers, which is 4 by default \param[in] callback: Optional callback for update progress notifications, the progress value is normailzed to 1 \return New calibration table
rs2_send_and_receive_raw_data
Send raw data to device \param[in] device RealSense device to send data to \param[in] raw_data_to_send Raw data to be sent to device \param[in] size_of_raw_data_to_send Size of raw_data_to_send in bytes \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Device’s response in a rs2_raw_data_buffer, which should be released by rs2_delete_raw_data
rs2_send_wheel_odometry
Send wheel odometry data for each individual sensor (wheel) \param[in] wo_sensor_id - Zero-based index of (wheel) sensor with the same type within device \param[in] frame_num - Monotonocally increasing frame number, managed per sensor. \param[in] translational_velocity - Translational velocity of the wheel sensor [meter/sec] \return true on success
rs2_sensor_mode_to_string
rs2_serialize_json
rs2_set_calibration_config
rs2_set_calibration_config \param[in] sensor Safety sensor \param[in] calibration_config_json_str Calibration config as JSON string \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_calibration_table
Set current table to dynamic area. \param[in] Calibration table
rs2_set_devices_changed_callback
set callback to get devices changed events these events will be raised by the context whenever new RealSense device is connected or existing device gets disconnected \param context Object representing librealsense session \param[in] callback function pointer to register as per-notifications callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_devices_changed_callback_cpp
set callback to get devices changed events these events will be raised by the context whenever new RealSense device is connected or existing device gets disconnected \param context Object representing librealsense session \param[in] callback callback object created from c++ application. ownership over the callback object is moved into the context \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_extrinsics
Set extrinsics between two sensors \param[in] from_sensor Origin sensor \param[in] from_profile Origin profile \param[in] to_sensor Target sensor \param[in] to_profile Target profile \param[out] extrinsics Extrinsics from origin to target \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_intrinsics
Set intrinsics of a given sensor \param[in] sensor The RealSense device \param[in] profile Target stream profile \param[in] intrinsics Intrinsics value to be written to the device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_motion_device_intrinsics
Set motion device intrinsics \param[in] sensor Motion sensor \param[in] profile Motion stream profile \param[out] intrinsics Pointer to the struct to store the data in \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_notifications_callback
set callback to get notifications from specified sensor \param[in] sensor RealSense device \param[in] on_notification function pointer to register as per-notifications callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_notifications_callback_cpp
set callback to get notifications from specified device \param[in] sensor RealSense sensor \param[in] callback callback object created from c++ application. ownership over the callback object is moved into the relevant subdevice lock \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_option
write new value to sensor option \param[in] options the options container \param[in] option option id to be queried \param[in] value new value for the option \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_option_value
write new value to sensor option \param[in] options the options container \param[in] option_value option id, type, and value to be set \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_options_changed_callback
Sets a callback in case an option in this options container value is updated. Will create a thread that will periodically check the options in the container for updates. The update period is determined by the context’s ‘options-update-interval’ setting. \param[in] options the options container \param[in] callback callback function pointer to update on value changes \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_options_changed_callback_cpp
Sets a callback in case an option in this options container value is updated \param[in] options the options container \param[in] callback callback object created from c++ application. ownership over the callback object is moved to librealsense \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_region_of_interest
\brief sets the active region of interest to be used by auto-exposure algorithm \param[in] sensor the RealSense sensor \param[in] min_x lower horizontal bound in pixels \param[in] min_y lower vertical bound in pixels \param[in] max_x upper horizontal bound in pixels \param[in] max_y upper vertical bound in pixels \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_set_static_node
Create a named location tag \param[in] sensor T2xx position-tracking sensor \param[in] guid Null-terminated string of up to 127 characters \param[in] pos Position in meters, relative to the current tracking session \param[in] orient Quaternion orientation, expressed the the coordinate system of the current tracking session \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return Non-zero if succeeded, otherwise 0
rs2_set_stream_profile_data
Override some of the parameters of the stream profile \param[in] mode input stream profile \param[in] stream stream type for the profile \param[in] format binary data format of the profile \param[in] index stream index the profile in case there are multiple streams of the same type \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_sr300_visual_preset_to_string
rs2_start
start streaming from specified configured sensor \param[in] sensor RealSense device \param[in] on_frame function pointer to register as per-frame callback \param[in] user auxiliary data the user wishes to receive together with every frame callback \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_start_cpp
start streaming from specified configured sensor \param[in] sensor RealSense device \param[in] callback callback object created from c++ application. ownership over the callback object is moved into the relevant streaming lock \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_start_processing
This method is used to direct the output from the processing block to some callback or sink object \param[in] block Processing block \param[in] on_frame Callback to be invoked every time the processing block calls frame_ready \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_start_processing_fptr
This method is used to direct the output from the processing block to some callback or sink object \param[in] block Processing block \param[in] on_frame Callback function to be invoked every time the processing block calls frame_ready \param[in] user User context for the callback (can be anything or null) \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_start_processing_queue
This method is used to direct the output from the processing block to a dedicated queue object \param[in] block Processing block \param[in] queue Queue to place the processed frames to \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_start_queue
start streaming from specified configured sensor of specific stream to frame queue \param[in] sensor RealSense Sensor \param[in] queue frame-queue to store new frames into \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_stop
stops streaming from specified configured device \param[in] sensor RealSense sensor \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_stream_profile_is
Try to extend stream profile to an extension type \param[in] mode input stream profile \param[in] type extension type, for example RS2_EXTENSION_VIDEO_STREAM_PROFILE \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return non-zero if profile is extendable to specified extension, zero otherwise
rs2_stream_to_string
rs2_supports_device_info
Check if a camera supports a specific camera info type. \param[in] device The RealSense device to check \param[in] info The parameter to check for support \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return True if the parameter both exist and well-defined for the specific device
rs2_supports_frame_metadata
determine device metadata \param[in] frame handle returned from a callback \param[in] frame_metadata the metadata to check for support \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return true if device has this metadata
rs2_supports_option
check if particular option is supported by a subdevice \param[in] options the options container \param[in] option option id to be checked \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return true if option is supported
rs2_supports_processing_block_info
Check if a processing block supports a specific info type. \param[in] block The processing block to check \param[in] info The parameter to check for support \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored \return True if the parameter both exist and well-defined for the specific device
rs2_supports_sensor_info
check if specific sensor info is supported \param[in] info the parameter to check for support \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return true if the parameter both exist and well-defined for the specific device
rs2_synthetic_frame_ready
This method will dispatch frame callback on a frame \param[in] source Frame pool provided by the processing block \param[in] frame Frame to dispatch, frame ownership is passed to this function, so you don’t have to call release_frame after it \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_timestamp_domain_to_string
rs2_transform_point_to_point
rs2_trigger_device_calibration
Triggers calibration of the given type \param[in] dev the device \param[in] type the type of calibration requested \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_try_wait_for_frame
wait until new frame becomes available in the queue and dequeue it \param[in] queue the frame queue data structure \param[in] timeout_ms max time in milliseconds to wait until a frame becomes available \param[out] output_frame frame handle to be released using rs2_release_frame \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return true if new frame was stored to output_frame
rs2_update_firmware
Update device to the provided firmware, the device must be extendable to RS2_EXTENSION_UPDATABLE. This call is executed on the caller’s thread and it supports progress notifications via the optional callback. \param[in] device Device to update \param[in] fw_image Firmware image buffer \param[in] fw_image_size Firmware image buffer size \param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1 \param[in] client_data Optional client data for the callback \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_update_firmware_cpp
Update device to the provided firmware, the device must be extendable to RS2_EXTENSION_UPDATABLE. This call is executed on the caller’s thread and it supports progress notifications via the optional callback. \param[in] device Device to update \param[in] fw_image Firmware image buffer \param[in] fw_image_size Firmware image buffer size \param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1 \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_update_firmware_unsigned
Update device to the provided firmware by writing raw data directly to the flash, this command can be executed only on unlocked camera. The device must be extendable to RS2_EXTENSION_UPDATABLE. This call is executed on the caller’s thread and it supports progress notifications via the optional callback. \param[in] device Device to update \param[in] fw_image Firmware image buffer \param[in] fw_image_size Firmware image buffer size \param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1 \param[in] client_data Optional client data for the callback \param[in] update_mode Select one of RS2_UNSIGNED_UPDATE_MODE, WARNING!!! setting to any option other than RS2_UNSIGNED_UPDATE_MODE_UPDATE will make this call unsafe and might damage the camera \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_update_firmware_unsigned_cpp
Update device to the provided firmware by writing raw data directly to the flash, this command can be executed only on unlocked camera. The device must be extendable to RS2_EXTENSION_UPDATABLE. This call is executed on the caller’s thread and it supports progress notifications via the optional callback. \param[in] device Device to update \param[in] fw_image Firmware image buffer \param[in] fw_image_size Firmware image buffer size \param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1 \param[in] update_mode Select one of RS2_UNSIGNED_UPDATE_MODE, WARNING!!! setting to any option other than RS2_UNSIGNED_UPDATE_MODE_UPDATE will make this call unsafe and might damage the camera \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored
rs2_wait_for_frame
wait until new frame becomes available in the queue and dequeue it \param[in] queue the frame queue data structure \param[in] timeout_ms max time in milliseconds to wait until an exception will be thrown \param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored \return frame handle to be released using rs2_release_frame
rs2_write_calibration
Write calibration to device’s EEPROM \param[in] device The RealSense device \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored

Type Aliases§

rs2_ambient_light
\brief DEPRECATED! - Use RS2_OPTION_DIGITAL_GAIN instead.
rs2_calib_target_type
\brief Calibration target type.
rs2_calibration_change_callback_ptr
rs2_calibration_status
Used in device_calibration with rs2_calibration_change_callback
rs2_calibration_type
Used in device_calibration; enumerates the different calibration types available for that extension.
rs2_camera_info
\brief Read-only strings that can be queried from the device. Not all information attributes are available on all camera types. This information is mainly available for camera debug and troubleshooting and should not be used in applications.
rs2_depth_auto_exposure_mode
\brief values for RS2_OPTION_DEPTH_AUTO_EXPOSURE_MODE option.
rs2_devices_changed_callback_ptr
rs2_digital_gain
\brief digital gain for RS2_OPTION_DIGITAL_GAIN option.
rs2_distortion
\brief Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.
rs2_emitter_frequency_mode
\brief values for RS2_EMITTER_FREQUENCY option.
rs2_exception_type
\brief Exception types are the different categories of errors that RealSense API might return.
rs2_extension
\brief Specifies advanced interfaces (capabilities) objects may implement.
rs2_format
\brief A stream’s format identifies how binary data is encoded within a frame.
rs2_frame_callback_ptr
rs2_frame_metadata_value
\brief Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame.
rs2_frame_processor_callback_ptr
rs2_gyro_sensitivity
\brief values for RS2_OPTION_GYRO_SENSITIVITY option.
rs2_host_perf_mode
\brief values for RS2_OPTION_HOST_PERFORMANCE option.
rs2_l500_visual_preset
\brief For L500 devices: provides optimized settings (presets) for specific types of usage.
rs2_log_callback_ptr
rs2_log_severity
\brief Severity of the librealsense logger.
rs2_matchers
\brief Specifies types of different matchers
rs2_metadata_type
rs2_notification_callback_ptr
rs2_notification_category
\brief Category of the librealsense notification.
rs2_option
\brief Defines general configuration controls. These can generally be mapped to camera UVC controls, and can be set / queried at any time unless stated otherwise.
rs2_option_type
\brief Defines known option value types.
rs2_options_changed_callback_ptr
rs2_playback_status
rs2_playback_status_changed_callback_ptr
rs2_rs400_visual_preset
\brief For RS400 devices: provides optimized settings (presets) for specific types of usage.
rs2_sensor_mode
\brief DEPRECATED! - For setting the camera_mode option
rs2_software_device_destruction_callback_ptr
rs2_sr300_visual_preset
\brief For SR300 devices: provides optimized settings (presets) for specific types of usage.
rs2_stream
\brief Streams are different types of data provided by RealSense devices.
rs2_time_t
rs2_timestamp_domain
\brief Specifies the clock in relation to which the frame timestamp was measured.
rs2_update_progress_callback_ptr

Unions§

rs2_option_value__bindgen_ty_1