Working with Azure Kinect but without body and only single sensor per machine

This commit is contained in:
Marek Kowalski
2019-08-16 17:27:03 +01:00
parent 987aa32b70
commit f49bcaf5d9
15 changed files with 524 additions and 523 deletions
@@ -0,0 +1,33 @@
#pragma once
#include "stdafx.h"
#include "ICapture.h"
#include <k4a/k4a.h>
#include "utils.h"
class AzureKinectCapture : public ICapture
{
public:
AzureKinectCapture();
~AzureKinectCapture();
bool Initialize();
bool Initialize(int deviceIdx);
bool AcquireFrame();
void MapDepthFrameToCameraSpace(Point3f *pCameraSpacePoints);
void MapColorFrameToCameraSpace(Point3f *pCameraSpacePoints);
void MapDepthFrameToColorSpace(UINT16 *pDepthInColorSpace);
void MapColorFrameToDepthSpace(RGB *pColorInDepthSpace);
private:
k4a_device_t kinectSensor = NULL;
int32_t captureTimeoutMs = 1000;
k4a_image_t colorImage = NULL;
k4a_image_t depthImage = NULL;
k4a_image_t depthPointCloudImage = NULL;
k4a_image_t colorImageInDepth = NULL;
k4a_image_t depthImageInColor = NULL;
k4a_transformation_t transformation = NULL;
void UpdateDepthPointCloud();
};