Open3D (C++ API)  0.18.0+252c867
AzureKinectSensor.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 <memory>
11 
14 
15 struct _k4a_capture_t; // typedef _k4a_capture_t* k4a_capture_t;
16 struct _k4a_device_t; // typedef _k4a_device_t* k4a_device_t;
17 struct _k4a_transformation_t; // typedef _k4a_transformation_t*
18  // k4a_transformation_t;
19 
20 namespace open3d {
21 namespace geometry {
22 class RGBDImage;
23 class Image;
24 } // namespace geometry
25 
26 namespace io {
27 
28 // Avoid including AzureKinectRecorder.h
29 class AzureKinectRecorder;
30 
34 class AzureKinectSensor : public RGBDSensor {
35 public:
37  AzureKinectSensor(const AzureKinectSensorConfig& sensor_config);
39 
40  bool Connect(size_t sensor_index) override;
41  void Disconnect();
42  std::shared_ptr<geometry::RGBDImage> CaptureFrame(
43  bool enable_align_depth_to_color) const override;
44 
45  static bool PrintFirmware(_k4a_device_t* device);
47  static bool ListDevices();
48  static std::shared_ptr<geometry::RGBDImage> DecompressCapture(
49  _k4a_capture_t* capture, _k4a_transformation_t* transformation);
50 
51 protected:
52  _k4a_capture_t* CaptureRawFrame() const;
53 
55  _k4a_transformation_t* transform_depth_to_color_;
56  _k4a_device_t* device_;
57  int timeout_;
58 
59  friend class AzureKinectRecorder;
60 };
61 
62 } // namespace io
63 } // namespace open3d
Definition: AzureKinectRecorder.h:32
Definition: AzureKinectSensorConfig.h:26
Definition: AzureKinectSensor.h:34
_k4a_transformation_t * transform_depth_to_color_
Definition: AzureKinectSensor.h:55
static std::shared_ptr< geometry::RGBDImage > DecompressCapture(_k4a_capture_t *capture, _k4a_transformation_t *transformation)
Definition: AzureKinectSensor.cpp:233
std::shared_ptr< geometry::RGBDImage > CaptureFrame(bool enable_align_depth_to_color) const override
Definition: AzureKinectSensor.cpp:132
_k4a_device_t * device_
Definition: AzureKinectSensor.h:56
int timeout_
Definition: AzureKinectSensor.h:57
bool Connect(size_t sensor_index) override
Definition: AzureKinectSensor.cpp:29
void Disconnect()
Definition: AzureKinectSensor.cpp:110
static bool PrintFirmware(_k4a_device_t *device)
Definition: AzureKinectSensor.cpp:179
AzureKinectSensorConfig sensor_config_
Definition: AzureKinectSensor.h:54
AzureKinectSensor(const AzureKinectSensorConfig &sensor_config)
Default Constructor.
Definition: AzureKinectSensor.cpp:23
static bool ListDevices()
List available Azure Kinect devices.
Definition: AzureKinectSensor.cpp:212
_k4a_capture_t * CaptureRawFrame() const
Definition: AzureKinectSensor.cpp:115
~AzureKinectSensor()
Definition: AzureKinectSensor.cpp:27
Definition: RGBDSensor.h:22
Definition: PinholeCameraIntrinsic.cpp:16