#include "stdafx.h"
#include <XnCppWrapper.h>
using namespace xn;
#define SAMPLE_XML_PATH "e:/SamplesConfig.xml"
#define CHECK_RC(rc,what) \
if (rc != XN_STATUS_OK) \
{ \
printf("%s 失败!: %s\n", what, xnGetStatusString(rc)); \
\
} \
else \
{ \
printf("%s 成功!: %s\n", what, xnGetStatusString(rc)); \
\
} \
int _tmain(int argc, _TCHAR* argv[])
{
XnStatus nRetVal = XN_STATUS_OK;
xn::Context context;
xn::ImageGenerator image;
xn::DepthGenerator depth;
xn::Recorder record;
nRetVal=context.InitFromXmlFile(SAMPLE_XML_PATH);
CHECK_RC(nRetVal, "Init");
nRetVal=context.FindExistingNode(XN_NODE_TYPE_IMAGE,image);
CHECK_RC(nRetVal,"get image ");
nRetVal=context.FindExistingNode(XN_NODE_TYPE_DEPTH,depth);
CHECK_RC(nRetVal,"get dept
openni录制文件
最新推荐文章于 2022-02-10 18:17:25 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)