偶尔听到有人需要labview读取k2数据,恰巧看到文章分享到这里,希望能被更多的人看到。建议去他的原网站阅读,说不定更新了呢~
Kinect 2 – Haro3D™ VI Library
Overview
The Kinect is a sensor developed by Microsoft for the Xbox game console. Its main goal is to be able to interpret human positions and gestures. To accomplish this task, the Kinect is equipped with a depth measurement system based on active illumination. This feature makes the Kinect a low cost three-dimensional camera that can be used for applications outside the gaming industry. More information about the Kinect can be found at www.microsoft.com/en-us/kinectforwindows/meetkinect/features.aspx.
When the first Kinect came out, the great Kinesthesia library was rapidly made available by University of Leeds. That library is based on .NET assemblies that can be used directly from Labview. The Kinect for Windows v2 was first made available at the end of 2013 within a beta program, and the public release was July 2014. To our knowledge, no VI library to access the Kinect v2 features from Labview has been available so far. One reason might be that there are apparently some issues to access the Kinect v2 from within Labview using the .NET assemblies.
We believe that the Kinect is a great piece of hardware, and that Labview has great, but under-exploited 3D Visualization tools. At HaroTek, we developed a VI library called Haro3D™. This VI library contains API VI’s to access some features of the Kinect v2. These API VI’s are basically wrapper around two DLL’s (one for 32-bit and the other for 64-bit versions of Labview) that were developed in C++.
Redistribution and use in source and binary forms of the Haro3D™ library, with or without modification, are permitted provided that the conditions expressed in the accompanying license are met (3-clause BSD license with add-ons for NI and Microsoft).
HaroTek is committed to maintain and keep growing the Haro3D™ library over time.
The Haro3D™ library can be downloaded from the current page. A copy of the manual is also available. The manual is simply the pdf version of the help file accessible from Labview.
Comments are welcome.
More information can be obtained at www.harotek.com.
Description
The Haro3D™ library gives access to the following functionality of theiesKinect v2:
- Bodies (people and joints tracking)
- Colored 3D cloud of points.
- Depth sensing
- Color high-definition camera
- Active infrared imaging
- 3D volume reconstruction
In addition, the Haro3D™ library offers Utilities VI’s to complement the functionalities of the Kinect 2 like VI’s to display and interact with the 3D data, and VI’s to save and read back the 3D data (clouds of points and meshes). Fully functional examples for each of the functionalities are also provided.
Installation
The library comes within a VIPM package from JKI. VIPM installs the library, the examples (in the Example folder of Labview), and a help file that can be accessed through the Labview context help window.
To access the Kinect v2 functions, the Visual C++ redistributable (x86 or x64 depending on your version of Labview) must be installed on your system. Additional requirements are given below.
Requirements
Software
For the Microsoft Kinect for Windows V2:
Operating System: Windows 8 or later, 64-bit.
Upon connecting the Kinect for Windows V2 for the first time to your computer, the drivers should be downloaded through Windows Update. If the computer is not connected to the Internet, download and run the Kinect runtime 2.0 or later (www.microsoft.com/en-us/download/details.aspx?id=44559).
For the Haro3D™ library
The use of the Kinect V2 with the Haro3D™ library requires Visual C++ 2013 Redistributable x86 or x64 (www.microsoft.com/en-us/download/details.aspx?id=40784), (or Visual C++ 2013, Ultimate, Premium, Professional, and Express for Windows Desktop) corresponding to the LabVIEW™ bitness version.
Hardware
Below is an excerpt of the requirements given by Microsoft at (msdn.microsoft.com/en-us/library/dn782036.aspx)
1. Kinect for Windows V2 sensor, which includes a power hub and USB cabling
2. Computer processor: I7 3.1 GHz (or higher), x64 core
3. Memory: 4GB or more
4. Operating System: Windows 8 or later, 64-bit.
5. Video card: DX11 capable graphics adapter (see list of known good adapters below)
- Intel HD 4400 integrated display adapter
- ATI Radeon HD 5400 series
- ATI Radeon HD 6570
- ATI Radeon HD 7800
- (256-bit GDDR5 2GB/1000Mhz)
- NVidia Quadro 600
- NVidia GeForce GT 640
- NVidia GeForce GTX 660
- NVidia Quadro K1000M
6.Built-in USB 3.0 host controller (Intel or Renesas chipset). If you’re adding USB 3.0 functionality to your existing PC through an adapter, please ensure that it is a Windows 8 compliant device and that it supports Gen-2.
Steps to Implement or Execute Code
- Install the library using the VIPM file.
- Make sure that the Kinect v2 is correctly configured
- Look at the examples using the NI Example finder (use Directory Structure, and opens HaroTek-> Haro3D Examples
- Access the API and Utilities VI’s using the function palettes: Addons -> HaroTek -> Haro3D -> Kinect v2 or -> Utilities.
Programming Steps
There are 7 API VI’s. One VI is for the Kinect control. It turns ON and OFF the Kinect. This VI should be called first. The 6 other VI’s gives access to the Bodies, Clouds, Color Image, Depth, Fusion, and Infrared functionalities of the Kinect.
The Haro3D Utilities consist in VI’s to display Bodies, Clouds, and Meshes in Labview 3D pictures, and to save and read Clouds and Meshes in PLY, XYZ, and STL formats.
- Starts the Kinect using the KinectControl API
- Initializes the desired functionalities (using the Init command). More than one functionality can be simultaneously used.
- Access the data.
- Use the Haro3D Utilities VI’s to display, save, or load the 3D data if necessary
- Close the desired functionalities
- Stops the Kinect.
Below is a very simple example of those steps for 2 Kinect functionalities: Clouds and Bodies.
The resulting output of the code above is shown below:
Examples
The examples are installed by VIPM in the Examples directory of Labview under HaroTek/Haro3D Examples. The examples can be accessed through NI Example Finder (see below)
Front panels of the Bodies and Cloud examples are shown below:
Additional Images or Video
We are going to post videos on youtube on the examples VIs and other topics. Check the HaroTek channel:www.youtube.com/channel/UCmxaabC-nkffasAzzlppyKw/feed or check onwww.harotek.com/videos.