Marc Le Guen
unread,May 10, 2011, 9:57:59 AM5/10/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenNI
Hello, I have some bugs with that initialisation of two Kinects :
xn::Context globalContext;
xn::Context g_Context[2];
xn::DepthGenerator depthGen[2];
xn::UserGenerator userGen[2];
xn::ImageGenerator imgGen[2];
globalContext.Init();
static xn::NodeInfoList lt;
globalContext.EnumerateProductionTrees(XN_NODE_TYPE_DEVICE,
NULL, lt);
int cpt=0;
for(xn::NodeInfoList::Iterator iter = lt.Begin(); iter != lt.End(); +
+iter)
{
xn::NodeInfo node = (*iter);
g_Context[cpt].Init();
g_Context[cpt].CreateProductionTree(node);
imgGen[cpt].Create(g_Context[cpt]);
depthGen[cpt].Create(g_Context[cpt]);
userGen[cpt].Create(g_Context[cpt]);
depthGen[cpt].GetAlternativeViewPointCap().SetViewPoint(imgGen[cpt]);
g_Context[cpt].SetGlobalMirror(true);
cpt++;
}
rc = g_Context[0].StartGeneratingAll();
rc = g_Context[1].StartGeneratingAll();
I get a strange usermap, and a normal one using both kinect. Any
idea ?
thanks