Open3D (C++ API)  0.18.0+5c982c7
Public Member Functions | Static Public Member Functions | Data Fields
open3d::t::io::RealSenseSensorConfig Class Reference

#include <RealSenseSensorConfig.h>

Inheritance diagram for open3d::t::io::RealSenseSensorConfig:
open3d::io::RGBDSensorConfig open3d::utility::IJsonConvertible

Public Member Functions

 RealSenseSensorConfig ()
 Default constructor, default configs will be used. More...
 
 RealSenseSensorConfig (const std::unordered_map< std::string, std::string > &config)
 Initialize config with a map. More...
 
bool ConvertToJsonValue (Json::Value &value) const override
 
bool ConvertFromJsonValue (const Json::Value &value) override
 
rs2::config ConvertToNativeConfig () const
 Convert to RealSense config. More...
 
- Public Member Functions inherited from open3d::utility::IJsonConvertible
virtual ~IJsonConvertible ()
 
virtual std::string ToString () const
 Convert to a styled string representation of JSON data for display. More...
 

Static Public Member Functions

static Json::Value GetMetadataJson (const rs2::pipeline_profile &profile)
 Get metadata for a streaming RealSense camera or bag file. More...
 
static void GetPixelDtypes (const rs2::pipeline_profile &profile, RGBDVideoMetadata &metadata)
 
static std::pair< core::Dtype, uint8_t > get_dtype_channels (int rs2_format_enum)
 
- Static Public Member Functions inherited from open3d::utility::IJsonConvertible
static bool EigenVector3dFromJsonArray (Eigen::Vector3d &vec, const Json::Value &value)
 
static bool EigenVector3dToJsonArray (const Eigen::Vector3d &vec, Json::Value &value)
 
static bool EigenVector4dFromJsonArray (Eigen::Vector4d &vec, const Json::Value &value)
 
static bool EigenVector4dToJsonArray (const Eigen::Vector4d &vec, Json::Value &value)
 
static bool EigenMatrix3dFromJsonArray (Eigen::Matrix3d &mat, const Json::Value &value)
 
static bool EigenMatrix3dToJsonArray (const Eigen::Matrix3d &mat, Json::Value &value)
 
static bool EigenMatrix4dFromJsonArray (Eigen::Matrix4d &mat, const Json::Value &value)
 
static bool EigenMatrix4dToJsonArray (const Eigen::Matrix4d &mat, Json::Value &value)
 
static bool EigenMatrix4dFromJsonArray (Eigen::Matrix4d_u &mat, const Json::Value &value)
 
static bool EigenMatrix4dToJsonArray (const Eigen::Matrix4d_u &mat, Json::Value &value)
 
static bool EigenMatrix6dFromJsonArray (Eigen::Matrix6d &mat, const Json::Value &value)
 
static bool EigenMatrix6dToJsonArray (const Eigen::Matrix6d &mat, Json::Value &value)
 
static bool EigenMatrix6dFromJsonArray (Eigen::Matrix6d_u &mat, const Json::Value &value)
 
static bool EigenMatrix6dToJsonArray (const Eigen::Matrix6d_u &mat, Json::Value &value)
 

Data Fields

std::unordered_map< std::string, std::string > config_
 

Detailed Description

Configuration for a RealSense camera

See RealSense documentation for the set of configuration values. Supported configuration options will be specific to a device and other chosen options. https://intelrealsense.github.io/librealsense/doxygen/rs__option_8h.html https://intelrealsense.github.io/librealsense/doxygen/rs__sensor_8h.html

{
// Pick a specific device, leave empty to pick the first available
// device
{"serial": ""},
// pixel format for color frames
{"color_format": "RS2_FORMAT_ANY"},
// (width, height): Leave 0 to let RealSense pick a supported width or
// height
{"color_resolution": "0,0"},
// pixel format for depth frames
{"depth_format": "RS2_FORMAT_ANY"},
// (width, height): Leave 0 to let RealSense pick a supported width or
// height
{"depth_resolution": "0,0"},
// framerate for both color and depth streams. Leave 0 to let RealSense
// pick a supported framerate
{"fps": "0"},
// Controls depth computation on the device. Supported values are
// specific to device family (SR300, RS400, L500). Leave empty to pick
// the default.
{"visual_preset": ""}
}

Constructor & Destructor Documentation

◆ RealSenseSensorConfig() [1/2]

open3d::t::io::RealSenseSensorConfig::RealSenseSensorConfig ( )

Default constructor, default configs will be used.

◆ RealSenseSensorConfig() [2/2]

open3d::t::io::RealSenseSensorConfig::RealSenseSensorConfig ( const std::unordered_map< std::string, std::string > &  config)

Initialize config with a map.

Member Function Documentation

◆ ConvertFromJsonValue()

bool open3d::t::io::RealSenseSensorConfig::ConvertFromJsonValue ( const Json::Value &  value)
overridevirtual

◆ ConvertToJsonValue()

bool open3d::t::io::RealSenseSensorConfig::ConvertToJsonValue ( Json::Value &  value) const
overridevirtual

◆ ConvertToNativeConfig()

rs2::config open3d::t::io::RealSenseSensorConfig::ConvertToNativeConfig ( ) const

Convert to RealSense config.

◆ get_dtype_channels()

std::pair< core::Dtype, uint8_t > open3d::t::io::RealSenseSensorConfig::get_dtype_channels ( int  rs2_format_enum)
static

Convert rs2_format enum to Open3D Dtype and number of channels

Parameters
rs2_format_enumAn int is accepted instead of rs2_format enum to prevent dependence on the realsense headers.

◆ GetMetadataJson()

Json::Value open3d::t::io::RealSenseSensorConfig::GetMetadataJson ( const rs2::pipeline_profile &  profile)
static

Get metadata for a streaming RealSense camera or bag file.

◆ GetPixelDtypes()

void open3d::t::io::RealSenseSensorConfig::GetPixelDtypes ( const rs2::pipeline_profile &  profile,
RGBDVideoMetadata metadata 
)
static

Get pixel data types for color and depth streams. These will be set in metadata.color_dt_, metadata.color_channels_ and metadata.depth_dt_

Field Documentation

◆ config_

std::unordered_map<std::string, std::string> open3d::t::io::RealSenseSensorConfig::config_

The documentation for this class was generated from the following files: