Acquire Images with Kinect V2
The Kinect adaptor lets you acquire images using a Kinect®for Windows®V1 or V2 device. The Kinect V2 Sensor runs on Windows 8 and above.
Functions
imaqtool |
Launch Image Acquisition Tool |
videoinput |
Create video input object |
imaq.VideoDevice |
Acquire one frame at a time from video device |
getdata |
Acquired image frames to MATLAB workspace |
peekdata |
Most recently acquired image data |
getsnapshot |
Immediately return single image frame |
start |
Obtain exclusive use of image acquisition device |
islogging |
Determine whether video input object is logging |
isrunning |
Determine whether video input object is running |
isvalid |
Determine whether image acquisition object is associated with image acquisition device |
wait |
等到图像采集对象stops running or logging |
stop |
Stop video input object |
clear |
Clear image acquisition object from MATLAB workspace |
delete |
Remove image acquisition object from memory |
flushdata |
Remove data from memory buffer used to store acquired image frames |
obj2mfile |
视频输入对象转换为MATLAB代码 |
imaqmontage |
Sequence of image frames as montage |
load |
Load image acquisition object into MATLAB workspace |
save |
Save image acquisition objects to MAT-file |
trigger |
Initiate data logging |
triggerconfig |
Configure video input object trigger properties |
triggerinfo |
Provide information about available trigger configurations |
Examples and How To
Because the Kinect for Windows camera has two separate sensors, the color sensor and the depth sensor, the toolbox lists twoDeviceIDs
. Useimaqhwinfo
on the adaptor to display the two device IDs.
Acquire Image and Body Data Using Kinect V2
This example shows how to create avideoinput
object for the color sensor to acquire RGB images and then for the depth sensor to acquire body data. It also outlines the properties of each sensor, and the skeletal metadata.
Acquire Data from Kinect V2 Color and Depth Devices Simultaneously
You can synchronize the data from the Kinect for Windows color stream and the depth stream using software manual triggering.
Plot colored point cloud from Kinect for Windows
This example shows how to plot color point cloud using the Kinect for Windows v2.
Preview color and depth streams from the Kinect for Windows v2 simultaneously
This example shows how to preview color and depth streams using the Kinect for Windows v2.
Skeleton Viewer for Kinect V2 Skeletal Data
This example shows how to view an RGB image taken with the Kinect V2 with the skeleton joint locations overlaid on the image.
Concepts
Key Features and Differences in the Kinect V2 Support
Doing image acquisition with a Kinect for Windows camera is similar to using other cameras and adaptors, but has some key differences. This section also outlines the requirements and supported hardware for Kinect V2.
Data Streams Returned by the Kinect V2 Adaptor in MATLAB
The Kinect for Windows V2 device returns these data streams in MATLAB. The formats of the image and depth streams are outlined here.