=======================
- RealSense重要的头文件和类列表:
#include<pxcsensemanager.h>
#include<pxchandconfiguration.h>
#include<pxchandmodule.h>
#include<pxchanddata.h>
#include<iostream>
#include<fstream>
#include<string>
#include<Windows.h>
#include"opencvHeader.h"
#include"imageLoad.h"
#include"clipImage.h"
using namespace Intel::RealSense;
using namespace Intel::RealSense::Hand;
PXCSession *g_session;
PXCSenseManager *g_senseManager;
PXCHandModule *g_handModule;
PXCHandConfiguration *g_handConfiguration;
PXCHandData *g_handOutput;
2.生成各种类对象,并测试返回值是否正常。
pxcStatus InitRealSense()
{
std::printf("Tip: Run HandsConsole.exe -help for additional parameters\n");
g_session = PXCSession::CreateInstance();
if (!g_session)
{
std::printf("Failed Creating PXCSession");
}
g_senseManager = g_session->CreateSenseManager();
if (!g_senseManager)
{
releaseAll();
std::printf("Failed creating senseManager\n");
//return 1;
}
if (g_senseManager->EnableHand(0) != pxcStatus::STATUS_NO_ERROR)
{
releaseAll();
std::printf("Failed Enabling the hand Module");
//return;
}
g_handModule = g_senseManager->QueryHand();
if (!g_handModule)
{
releaseAll();
std::printf("Failed Creating PXCHandModule\n");
//return;
}
g_handOutput = g_handModule->CreateOutput();
if (!g_handOutput)
{
release