本文整理汇总了C++中xn::Context::WaitNoneUpdateAll方法的典型用法代码示例。如果您正苦于以下问题:C++ Context::WaitNoneUpdateAll方法的具体用法?C++ Context::WaitNoneUpdateAll怎么用?C++ Context::WaitNoneUpdateAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xn::Context
的用法示例。
在下文中一共展示了Context::WaitNoneUpdateAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: matrixCalc
void matrixCalc(void *outputs)
{
TML::Matrix out1(outputs, 0);
TML::Matrix out2(outputs, 1);
TML::Matrix out3(outputs, 2);
TML::Matrix out4(outputs, 3);
xn::DepthMetaData depthMD;
xn::SceneMetaData sceneMD;
xn::ImageMetaData imageMD;
depth.GetMetaData(depthMD);
user.GetUserPixels(0, sceneMD);
image.GetMetaData(imageMD);
context.WaitNoneUpdateAll();
t_jit_matrix_info tmi;
memset(&tmi, 0, sizeof(tmi));
tmi.dimcount = 2;
tmi.planecount = 1;
tmi.dimstride[0] = 4;
tmi.dimstride[1] = depthMD.XRes()*4;
int width = tmi.dim[0] = depthMD.XRes();
int height = tmi.dim[1] = depthMD.YRes();
tmi.type = _jit_sym_float32;
out1.resizeTo(&tmi);
tmi.planecount = 1;
tmi.dimstride[0] = 1;
tmi.dimstride[1] = depthMD.XRes();
tmi.type = _jit_sym_char;
out2.resizeTo(&tmi);
tmi.planecount = 4;
tmi.dimstride[0] = 4;
tmi.dimstride[1] = depthMD.XRes()*4;
tmi.type = _jit_sym_char;
out3.resizeTo(&tmi);
const XnDepthPixel* pDepth = depthMD.Data();
float *depthData = (float*)out1.data();
//Copy depth data
int x,y;
for (y=0; y<height; y++)
{
for (x=0; x<width; x++)
{
depthData[0] = (float)pDepth[0]/powf(2, 15);
depthData++;
pDepth++;
}
}
//Get the users
unsigned char *userData = (unsigned char*)out2.data();
const XnLabel* pLabels = sceneMD.Data();
for (y=0; y<height; y++)
{
for (x=0; x<width; x++)
{
userData[0] = pLabels[0];
userData++;
pLabels++;
}
}
//Get the colors
const XnRGB24Pixel* pPixels = imageMD.RGB24Data();
unsigned char *pixData = (unsigned char*)out3.data();
for (y=0; y<height; y++)
{
for (x=0; x<width; x++)
{
pixData[0] = 0;
pixData[1] = pPixels[0].nRed;
pixData[2] = pPixels[0].nGreen;
pixData[3] = pPixels[0].nBlue;
pixData+=4;
pPixels++;
}
}
//For all the users -- output the joint info...
XnUserID aUsers[15];
XnUInt16 nUsers = 15;
user.GetUsers(aUsers, nUsers);
int rUsers = 0;
xn::SkeletonCapability sc = user.GetSkeletonCap();
int i;
for (i=0; i<nUsers; i++)
{
//.........这里部分代码省略.........
示例2: Context_WaitNoneUpdateAll_wrapped
void Context_WaitNoneUpdateAll_wrapped(xn::Context& self) {
check( self.WaitNoneUpdateAll() );
}