![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <AzureKinectSensor.h>


Public Member Functions | |
| AzureKinectSensor (const AzureKinectSensorConfig &sensor_config) | |
| Default Constructor. More... | |
| ~AzureKinectSensor () | |
| bool | Connect (size_t sensor_index) override |
| void | Disconnect () |
| std::shared_ptr< geometry::RGBDImage > | CaptureFrame (bool enable_align_depth_to_color) const override |
Public Member Functions inherited from cloudViewer::io::RGBDSensor | |
| RGBDSensor () | |
| virtual | ~RGBDSensor () |
Static Public Member Functions | |
| static bool | PrintFirmware (_k4a_device_t *device) |
| static bool | ListDevices () |
| List available Azure Kinect devices. More... | |
| static std::shared_ptr< geometry::RGBDImage > | DecompressCapture (_k4a_capture_t *capture, _k4a_transformation_t *transformation) |
Protected Member Functions | |
| _k4a_capture_t * | CaptureRawFrame () const |
Protected Attributes | |
| AzureKinectSensorConfig | sensor_config_ |
| _k4a_transformation_t * | transform_depth_to_color_ |
| _k4a_device_t * | device_ |
| int | timeout_ |
AzureKinect sensor.
Definition at line 34 of file AzureKinectSensor.h.
| cloudViewer::io::AzureKinectSensor::AzureKinectSensor | ( | const AzureKinectSensorConfig & | sensor_config | ) |
Default Constructor.
Definition at line 23 of file AzureKinectSensor.cpp.
| cloudViewer::io::AzureKinectSensor::~AzureKinectSensor | ( | ) |
Definition at line 27 of file AzureKinectSensor.cpp.
References Disconnect().
|
overridevirtual |
Capture one frame, return an RGBDImage. If enable_align_depth_to_color is true, the depth image will be warped to align with the color image; otherwise the raw depth image output will be saved. Setting enable_align_depth_to_color to false is useful when capturing at high resolution with high frame rates.
Implements cloudViewer::io::RGBDSensor.
Definition at line 132 of file AzureKinectSensor.cpp.
References CaptureRawFrame(), DecompressCapture(), cloudViewer::io::k4a_plugin::k4a_capture_release(), and transform_depth_to_color_.
Referenced by cloudViewer::io::pybind_sensor().
|
protected |
Definition at line 115 of file AzureKinectSensor.cpp.
References device_, cloudViewer::io::k4a_plugin::k4a_device_get_capture(), LogWarning, result, and timeout_.
Referenced by CaptureFrame(), and cloudViewer::io::AzureKinectRecorder::RecordFrame().
|
overridevirtual |
Implements cloudViewer::io::RGBDSensor.
Definition at line 29 of file AzureKinectSensor.cpp.
References cloudViewer::io::AzureKinectSensorConfig::ConvertToNativeConfig(), device_, cloudViewer::io::k4a_plugin::k4a_device_close(), cloudViewer::io::k4a_plugin::k4a_device_get_calibration(), cloudViewer::io::k4a_plugin::k4a_device_get_installed_count(), cloudViewer::io::k4a_plugin::k4a_device_open(), cloudViewer::io::k4a_plugin::k4a_device_set_color_control(), cloudViewer::io::k4a_plugin::k4a_device_start_cameras(), cloudViewer::io::k4a_plugin::k4a_transformation_create(), LogInfo, LogWarning, PrintFirmware(), sensor_config_, timeout_, and transform_depth_to_color_.
Referenced by cloudViewer::io::AzureKinectRecorder::InitSensor(), and cloudViewer::io::pybind_sensor().
|
static |
Definition at line 231 of file AzureKinectSensor.cpp.
References cloudViewer::io::ConvertBGRAToRGB(), height, cloudViewer::io::k4a_plugin::k4a_capture_get_color_image(), cloudViewer::io::k4a_plugin::k4a_capture_get_depth_image(), cloudViewer::io::k4a_plugin::k4a_image_create_from_buffer(), cloudViewer::io::k4a_plugin::k4a_image_get_buffer(), cloudViewer::io::k4a_plugin::k4a_image_get_format(), cloudViewer::io::k4a_plugin::k4a_image_get_height_pixels(), cloudViewer::io::k4a_plugin::k4a_image_get_size(), cloudViewer::io::k4a_plugin::k4a_image_get_width_pixels(), cloudViewer::io::k4a_plugin::k4a_image_release(), cloudViewer::io::k4a_plugin::k4a_transformation_depth_image_to_color_camera(), LogDebug, LogWarning, NULL, and width.
Referenced by CaptureFrame(), cloudViewer::io::MKVReader::NextFrame(), and cloudViewer::io::AzureKinectRecorder::RecordFrame().
| void cloudViewer::io::AzureKinectSensor::Disconnect | ( | ) |
Definition at line 110 of file AzureKinectSensor.cpp.
References device_, cloudViewer::io::k4a_plugin::k4a_device_close(), and cloudViewer::io::k4a_plugin::k4a_device_stop_cameras().
Referenced by cloudViewer::io::pybind_sensor(), and ~AzureKinectSensor().
|
static |
List available Azure Kinect devices.
Definition at line 210 of file AzureKinectSensor.cpp.
References cloudViewer::io::k4a_plugin::k4a_device_close(), cloudViewer::io::k4a_plugin::k4a_device_get_installed_count(), cloudViewer::io::k4a_plugin::k4a_device_open(), LogError, LogInfo, LogWarning, and PrintFirmware().
Referenced by cloudViewer::io::pybind_sensor().
|
static |
Definition at line 177 of file AzureKinectSensor.cpp.
References cloudViewer::io::k4a_plugin::k4a_device_get_serialnum(), cloudViewer::io::k4a_plugin::k4a_device_get_version(), LogInfo, and LogWarning.
Referenced by Connect(), and ListDevices().
|
protected |
Definition at line 56 of file AzureKinectSensor.h.
Referenced by CaptureRawFrame(), Connect(), Disconnect(), and cloudViewer::io::AzureKinectRecorder::OpenRecord().
|
protected |
Definition at line 54 of file AzureKinectSensor.h.
Referenced by Connect(), and cloudViewer::io::AzureKinectRecorder::OpenRecord().
|
protected |
Definition at line 57 of file AzureKinectSensor.h.
Referenced by CaptureRawFrame(), and Connect().
|
protected |
Definition at line 55 of file AzureKinectSensor.h.
Referenced by CaptureFrame(), Connect(), and cloudViewer::io::AzureKinectRecorder::RecordFrame().