Open3D (C++ API)  0.18.0+252c867
AzureKinectRecorder.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <atomic>
11 #include <memory>
12 #include <string>
13 
17 
18 struct _k4a_record_t; // typedef _k4a_record_t* k4a_record_t;
19 
20 namespace open3d {
21 
22 namespace geometry {
23 class RGBDImage;
24 class Image;
25 } // namespace geometry
26 
27 namespace io {
28 
33 public:
34  AzureKinectRecorder(const AzureKinectSensorConfig& sensor_config,
35  size_t sensor_index);
36  ~AzureKinectRecorder() override;
37 
39  bool InitSensor() override;
43  bool OpenRecord(const std::string& filename) override;
45  bool CloseRecord() override;
51  std::shared_ptr<geometry::RGBDImage> RecordFrame(
52  bool write, bool enable_align_depth_to_color) override;
53 
56 
57 protected:
59  _k4a_record_t* recording_;
60  size_t device_index_;
61 
62  bool is_record_created_ = false;
63 };
64 
65 } // namespace io
66 } // namespace open3d
Definition: AzureKinectRecorder.h:32
bool InitSensor() override
Initialize sensor.
Definition: AzureKinectRecorder.cpp:40
bool OpenRecord(const std::string &filename) override
Definition: AzureKinectRecorder.cpp:44
AzureKinectSensor sensor_
Definition: AzureKinectRecorder.h:58
std::shared_ptr< geometry::RGBDImage > RecordFrame(bool write, bool enable_align_depth_to_color) override
Definition: AzureKinectRecorder.cpp:80
size_t device_index_
Definition: AzureKinectRecorder.h:60
bool CloseRecord() override
Close the recorded mkv file.
Definition: AzureKinectRecorder.cpp:65
AzureKinectRecorder(const AzureKinectSensorConfig &sensor_config, size_t sensor_index)
Definition: AzureKinectRecorder.cpp:32
~AzureKinectRecorder() override
Definition: AzureKinectRecorder.cpp:38
bool is_record_created_
Definition: AzureKinectRecorder.h:62
bool IsRecordCreated()
Check if the mkv file is created.
Definition: AzureKinectRecorder.h:55
_k4a_record_t * recording_
Definition: AzureKinectRecorder.h:59
Definition: AzureKinectSensorConfig.h:26
Definition: AzureKinectSensor.h:34
Definition: RGBDRecorder.h:16
Definition: PinholeCameraIntrinsic.cpp:16