Open3D (C++ API)
0.19.0
Toggle main menu visibility
Loading...
Searching...
No Matches
cpp
open3d
t
io
sensor
RGBDSensor.h
Go to the documentation of this file.
1
// ----------------------------------------------------------------------------
2
// - Open3D: www.open3d.org -
3
// ----------------------------------------------------------------------------
4
// Copyright (c) 2018-2024 www.open3d.org
5
// SPDX-License-Identifier: MIT
6
// ----------------------------------------------------------------------------
7
8
#pragma once
9
10
#include <string>
11
12
#include "
open3d/io/sensor/RGBDSensorConfig.h
"
13
#include "
open3d/t/geometry/RGBDImage.h
"
14
#include "
open3d/t/io/sensor/RGBDVideoMetadata.h
"
15
16
namespace
open3d
{
17
using
io::RGBDSensorConfig
;
18
namespace
t
{
19
namespace
io
{
20
22
class
RGBDSensor
{
23
public
:
25
RGBDSensor
() {}
26
virtual
~RGBDSensor
() {}
27
44
virtual
bool
InitSensor
(
const
RGBDSensorConfig
&sensor_config,
45
size_t
sensor_index = 0,
46
const
std::string &filename =
""
) = 0;
47
50
virtual
bool
StartCapture
(
bool
start_record =
false
) = 0;
51
53
virtual
void
PauseRecord
() = 0;
54
57
virtual
void
ResumeRecord
() = 0;
58
65
virtual
geometry::RGBDImage
CaptureFrame
(
66
bool
wait =
true
,
bool
align_depth_to_color =
true
) = 0;
67
69
virtual
uint64_t
GetTimestamp
()
const
= 0;
70
72
virtual
void
StopCapture
() = 0;
73
75
virtual
const
RGBDVideoMetadata
&
GetMetadata
()
const
= 0;
76
78
virtual
std::string
GetFilename
()
const
= 0;
79
81
virtual
const
std::string
ToString
()
const
{
82
return
fmt::format(
83
"RGBD sensor {} (serial {}){}{}"
,
GetMetadata
().device_name_,
84
GetMetadata
().serial_number_,
85
GetTimestamp
() == 0 ?
""
86
:
"\nCapturing video: timestamp (us) = "
+
87
std::to_string(
GetTimestamp
()),
88
GetFilename
().empty() ?
""
89
:
"\nRecording to file "
+
GetFilename
());
90
}
91
};
92
93
}
// namespace io
94
}
// namespace t
95
}
// namespace open3d
RGBDSensorConfig.h
RGBDVideoMetadata.h
open3d::io::RGBDSensorConfig
Definition
RGBDSensorConfig.h:15
open3d::t::geometry::RGBDImage
RGBDImage A pair of color and depth images.
Definition
RGBDImage.h:21
open3d::t::io::RGBDSensor::CaptureFrame
virtual geometry::RGBDImage CaptureFrame(bool wait=true, bool align_depth_to_color=true)=0
open3d::t::io::RGBDSensor::StopCapture
virtual void StopCapture()=0
Stop capturing frames.
open3d::t::io::RGBDSensor::ResumeRecord
virtual void ResumeRecord()=0
open3d::t::io::RGBDSensor::GetFilename
virtual std::string GetFilename() const =0
Get filename being written.
open3d::t::io::RGBDSensor::~RGBDSensor
virtual ~RGBDSensor()
Definition
RGBDSensor.h:26
open3d::t::io::RGBDSensor::InitSensor
virtual bool InitSensor(const RGBDSensorConfig &sensor_config, size_t sensor_index=0, const std::string &filename="")=0
open3d::t::io::RGBDSensor::PauseRecord
virtual void PauseRecord()=0
Pause recording to the file.
open3d::t::io::RGBDSensor::GetTimestamp
virtual uint64_t GetTimestamp() const =0
Get current timestamp (in us).
open3d::t::io::RGBDSensor::RGBDSensor
RGBDSensor()
Default constructor. Initialize with default settings.
Definition
RGBDSensor.h:25
open3d::t::io::RGBDSensor::GetMetadata
virtual const RGBDVideoMetadata & GetMetadata() const =0
Get const reference to the metadata of the RGBD video capture.
open3d::t::io::RGBDSensor::ToString
virtual const std::string ToString() const
Text Description.
Definition
RGBDSensor.h:81
open3d::t::io::RGBDSensor::StartCapture
virtual bool StartCapture(bool start_record=false)=0
open3d::t::io::RGBDVideoMetadata
RGBD video metadata.
Definition
RGBDVideoMetadata.h:26
open3d::t::io
Definition
FileASSIMP.cpp:35
open3d::t
Definition
BoundingVolume.cpp:15
open3d
Definition
PinholeCameraIntrinsic.cpp:16
RGBDImage.h
Generated by
1.17.0