OpenNI で自分の kinect デバイスのシリアル番号を取得するにはどうすればよいですか? avin2 の SensorKinect ドライバーを使用しています。
私は次のことを試みていますが、変数には「0」しかありませんserial
:
xn::NodeInfoList possibleChains;
context.EnumerateProductionTrees(XN_NODE_TYPE_DEVICE,NULL,possibleChains,NULL);
for(xn::NodeInfoList::Iterator i = possibleChains.Begin(); i !=
possibleChains.End(); ++i)
{
xn::NodeInfo node = *i;
nRetVal = context.CreateProductionTree(node);
xn::Device device;
nRetVal = node.GetInstance(device);
XnChar serial[1024];
device.GetIdentificationCap().GetSerialNumber(serial, 1024);
}