Different ways of retrieving the color stream from Kinect

The image frames are a type of the ColorImageFrame class. Depending on the type of images you are using, the sensor will return the image frame. To get any color frame from the sensor, you need to either subscribe to the event handler or explicitly send the request to the sensor to send a frame:

Different ways of retrieving the color stream from Kinect

There are two ways of capturing the same in your application:

  • Event model
  • Polling model

Event model

Using the event model, the Kinect sensor sends the frame to the application whenever a new frame is captured by the sensor. For that you need to subscribe to the specific event handler using your code, where you need to process the incoming frames. Before subscribing to the event, you must tell the SDK the color type and resolution of image streams you are looking for. Once it's subscribed to, the sensor will send the data continuously unless you disable and unsubscribe the channel, or stop the sensor.

Event model

Polling model

The polling model is an on-demand model where you need to send a request to the sensor whenever there is a necessity to get an image frame. For the polling model, you have to pass the time interval after which the sensor will return the image frame.

Polling model

Note

If there is any open color channel and there is no subscriber event on that channel, the SDK will automatically pick up the existing channel to get an image frame. If there is no channel open, the SDK will create a new channel to get the frame from the sensor. You can't send a request for images to a channel that is already subscribed by an event handler.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.172.146