資源簡(jiǎn)介
此工程實(shí)現(xiàn)了kinect的骨架提取和跟蹤的功能,非常有用
代碼片段和文件信息
//------------------------------------------------------------------------------
//?
//?????Copyright?(c)?Microsoft?Corporation.??All?rights?reserved.
//?
//------------------------------------------------------------------------------
#include?“stdafx.h“
#include?
#include?“DepthBasics.h“
#include?“resource.h“
///?
///?Entry?point?for?the?application
///?
///?handle?to?the?application?instance
///?always?0
///?command?line?arguments
///?whether?to?display?minimized?maximized?or?normally
///?status
int?APIENTRY?wWinMain(HINSTANCE?hInstance?HINSTANCE?hPrevInstance?LPWSTR?lpCmdLine?int?nCmdShow)
{
????CDepthBasics?application;
????application.Run(hInstance?nCmdShow);
}
///?
///?Constructor
///?
CDepthBasics::CDepthBasics()?:
????m_pD2DFactory(NULL)
????m_pDrawDepth(NULL)
????m_hNextDepthframeEvent(INVALID_HANDLE_VALUE)
????m_pDepthStreamHandle(INVALID_HANDLE_VALUE)
????m_bNearMode(false)
????m_pNuiSensor(NULL)
{
????//?create?heap?storage?for?depth?pixel?data?in?RGBX?format
????m_depthRGBX?=?new?BYTE[cDepthWidth*cDepthHeight*cBytesPerPixel];
}
///?
///?Destructor
///?
CDepthBasics::~CDepthBasics()
{
????if?(m_pNuiSensor)
????{
????????m_pNuiSensor->NuiShutdown();
????}
????if?(m_hNextDepthframeEvent?!=?INVALID_HANDLE_VALUE)
????{
????????CloseHandle(m_hNextDepthframeEvent);
????}
????//?clean?up?Direct2D?renderer
????delete?m_pDrawDepth;
????m_pDrawDepth?=?NULL;
????//?done?with?depth?pixel?data
????delete[]?m_depthRGBX;
????//?clean?up?Direct2D
????SafeRelease(m_pD2DFactory);
????SafeRelease(m_pNuiSensor);
}
///?
///?Creates?the?main?window?and?begins?processing
///?
///?handle?to?the?application?instance
///?whether?to?display?minimized?maximized?or?normally
int?CDepthBasics::Run(HINSTANCE?hInstance?int?nCmdShow)
{
????MSG???????msg?=?{0};
????WNDCLASS??wc;
????//?Dialog?custom?window?class
????ZeroMemory(&wc?sizeof(wc));
????wc.style?????????=?CS_HREDRAW?|?CS_VREDRAW;
????wc.cbWndExtra????=?DLGWINDOWEXTRA;
????wc.hInstance?????=?hInstance;
????wc.hCursor???????=?LoadCursorW(NULL?IDC_ARROW);
????wc.hIcon?????????=?LoadIconW(hInstance?MAKEINTRESOURCE(IDI_APP));
????wc.lpfnWndProc???=?DefDlgProcW;
????wc.lpszClassName?=?L“DepthBasicsAppDlgWndClass“;
????if?(!RegisterClassW(&wc))
????{
????????return?0;
????}
????//?Create?main?application?window
????HWND?hWndApp?=?CreateDialogParamW(
????????hInstance
????????MAKEINTRESOURCE(IDD_APP)
????????NULL
????????(DLGPROC)CDepthBasics::MessageRouter?
????????reinterpret_cast(this));
????//?Show?window
????
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
????.......?????31842??2012-07-29?18:23??DepthBasics-D2D\app.ico
?????文件???????1282??2012-09-26?10:38??DepthBasics-D2D\Debug\cl.command.1.tlog
?????文件??????31372??2012-09-26?10:38??DepthBasics-D2D\Debug\CL.read.1.tlog
?????文件????????810??2012-09-26?10:38??DepthBasics-D2D\Debug\CL.write.1.tlog
?????文件?????483328??2012-09-26?10:38??DepthBasics-D2D\Debug\DepthBasics-D2D.exe
?????文件????????682??2012-09-26?10:38??DepthBasics-D2D\Debug\DepthBasics-D2D.exe.em
?????文件????????748??2012-09-26?10:38??DepthBasics-D2D\Debug\DepthBasics-D2D.exe.em
?????文件????????640??2012-09-26?10:38??DepthBasics-D2D\Debug\DepthBasics-D2D.exe.intermediate.manifest
?????文件????1057896??2012-09-26?10:38??DepthBasics-D2D\Debug\DepthBasics-D2D.ilk
?????文件?????????58??2012-09-26?10:38??DepthBasics-D2D\Debug\DepthBasics-D2D.lastbuildstate
?????文件???????3923??2012-09-26?10:38??DepthBasics-D2D\Debug\DepthBasics-D2D.log
?????文件????2903040??2012-09-26?10:38??DepthBasics-D2D\Debug\DepthBasics-D2D.pdb
?????文件????????220??2012-09-26?10:38??DepthBasics-D2D\Debug\DepthBasics-D2D_manifest.rc
?????文件?????117599??2012-09-26?10:38??DepthBasics-D2D\Debug\DepthBasics.obj
?????文件??????32668??2012-09-26?10:38??DepthBasics-D2D\Debug\DepthBasics.res
?????文件?????110728??2012-09-26?10:38??DepthBasics-D2D\Debug\ImageRenderer.obj
?????文件??????????2??2012-09-26?10:38??DepthBasics-D2D\Debug\li
?????文件??????????2??2012-09-26?10:38??DepthBasics-D2D\Debug\li
?????文件???????2208??2012-09-26?10:38??DepthBasics-D2D\Debug\li
?????文件???????3766??2012-09-26?10:38??DepthBasics-D2D\Debug\li
?????文件????????988??2012-09-26?10:38??DepthBasics-D2D\Debug\li
?????文件????????416??2012-09-26?10:38??DepthBasics-D2D\Debug\mt.command.1.tlog
?????文件????????310??2012-09-26?10:38??DepthBasics-D2D\Debug\mt.read.1.tlog
?????文件????????310??2012-09-26?10:38??DepthBasics-D2D\Debug\mt.write.1.tlog
?????文件???????1064??2012-09-26?10:38??DepthBasics-D2D\Debug\rc.command.1.tlog
?????文件???????2862??2012-09-26?10:38??DepthBasics-D2D\Debug\rc.read.1.tlog
?????文件????????494??2012-09-26?10:38??DepthBasics-D2D\Debug\rc.write.1.tlog
?????文件?????658432??2012-09-26?10:38??DepthBasics-D2D\Debug\vc100.idb
?????文件?????790528??2012-09-26?10:38??DepthBasics-D2D\Debug\vc100.pdb
?????文件???38621184??2012-10-26?14:25??DepthBasics-D2D\DepthBasics-D2D.sdf
............此處省略20個(gè)文件信息
評(píng)論
共有 條評(píng)論