ColorFrame.RawColorImageFormat
PixelFormats.Bgra32.BitsPerPixel = 32
To get color data, you can use of these following methods under ColorFrame
class.
The data for this frame is stored as 16-bit unsigned integers, where each value represents the distance in millimeters.
Gives an app access to the underlying buffer used by the system to store this frame's data.
DepthFrame.CopyFrameDataToArray
if ((openStreams | FrameSourceTypes.Depth) != 0)
{
using (DepthFrame dFrame = frame.DepthFrameReference.AcquireFrame())
{
if (dFrame != null)
{
FrameDescription fd = dFrame.FrameDescription;
FrameDescription fsfd = dFrame.DepthFrameSource.FrameDescription;
var size2 = fsfd.Width * fsfd.Height * fsfd.BytesPerPixel;
var size = fd.Width * fd.Height * fd.BytesPerPixel;
Console.WriteLine(size);//434,176
Console.WriteLine(size2);