Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
|
#include <rs.hpp>
Public Member Functions | |
const char * | get_name () const |
const char * | get_serial () const |
const char * | get_usb_port_id () const |
const char * | get_firmware_version () const |
const char * | get_info (camera_info info) const |
extrinsics | get_extrinsics (stream from_stream, stream to_stream) const |
extrinsics | get_motion_extrinsics_from (stream from_stream) const |
float | get_depth_scale () const |
bool | supports_option (option option) const |
int | get_stream_mode_count (stream stream) const |
void | get_stream_mode (stream stream, int index, int &width, int &height, format &format, int &framerate) const |
void | enable_stream (stream stream, int width, int height, format format, int framerate, output_buffer_format output_buffer_type=output_buffer_format::continous) |
void | enable_stream (stream stream, preset preset) |
void | disable_stream (stream stream) |
bool | is_stream_enabled (stream stream) const |
int | get_stream_width (stream stream) const |
int | get_stream_height (stream stream) const |
format | get_stream_format (stream stream) const |
int | get_stream_framerate (stream stream) const |
intrinsics | get_stream_intrinsics (stream stream) const |
motion_intrinsics | get_motion_intrinsics () const |
void | set_frame_callback (rs::stream stream, std::function< void(frame)> frame_handler) |
void | enable_motion_tracking (std::function< void(motion_data)> motion_handler, std::function< void(timestamp_data)> timestamp_handler) |
void | enable_motion_tracking (std::function< void(motion_data)> motion_handler) |
void | disable_motion_tracking (void) |
disable events polling More... | |
int | is_motion_tracking_active () |
check if data acquisition is active More... | |
void | start (rs::source source=rs::source::video) |
begin streaming on all enabled streams for this device More... | |
void | stop (rs::source source=rs::source::video) |
end streaming on all streams for this device More... | |
bool | is_streaming () const |
void | get_option_range (option option, double &min, double &max, double &step) |
void | get_option_range (option option, double &min, double &max, double &step, double &def) |
void | get_options (const option *options, size_t count, double *values) |
void | set_options (const option *options, size_t count, const double *values) |
double | get_option (option option) |
const char * | get_option_description (option option) |
void | set_option (option option, double value) |
void | wait_for_frames () |
bool | poll_for_frames () |
bool | supports (capabilities capability) const |
bool | supports (camera_info info_param) const |
double | get_frame_timestamp (stream stream) const |
unsigned long long | get_frame_number (stream stream) const |
const void * | get_frame_data (stream stream) const |
void | send_blob_to_device (rs::blob_type type, void *data, int size) |
|
inline |
disable events polling
|
inline |
disable a specific stream
[in] | stream | the stream to disable |
|
inline |
sets the callback for motion module event. provided callback will be called the instant new motion or timestamp event is available. Note: rs_enable_motion_tracking is responsible for activating the motion module on-board the device. One of the services it provides is producing shared and high-resolution timestamps for all component hooked-up to it. Usually, librealsense takes care of that and copies the timestamps to the relevant frames. However, when the user has an external device(like a compass) and wishes to synchronize it precisely with image and motion stream he can connect the sensor to a GPIO avaialbe on some devices. Every time sensor will signal, the user will get a timestamp callback with a frame number, source ID and a timestamp. This would allow advanced user to synchronize his compass events(presumably coming though I2C or some other method) with realsense data.
[in] | stream | the stream |
[in] | motion_handler | frame callback to be invoke on every new motion event |
[in] | timestamp_handler | frame callback to be invoke on every new timestamp event (can be left-out) |
|
inline |
sets the callback for motion module event. provided callback will be called the instant new motion event is available.
[in] | stream | the stream |
[in] | motion_handler | frame callback to be invoke on every new motion event |
|
inline |
enable a specific stream and request specific properties
[in] | stream | the stream to enable |
[in] | width | the desired width of a frame image in pixels, or 0 if any width is acceptable |
[in] | height | the desired height of a frame image in pixels, or 0 if any height is acceptable |
[in] | format | the pixel format of a frame image, or ANY if any format is acceptable |
[in] | framerate | the number of frames which will be streamed per second, or 0 if any framerate is acceptable |
[in] | output_buffer_type | output buffer format (continous in memory / native with pitch) |
enable a specific stream and request properties using a preset
[in] | stream | the stream to enable |
[in] | preset | the preset to use to enable the stream |
|
inline |
retrieve mapping between the units of the depth image and meters
|
inline |
retrieve extrinsic transformation between the viewpoints of two different streams
[in] | from_stream | stream whose coordinate space we will transform from |
[in] | to_stream | stream whose coordinate space we will transform to |
|
inline |
retrieve the version of the firmware currently installed on the device
|
inline |
retrieve the contents of the latest frame on a stream
[in] | stream | the stream whose latest frame we are interested in |
|
inline |
retrieve the frame number
[in] | stream | the stream whose latest frame we are interested in |
|
inline |
retrieve the time at which the latest frame on a stream was captured
[in] | stream | the stream whose latest frame we are interested in |
|
inline |
retrieve camera specific information like the versions of the various componnents
|
inline |
retrieve extrinsic transformation between the viewpoints of specific stream and the motion module
[in] | from_stream | stream whose coordinate space we will transform from |
|
inline |
retrieve intrinsic camera parameters for the motion module
|
inline |
retrieve a human readable device model string
|
inline |
retrieve the current value of a single option
[in] | option | the option whose value should be retrieved |
|
inline |
retrieve the device specific option description
[in] | option | the option whose description should be retrieved |
|
inline |
retrieve the available range of values of a supported option
[in] | option | the option whose range should be queried |
[out] | min | the minimum value which will be accepted for this option |
[out] | max | the maximum value which will be accepted for this option |
[out] | step | the granularity of options which accept discrete values, or zero if the option accepts continuous values |
|
inline |
retrieve the available range of values of a supported option
[in] | option | the option whose range should be queried |
[out] | min | the minimum value which will be accepted for this option |
[out] | max | the maximum value which will be accepted for this option |
[out] | step | the granularity of options which accept discrete values, or zero if the option accepts continuous values |
[out] | def | the default value of the option |
|
inline |
efficiently retrieve the value of an arbitrary number of options, using minimal hardware IO
[in] | options | the array of options which should be queried |
[in] | count | the length of the options and values arrays |
[out] | values | the array which will receive the values of the queried options |
|
inline |
retrieve the unique serial number of the device
retrieve the pixel format for a specific stream
[in] | stream | the stream whose format to retrieve |
|
inline |
retrieve the framerate for a specific stream
[in] | stream | the stream whose framerate to retrieve |
|
inline |
retrieve the height in pixels of a specific stream, equivalent to the height field from the stream's intrinsic
[in] | stream | the stream whose height to retrieve |
|
inline |
retrieve intrinsic camera parameters for a specific stream
[in] | stream | the stream whose parameters to retrieve |
|
inline |
determine the properties of a specific streaming mode
[in] | stream | the stream whose mode will be queried |
[in] | index | the zero based index of the streaming mode |
[out] | width | the width of a frame image in pixels |
[out] | height | the height of a frame image in pixels |
[out] | format | the pixel format of a frame image |
[out] | framerate | the number of frames which will be streamed per second |
|
inline |
determine the number of streaming modes available for a given stream
[in] | stream | the stream whose modes will be enumerated |
|
inline |
retrieve the width in pixels of a specific stream, equivalent to the width field from the stream's intrinsic
[in] | stream | the stream whose width to retrieve |
|
inline |
retrieve the USB port number of the device
|
inline |
check if data acquisition is active
|
inline |
determine if a specific stream is enabled
[in] | stream | the stream to check |
|
inline |
determine if the device is currently streaming
|
inline |
check if new frames are available, without blocking
|
inline |
send device specific data to the device
[in] | type | describes the content of the memory buffer, how it will be interpreted by the device |
[in] | data | raw data buffer to be sent to the device |
[in] | size | size in bytes of the buffer |
|
inline |
sets the callback for frame arrival event. provided callback will be called the instant new frame of given stream becomes available once callback is set on certain stream type, frames of this type will no longer be available throuhg wait/poll methods (those two approaches are mutually exclusive) while wait/poll methods provide consistent set of syncronized frames at the expense of extra latency, set frame callbacks provides low latency solution with no syncronization
[in] | stream | the stream |
[in] | on_frame | frame callback to be invoke on every new frame |
|
inline |
set the current value of a single option
[in] | option | the option whose value should be set |
[in] | value | the value of the option |
|
inline |
efficiently set the value of an arbitrary number of options, using minimal hardware IO
[in] | options | the array of options which should be set |
[in] | count | the length of the options and values arrays |
[in] | values | the array of values to which the options should be set |
|
inline |
begin streaming on all enabled streams for this device
|
inline |
end streaming on all streams for this device
|
inline |
determine device capabilities
[in] | capability | the capability to check for support |
|
inline |
determine device capabilities
[in] | capability | the capability to check for support |
|
inline |
determine if the device allows a specific option to be queried and set
[in] | option | the option to check for support |
|
inline |
block until new frames are available