Open3D (C++ API)  0.18.0+601516a
Public Member Functions | Static Public Member Functions
open3d::t::io::RealSenseSensor Class Reference

RealSense camera discovery, configuration, streaming and recording. More...

#include <RealSenseSensor.h>

Inheritance diagram for open3d::t::io::RealSenseSensor:
open3d::t::io::RGBDSensor

Public Member Functions

 RealSenseSensor ()
 Default constructor. Initialize with default settings. More...
 
 RealSenseSensor (const RealSenseSensor &)=delete
 
RealSenseSensoroperator= (const RealSenseSensor &)=delete
 
virtual ~RealSenseSensor () override
 
virtual bool InitSensor (const RealSenseSensorConfig &sensor_config=RealSenseSensorConfig{}, size_t sensor_index=0, const std::string &filename="")
 
virtual bool InitSensor (const RGBDSensorConfig &sensor_config, size_t sensor_index=0, const std::string &filename="") override
 
virtual bool StartCapture (bool start_record=false) override
 
virtual void PauseRecord () override
 
virtual void ResumeRecord () override
 
virtual geometry::RGBDImage CaptureFrame (bool wait=true, bool align_depth_to_color=true) override
 
virtual uint64_t GetTimestamp () const override
 
virtual void StopCapture () override
 Stop capturing frames. More...
 
virtual const RGBDVideoMetadataGetMetadata () const override
 Get metadata of the RealSense video capture. More...
 
virtual std::string GetFilename () const override
 Get filename being written. More...
 
virtual const std::string ToString () const
 Text Description. More...
 
- Public Member Functions inherited from open3d::t::io::RGBDSensor
 RGBDSensor ()
 Default constructor. Initialize with default settings. More...
 
virtual ~RGBDSensor ()
 
virtual const std::string ToString () const
 Text Description. More...
 

Static Public Member Functions

static std::vector< RealSenseValidConfigsEnumerateDevices ()
 
static bool ListDevices ()
 

Detailed Description

RealSense camera discovery, configuration, streaming and recording.

Constructor & Destructor Documentation

◆ RealSenseSensor() [1/2]

open3d::t::io::RealSenseSensor::RealSenseSensor ( )

Default constructor. Initialize with default settings.

◆ RealSenseSensor() [2/2]

open3d::t::io::RealSenseSensor::RealSenseSensor ( const RealSenseSensor )
delete

◆ ~RealSenseSensor()

open3d::t::io::RealSenseSensor::~RealSenseSensor ( )
overridevirtual

Member Function Documentation

◆ CaptureFrame()

geometry::RGBDImage open3d::t::io::RealSenseSensor::CaptureFrame ( bool  wait = true,
bool  align_depth_to_color = true 
)
overridevirtual

Acquire the next synchronized RGBD frameset from the camera.

Parameters
waitIf true wait for the next frame set, else return immediately with an empty RGBDImage if it is not yet available.
align_depth_to_colorEnable aligning WFOV depth image to the color image in visualizer.

Implements open3d::t::io::RGBDSensor.

◆ EnumerateDevices()

std::vector< RealSenseValidConfigs > open3d::t::io::RealSenseSensor::EnumerateDevices ( )
static

Query all connected RealSense cameras for their capabilities.

Returns
A list of devices and their supported capabilities.

◆ GetFilename()

virtual std::string open3d::t::io::RealSenseSensor::GetFilename ( ) const
inlineoverridevirtual

Get filename being written.

Implements open3d::t::io::RGBDSensor.

◆ GetMetadata()

virtual const RGBDVideoMetadata& open3d::t::io::RealSenseSensor::GetMetadata ( ) const
inlineoverridevirtual

Get metadata of the RealSense video capture.

Implements open3d::t::io::RGBDSensor.

◆ GetTimestamp()

virtual uint64_t open3d::t::io::RealSenseSensor::GetTimestamp ( ) const
inlineoverridevirtual

◆ InitSensor() [1/2]

bool open3d::t::io::RealSenseSensor::InitSensor ( const RealSenseSensorConfig sensor_config = RealSenseSensorConfig{},
size_t  sensor_index = 0,
const std::string &  filename = "" 
)
virtual

Initialize sensor (optional).

Configure sensor with custom settings. If this is skipped, default settings will be used. You can enable recording to a bag file by specifying a filename.

Parameters
sensor_configCamera configuration, such as resolution and framerate. A serial number can be entered here to connect to a specific camera.
sensor_indexConnect to a camera at this position in the enumeration of RealSense cameras that are currently connected. Use EnumerateDevices() or ListDevices() to obtain a list of connected cameras. This is ignored if sensor_config contains a serial entry.
filenameSave frames to a bag file
Returns
true if a camera was found and initialized with the given settings, else false.

◆ InitSensor() [2/2]

virtual bool open3d::t::io::RealSenseSensor::InitSensor ( const RGBDSensorConfig sensor_config,
size_t  sensor_index = 0,
const std::string &  filename = "" 
)
inlineoverridevirtual

Initialize sensor (optional).

Configure sensor with custom settings. If this is skipped, default settings will be used. You can enable recording to a file by specifying a filename.

Parameters
sensor_configCamera configuration, such as resolution and framerate. A serial number can be entered here to connect to a specific camera.
sensor_indexConnect to a camera at this position in the enumeration of RealSense cameras that are currently connected. Use EnumerateDevices() or ListDevices() to obtain a list of connected cameras and their capabilities. This is ignored if sensor_config contains a "serial" entry.
filenameSave frames to this file.
Returns
true if a camera was found and initialized with the given settings, else false.

Implements open3d::t::io::RGBDSensor.

◆ ListDevices()

bool open3d::t::io::RealSenseSensor::ListDevices ( )
static

List all RealSense cameras connected to the system along with their capabilities. Use this listing to select an appropriate configuration for a camera.

◆ operator=()

RealSenseSensor& open3d::t::io::RealSenseSensor::operator= ( const RealSenseSensor )
delete

◆ PauseRecord()

void open3d::t::io::RealSenseSensor::PauseRecord ( )
overridevirtual

Pause recording to the bag file.

Warning
If this is called immediately after StartCapture(), the bag file may have an incorrect end time.

Implements open3d::t::io::RGBDSensor.

◆ ResumeRecord()

void open3d::t::io::RealSenseSensor::ResumeRecord ( )
overridevirtual

Resume recording to the bag file. The file will contain discontinuous segments.

Implements open3d::t::io::RGBDSensor.

◆ StartCapture()

bool open3d::t::io::RealSenseSensor::StartCapture ( bool  start_record = false)
overridevirtual

Start capturing synchronized depth and color frames.

Parameters
start_recordstart recording to the specified bag file as well.

Implements open3d::t::io::RGBDSensor.

◆ StopCapture()

void open3d::t::io::RealSenseSensor::StopCapture ( )
overridevirtual

Stop capturing frames.

Implements open3d::t::io::RGBDSensor.

◆ ToString()

virtual const std::string open3d::t::io::RGBDSensor::ToString
inline

Text Description.


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