Extending the KinectCam
So far we have built the basic KinectCam application, which can feed and display the color stream from the sensor. Our next job is to extend it by leveraging the features of Kinect for Windows SDK.
In this section, you will start with displaying frame numbers, displaying and calculating the frame rates, followed by changing image formats, and finally you will learn how to apply color effects by manipulating the color pixels.
Getting the frame number
The Kinect sensor sends the data as an individual frame, and every frame has a number just to identify the frame. This number is incremented with every single frame when you are using the event model to retrieve the image. Whereas for the polling model, with the OpenNextFrame()
method it returns the frame numbers of that particular image frame. FrameNumber
is a read-only property of the ImageFrame
class and can be accessed as follows:
int frameNumber=imageFrame.FrameNumber;
Note
The FrameNumber
property is a unique number that...