Table of Contents
Kinect Get Depth
Gets a depth image and player information from the Kinect sensor.
Library
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
qc_open_library('quarc_library/Multimedia')Description
The Kinect Get Depth block gets a depth image from the Kinect sensor. A depth image consists of a bitmap in which each pixel represents the distance between the vertical plane of the camera and the objects in the scene. The Kinect Get Depth block reports the distance in millimetres for each pixel. Be careful to note that the distance is from the plane of the camera and not the radial distance from camera itself. The Kinect Get Depth block treats the camera as a vertical plane. The radial distance would treat the camera as a point. Hence, a large flat object in the camera view that is parallel to the vertical plane of the camera will be reported as equidistant in all points from the camera. If the radial distance were used then each point of the object would not be equidistant from the camera, and the object would appear distorted.
If the Show player option is checked, the Kinect Get Depth block also reports player information. Like the depth image, the player information is presented as a bitmap, but in this case each pixel represents a player number. The Kinect can distinguish up to six players. Players are numbered sequentially starting with player one. Note that if a player leaves the scene they will likely be assigned a new player number when they re-enter the scene.
A Kinect Initialize block must be present in the model to configure the Kinect sensor.
Limitations
QUARC Linux DuoVero Target
Only the 640x480 resolution is currently supported on the QUARC Linux DuoVero target. Also, player information is not currently available on this target.
Input Ports
This block has no input ports.
Output Ports
depth
A two-dimensional uint16 matrix representing the depth image. Each element of the matrix represents the distance in millimetres between the object visible at that pixel and the vertical plane of the camera. The matrix is compatible with The MathWorks'
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc vision;#
The frame number of the current depth frame. This output may be used to keep track of the number of frames per second being processed by the Kinect sensor.
time
The timestamp associated with the current frame. The timestamp is not necessarily related to the time the model was started.
player
An optional two-dimensional uint16 matrix representing the players in the scene. Each element of the matrix contains the number of the player visible at that pixel. If there is no player at that pixel then the element is zero. The matrix is compatible with The MathWorks'
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc vision;Parameters and Dialog Box
Kinect name
The identity of the associated Kinect Initialize block. The Kinect Get Depth block must be associated with a Kinect Initialize block.
Image resolution
The resolution of the depth image to retrieve. The Kinect sensor only supports a limited set of resolutions and not all resolutions are supported on all targets. The 640x480 resolution is supported on all targets that support the Kinect.
Sample time
The sampling period (in seconds) of the Kinect Get Depth block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time.
A sample time of -1 indicates that the block inherits its sample time. Since this is a source block, only inherent the sample time when it is placed in a conditionally executed subsystem, like a Triggered or Enabled Subsystem, or in a referenced model.
The default sample time is set to qc_get_step_size * ceil(0.033 / qc_get_step_size). The qc_get_step_size function is a QUARC function that returns the fundamental sampling time of the model. Hence, the default sample time is a discrete sample time which is a multiple of the fixed step size of the model and close to 1/30 of a second.
Show player
If this option is checked then the player output is provided and player information may be retrieved from the scene. Not all targets support this option.
Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
Only the 640x480 resolution is presently supported. Player information is not currently supported. |
|
Yes |
Yes |
||
No |
No |
Not supported. |
|
No |
No |
Not supported. |
|
Rapid Simulation (RSIM) Target |
Yes |
Yes |
Fully supported. |
S-Function Target |
No |
N/A |
Old technology. Use model referencing instead. |
Normal simulation |
Yes |
Yes |
Fully supported. |
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.