I have been trying to visualise the long throw depth data returned by MediaFrameReader. I use the following code snippet to obtain the byte array of the frame's SoftwareBitmap
and then I just interpret every two elements of bitmapBufferData as a pixel on the depth map but when I plotted out the resulting uint16 2D array, I got the images likes these:
as you can see, they are not only cut into two parts but distorted as well. Any idea what the problem could be? Thanks in advance.
Hi,
I have been trying to visualise the long throw depth data returned by MediaFrameReader. I use the following code snippet to obtain the byte array of the frame's SoftwareBitmap
bitmapBuffer = bitmap-> LockBuffer(Windows::Graphics::Imaging::BitmapBufferAccessMode::Read);
bitmapBufferReference = bitmapBuffer->CreateReference();
uint32_t bitmapBufferDataSize = 0;
uint8_t* bitmapBufferData = Io::GetTypedPointerToMemoryBuffer(bitmapBufferReference, bitmapBufferDataSize);
and then I just interpret every two elements of bitmapBufferData as a pixel on the depth map but when I plotted out the resulting uint16 2D array, I got the images likes these:
as you can see, they are not only cut into two parts but distorted as well. Any idea what the problem could be? Thanks in advance.