創建基於kinect的c++控制台應用程序


注意:“官方指導”是我從官網摘錄的,具體內容可以參照安裝的文檔。如果你僅僅是要進行開發,只要參照我的“配置”對工程項目進行簡單的設置就可以了。(機器配置可以不同)

 

一、官方指導

To Create an Unmanaged Application

follow these steps for implementing an unmanaged application.

1. include <NuiApi.h> in your source code

2. for standard definitions, include <windows.h> in your source code

3. To use the NUI API, include NuiApi.h, which is in %KINECTSDK10_DIR%\inc. NuiApi.h includes NuiCamera.h and NuiSkeleton.h also.

4. To use the Kinect Audio API, include NuiSensor.h, which is in %KINECTSDK10_DIR%\inc.

5. Link to Kinect10.lib, which is in %KINECTSDK10_DIR%\lib\x86 (for 32-bit apps) or %KINECTSDK10_DIR%\lib\amd64 (for 64-bit apps).

6. If you are using played index information, specify both NUI_INITIALIZE_FLAG_USES_DEPTH_AND_PLAYER_INDEX and NUI_INITIALIZE_FLAG_USES_SKELETON in the dwFlags parameter to NuiInitialize.

7. The C++ header files are installed in the path contained in the environment variable: KINECTSDK10_DIR, and include the following files:

  1. NuiApi.h - Aggregates all NUI API headers and defines basic initialization and access functions. Use these functions to enumerate devices and access multiple devices. This is the main header file to include in your C++ project; this file includes NuiImageCamera.h and NuiSkeleton.h.
  2. NuiImageCamera.h - APIs for image and camera services for adjust camera settings, opening reading data streams.
  3. NuiSkeleton.h - APIs for enabling skeleton tracking, getting skeleton data and for transforming skeleton data for smoother rendering.
  4. NuiSensor.h - Audio APIs including the ISoundSourceLocalizer interface which supports beamforming and source localization

二、配置

1.環境

硬件:
 CPU : Pentium(R)Dual-Core CPU E6600 @ 3.06GHz
 內存:2G

軟件
 操作系統:Windows 7 旗艦版 32位

 開發環境visual studio 2010 professional + Kinect for Windows SDK v1.5

2. 配置過程

 a. 在VS2010項目中,設置VC++目錄 包含目錄中加入 %KINECTSDK10_DIR%\inc 庫目錄中加入%KINECTSDK10_DIR%\lib\x86

 b. 添加特定庫 在鏈接器中設置附加依賴項,填入kinect10.lib

 c. 頭文件包含 #include <Windows.h> #include<NuiApi.h>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM