Crate realsense_sys[][src]

Expand description

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.

Getting started

This library is probably not terribly useful on its own, and is meant to be paired with the high-level realsense-rust. However, if you’re just looking for your own low-level unsafe wrapper, then realsense-sys is what you want! You can get started by including the following in your Cargo.toml:

[dependencies]
realsense-rust = "0.5.0"

followed by this use statement in your code:

use realsense_sys as sys;

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.

Regenerating bindings

The bindings should be uniquely generated for every new release of librealsense2. Currently, the bindings in this crate are compatible with librealsense2 version 2.41.0.

If you want to regenerate the bindings for your version of realsense, enable the buildtime-bindgen feature of the crate. Note that in general this can break things if the API for your version of librealsense2 is different with regards to what the realsense-rust crate is expecting.

Structs

\brief Cross-stream extrinsics: encodes the topology describing how the different devices are oriented.

\brief Video stream intrinsics.

\brief Motion device intrinsics: scale, bias, and variances.

\brief Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right, positive Y is down

\brief Quaternion used to represent rotation

\brief 3D vector in Euclidean coordinate space

\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

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

< Flat rectangle with vertices as the centers of Gaussian dots

< True iff the device is in advanced mode

< ASIC serial number

< True iff EEPROM is locked

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

< If device supports firmware logging, this is the command to send to get logs from firmware

< Firmware update ID

< Primary firmware version

< IP address for remote camera.

< Friendly name

< Unique identifier of the port the device is connected to (platform specific)

< Product ID as reported in the USB descriptor

< Device product line D400/SR300/L500/T200

< Recommended firmware version

< Device serial number

< Designated USB specification: USB2/USB3

< Unmodified Brown-Conrady distortion model

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

< F-Theta fish-eye distortion model

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

< Four parameter Kannala Brandt distortion model

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

< Rectilinear images. No distortion compensation required.

< Aging-over-thermal (default); aging-induced error is uniform across temperature

< hFactor and hOffset are not used, and no artificial error is induced

< Thermal-over-aging; aging-induced error changes alongside temperature

< Error was returned from the underlying OS-specific layer

< Device was disconnected, this can be caused by outside intervention, by internal firmware error or due to insufficient power

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

< Device is in recovery mode and might require firmware update

< Invalid value was passed to the API

< IO Device failure

< The method is not implemented at this point

< Function precondition was violated

< Pose data packed as floats array, containing translation vector, rotation quaternion and prediction velocities and accelerations vectors

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

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

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

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

< 16-bit float-point disparity values. Depth->Disparity conversion : Disparity = Baseline*FocalLength/Depth.

< 32-bit float-point disparity values. Depth->Disparity conversion : Disparity = Baseline*FocalLength/Depth

< 32-bit float-point depth distance value.

< 16-bit per-pixel frame grabber format.

< Raw data from the external sensors hooked to one of the GPIO’s

< 8-bit IR stream.

< multi-planar Depth 16bit + IR 10bit.

< Bitstream encoding for video in which an image of each frame is encoded as JPEG-DIB

< Raw data from the motion sensor

< Motion data packed as 3 32-bit float values, for X, Y, and Z axis

< 8-bit raw image

< Four 10 bits per pixel luminance values packed into a 5-byte macropixel

< 16-bit raw image

< 8-bit red, green and blue channels

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

< Similar to the standard YUYV pixel format, but packed in a different order

< Grey-scale image as a bit-packed array. 4 pixel data stream taking 5 bytes

< 32-bit floating point 3D coordinates.

< 8-bit per-pixel grayscale image

< 8-bit per pixel interleaved. 8-bit left, 8-bit right.

< 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

< 12-bit per pixel interleaved. 12-bit left, 12-bit right. Each pixel is stored in a 24-bit word in little-endian order.

< 16-bit per-pixel grayscale image

< 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

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

< Variable-length Huffman-compressed 16-bit depth values.

< Sensor’s exposure width. When Auto Exposure (AE) is on the value is controlled by firmware. usec

< Actual fps

< Auto Exposure Mode indicator. Zero corresponds to AE switched off.

< Auto white balance temperature Mode indicator. Zero corresponds to automatic mode switched off.

< Timestamp get from uvc driver. usec

< Color backlight compensation. Zero corresponds to switched off.

< Color image brightness.

< Color image contrast.

< Exposure priority.

< Bottom region of interest for the auto exposure Algorithm.

< Left region of interest for the auto exposure Algorithm.

< Right region of interest for the auto exposure Algorithm.

< Top region of interest for the auto exposure Algorithm.

< A sequential index managed per-stream. Integer value

< Emitter mode: 0 - all emitters disabled. 1 - laser enabled. 2 - auto laser enabled (opt). 3 - LED enabled (opt).

< Laser power value 0-360.

< Laser power mode. Zero corresponds to Laser power switched off and one for switched on. deprecated, replaced by RS2_FRAME_METADATA_FRAME_EMITTER_MODE

< Led power value 0-360.

< Timestamp set by device clock when data readout and transmit commence. usec

< 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

< Color image gamma.

< GPIO input data

< Color image hue.

< Color lowlight compensation. Zero corresponds to switched off.

< Color image white balance.

< Power Line Frequency for anti-flickering Off/50Hz/60Hz/Auto.

< The number of transmitted payload bytes, not including metadata

< Color image saturation.

< Timestamp of the middle of sensor’s exposure calculated by device. usec

< sub-preset sequence id

< sub-preset id

< sub-preset sequence size

< Color image sharpness.

< Temperature of the device, measured at the time of the frame capture. Celsius degrees

< Time of arrival in system clock

< White Balance setting as a color temperature. Kelvin degrees

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

< no change in settings, use device defaults

< 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

< 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

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

< Include any/all log messages

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

< Detailed information about ordinary operations

< Indication of definite failure

< Indication of unrecoverable failure

< Terse information about ordinary operations

< No logging will occur

< Indication of possible failure

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

< Current firmware version installed is not the latest available

< Frames didn’t arrived within 5 seconds

< Received partial/incomplete frame

< Error reported from the device

< General Hardeware notification that is not an error

< A relocalization event has updated the pose provided by a pose sensor

< Received unknown error from the device

< 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

< Turn on/off the alternate IR, When enabling alternate IR, the IR image is holding the amplitude of the depth correlation.

< DEPRECATED! - Use RS2_OPTION_DIGITAL_GAIN instead.

< APD temperature

< Current Asic Temperature

< Allows dynamically ajust the converge step value of the target exposure in Auto-Exposure algorithm

< Set and get auto exposure limit in microseconds. Default is 0 which means full exposure range. 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.

< Auto-Exposure modes: Static, Anti-Flicker and Hybrid

< Allows sensor to dynamically ajust the frame rate depending on lighting conditions

< Set and get auto gain limits ranging from 16 to 248. Default is 0 which means full gain. 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.

< Enable receiver sensitivity according to ambient light, bounded by the Receiver Gain control.

< Changes the exposure time of Avalanche Photo Diode in the receiver

< Enable / disable color backlight compensation

< Color image brightness

< Color scheme for data visualization

< 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

< Color image contrast

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

< Offset from sensor to depth origin in millimetrers

< Number of meters represented by a single depth unit

< Change the depth digital gain see rs2_digital_gain for values

< Enable Laser On constantly (GS SKU Only)

< Emitter select: 0 – disable all emitters. 1 – enable laser. 2 – enable auto laser. 3 – enable LED.

< When supported, this option make the camera to switch the emitter state every frame. 0 for disabled, 1 for enabled

< Enable / disable color image auto-exposure

< Enable / disable color image auto-white-balance

< Enable dynamic calibration

< Enables data collection for calculating IR pixel reflectivity

< Enable an internal map

< Preserve previous map when starting

< Turn on/off the maximum usable depth sensor range given the amount of ambient light in the scene

< Enable/Disable automatic correction of the motion data

< Enable position jumping

< Enable appearance based relocalization

< disable error handling

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

< The 2D-filter effect. The specific interpretation is given within the context of the filter

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

< 2D-filter parameter controls the weight/radius for smoothing.

< 2D-filter range/validity threshold

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

< Enable/disable sensor shutdown when a free-fall is detected (on by default)

< Color image gain

< Color image gamma setting

< disable global time

< Hardware stream configuration

< Enable / disable HDR

< Perform histogram equalization post-processing on the depth data

< Enhance depth data post-processing with holes filling where appropriate

< 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

< Color image hue

< Humidity temperature [Deg Celsius]

< Impose Inter-camera HW synchronization mode. Applicable for D400/L500/Rolling Shutter SKUs

< Enable\disable pixel invalidation

< Power of the laser emitter, with 0 meaning projector off

< Power of the LED (light emitting diode), with 0 meaning LED off

< LDD temperature

< Maximum distance to the target

< MA temperature

< MC temperature

< Minimal distance to the target

< Current Motion-Module Temperature

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

< Noise estimation - indicates the noise on the IR image

< Control edges and background noise

< Enable / disable trigger to be outputed from the camera to any external device on every depth frame

< Changes the amount of sharpening in the post-processed image

< Power Line Frequency control for anti-flickering Off/50Hz/60Hz/Auto

< Changes the amount of sharpening in the pre-processed image

< Current Projector Temperature

< DEPRECATED as of 2.46!

< Color image saturation setting

< The resolution mode: see rs2_sensor_mode for values

< HDR Sequence ID - 0 is not HDR; sequence ID for HDR configuration starts from 1

< HDR Sequence name

< HDR Sequence size

< Color image sharpness setting

< The distance in mm between the first and the second imagers in stereo-based depth cameras

< Select a stream to process

< Select a stream format to process

< Select a stream index to process

< Texture mapping stream unique ID

< Depth Thermal Compensation for selected D400 SKUs

< Total number of detected frame drops from all streams

<changes the transmitter frequencies increasing effective range over sharpness.

< DEPRECATED as of 2.46!

< Provide access to several recommend sets of option presets for the depth camera

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

< DEPRECATED! - Toggle Zero-Order mode

< Deprecated!!! - Zero order point x

< Deprecated!!! - Zero order point y

< One or more sensors were started, but playback paused reading and paused raising data

< One or more sensors were started, playback is reading and raising data

< All sensors were stopped, or playback has ended (all data was read). This is the initial playback status

< Unknown state

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

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

< Preset for background segmentation

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

< Camera default settings

< Preset for face analytics

< Preset for face login

< Preset for gesture recognition

< Preset for GR cursor

< Preset for IR only

< Preset for long range

< Preset for mid-range

< Preset for object scanning

< Preset for short range

< Native stream of accelerometer motion data produced by RealSense device

< Native stream of color data captured by RealSense device

< 4 bit per-pixel depth confidence level

< Native stream of depth data produced by RealSense device

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

< Signals from external device connected through GPIO

< Native stream of gyroscope motion data produced by RealSense device

< Native stream of infrared data captured by RealSense device

< 6 Degrees of Freedom pose data, calculated by RealSense device

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

< Frame timestamp was measured in relation to the camera clock and converted to OS system clock by constantly measure the difference

< Frame timestamp was measured in relation to the camera clock

< Frame timestamp was measured in relation to the OS system clock

Functions

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

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

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

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

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

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

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

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

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().

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.

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.

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.

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.

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.

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

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

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

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.

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.

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

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

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

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

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.

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

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

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.

\brief Creates RealSense context that is required for the rest of the API. \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

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

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

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

\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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Deletes an instance of a config

\brief Frees the relevant context object. \param[in] context Object that is no longer needed

Delete RealSense device \param[in] device Realsense device to delete

\brief Frees the relevant device hub object. \param[in] hub Object that is no longer needed

Deletes device list, any devices created using this list will remain unaffected. \param[in] info_list List to delete

deletes frame queue and releases all frames inside it \param[in] queue queue to delete

Deletes options list \param[in] list list to delete

Delete a pipeline instance. Upon destruction, the pipeline will implicitly stop itself \param[in] pipe to delete

Deletes an instance of a pipeline profile

Deletes the processing block \param[in] block Processing block

Delete rs2_raw_data_buffer \param[in] buffer rs2_raw_data_buffer returned by rs2_send_and_receive_raw_data

Deletes processing blocks list \param[in] list list to delete

delete relasense sensor \param[in] sensor realsense sensor to delete

Deletes sensors list, any sensors created from this list will remain unaffected \param[in] info_list list to delete

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

delete stream profiles list \param[in] list the list of supported profiles returned by rs2_get_supported_profiles

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

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

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

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

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

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

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

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

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

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

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

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

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

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 \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 \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored

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

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

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

Read current calibration table from flash. \return Calibration table

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

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

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

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

Get the DSM parameters for a sensor \param[in] sensor Sensor that supports the CALIBRATED_SENSOR extension \param[out] p_params_out Pointer to the structure that will get the DSM parameters \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored

\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

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

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

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

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

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

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 nubmer of the frame, in milliseconds since the device was started

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

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

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

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

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

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

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)

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

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

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

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

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

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

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)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Set the sensor DSM parameters This should ideally be done when the stream is NOT running. If it is, the parameters may not take effect immediately. \param[in] sensor Sensor that supports the CALIBRATED_SENSOR extension \param[out] p_params Pointer to the structure that contains the DSM parameters \param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored

\brief Override extrinsics of a given sensor that supports calibrated_sensor.

\brief Override intrinsics of a given sensor that supports calibrated_sensor.

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.

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

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.

Return the selected streams profiles, which are enabled in this profile.

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.

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.

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.

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.

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.

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.

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

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

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

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

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

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

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

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

Set the playing speed

Set the playback to work in real time or non real time

Register to receive callback from playback device upon its status changes

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\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

relases the frame handle \param[in] frame handle returned from a callback

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

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

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

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 } 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 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 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

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 } 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 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

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 } 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 very high (0.025%) 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 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) \return New calibration table

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 } 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 very high (0.025%) 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 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 to get progress notifications \param[in] timeout_ms Timeout in ms (use 5000 msec unless instructed otherwise) \return New calibration table

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

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

Set current table to dynamic area. \param[in] Calibration table

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

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

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

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

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

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

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

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

\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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 Definitions

\brief DEPRECATED! - Use RS2_OPTION_DIGITAL_GAIN instead.

\brief Calibration target type.

Used in device_calibration with rs2_calibration_change_callback

Used in device_calibration; enumerates the different calibration types available for that extension.

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

\brief digital gain for RS2_OPTION_DIGITAL_GAIN option.

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

\brief Exception types are the different categories of errors that RealSense API might return.

\brief Specifies advanced interfaces (capabilities) objects may implement.

\brief A stream’s format identifies how binary data is encoded within a frame.

\brief Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame.

\brief values for RS2_OPTION_HOST_PERFORMANCE option.

\brief For L500 devices: provides optimized settings (presets) for specific types of usage.

\brief Severity of the librealsense logger.

\brief Specifies types of different matchers

\brief Category of the librealsense notification.

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

\brief For RS400 devices: provides optimized settings (presets) for specific types of usage.

\brief For setting the camera_mode option

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

\brief Streams are different types of data provided by RealSense devices.

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