Open3D (C++ API)  0.16.1
AzureKinectRecorder.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------------
2// - Open3D: www.open3d.org -
3// ----------------------------------------------------------------------------
4// The MIT License (MIT)
5//
6// Copyright (c) 2018-2021 www.open3d.org
7//
8// Permission is hereby granted, free of charge, to any person obtaining a copy
9// of this software and associated documentation files (the "Software"), to deal
10// in the Software without restriction, including without limitation the rights
11// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12// copies of the Software, and to permit persons to whom the Software is
13// furnished to do so, subject to the following conditions:
14//
15// The above copyright notice and this permission notice shall be included in
16// all copies or substantial portions of the Software.
17//
18// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24// IN THE SOFTWARE.
25// ----------------------------------------------------------------------------
26
27#pragma once
28
29#include <atomic>
30#include <memory>
31#include <string>
32
36
37struct _k4a_record_t; // typedef _k4a_record_t* k4a_record_t;
38
39namespace open3d {
40
41namespace geometry {
42class RGBDImage;
43class Image;
44} // namespace geometry
45
46namespace io {
47
52public:
54 size_t sensor_index);
55 ~AzureKinectRecorder() override;
56
58 bool InitSensor() override;
62 bool OpenRecord(const std::string& filename) override;
64 bool CloseRecord() override;
70 std::shared_ptr<geometry::RGBDImage> RecordFrame(
71 bool write, bool enable_align_depth_to_color) override;
72
75
76protected:
78 _k4a_record_t* recording_;
80
81 bool is_record_created_ = false;
82};
83
84} // namespace io
85} // namespace open3d
Definition: AzureKinectRecorder.h:51
bool InitSensor() override
Initialize sensor.
Definition: AzureKinectRecorder.cpp:59
bool OpenRecord(const std::string &filename) override
Definition: AzureKinectRecorder.cpp:63
AzureKinectSensor sensor_
Definition: AzureKinectRecorder.h:77
std::shared_ptr< geometry::RGBDImage > RecordFrame(bool write, bool enable_align_depth_to_color) override
Definition: AzureKinectRecorder.cpp:99
size_t device_index_
Definition: AzureKinectRecorder.h:79
bool CloseRecord() override
Close the recorded mkv file.
Definition: AzureKinectRecorder.cpp:84
AzureKinectRecorder(const AzureKinectSensorConfig &sensor_config, size_t sensor_index)
Definition: AzureKinectRecorder.cpp:51
~AzureKinectRecorder() override
Definition: AzureKinectRecorder.cpp:57
bool is_record_created_
Definition: AzureKinectRecorder.h:81
bool IsRecordCreated()
Check if the mkv file is created.
Definition: AzureKinectRecorder.h:74
_k4a_record_t * recording_
Definition: AzureKinectRecorder.h:78
Definition: AzureKinectSensorConfig.h:45
Definition: AzureKinectSensor.h:53
Definition: RGBDRecorder.h:35
Definition: PinholeCameraIntrinsic.cpp:35