Updated by Alexander Shishkov about 13 years ago

I am using video capture wrapper for OpenNI [[OpenNI]] to retrieve rgb and depth images from Kinect. I think that retrieving timestamps of these two channels can be useful. They are not synchronized after all. Therefore, I simply added few lines of codes to cap_openni.cpp , for instance to be able to use get(CV_CAP_OPENNI_DEPTH_GENERATOR+CV_CAP_PROP_POS_MSEC)

2 additional case for switch in function "getImageGeneratorProperty"
*
case CV_CAP_PROP_POS_MSEC :
res = imageGenerator.GetTimestamp();
break;
case CV_CAP_PROP_POS_FRAMES :
res = imageGenerator.GetFrameID();
break;

2 additional case for switch in function "getDepthGeneratorProperty"
*
case CV_CAP_PROP_POS_MSEC :
res = depthGenerator.GetTimestamp();
break;
case CV_CAP_PROP_POS_FRAMES :
res = depthGenerator.GetFrameID();
break;

Back