MCPcopy Create free account
hub / github.com/SirLynix/obs-kinect / MapColorToDepth

Method MapColorToDepth

src/KinectDevice.cpp:59–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59bool KinectDevice::MapColorToDepth(const std::uint16_t* depthValues, std::size_t valueCount, std::size_t colorPixelCount, DepthCoordinates* depthCoordinatesOut)
60{
61 static_assert(sizeof(UINT16) == sizeof(std::uint16_t));
62 static_assert(sizeof(DepthCoordinates) == sizeof(DepthSpacePoint));
63
64 const UINT16* depthPtr = reinterpret_cast<const UINT16*>(depthValues);
65 DepthSpacePoint* coordinatePtr = reinterpret_cast<DepthSpacePoint*>(depthCoordinatesOut);
66
67 HRESULT r = m_coordinateMapper->MapColorFrameToDepthSpace(UINT(valueCount), depthPtr, UINT(colorPixelCount), coordinatePtr);
68 if (FAILED(r))
69 return false;
70
71 return true;
72}
73
74auto KinectDevice::RetrieveBodyIndexFrame(IMultiSourceFrame* multiSourceFrame) -> BodyIndexFrameData
75{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected