当前位置: 首页>>代码示例>>C++>>正文


C++ xnOSGetEpochTime函数代码示例

本文整理汇总了C++中xnOSGetEpochTime函数的典型用法代码示例。如果您正苦于以下问题:C++ xnOSGetEpochTime函数的具体用法?C++ xnOSGetEpochTime怎么用?C++ xnOSGetEpochTime使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了xnOSGetEpochTime函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: UserCalibration_CalibrationComplete

 // Callback: Finished calibration
 static void XN_CALLBACK_TYPE UserCalibration_CalibrationComplete (xn::SkeletonCapability& capability, XnUserID nId, XnCalibrationStatus eStatus, void* pCookie)
 {
   XnUInt32 epochTime = 0;
   xnOSGetEpochTime(&epochTime);
   OpenNITrackerLoopback* self = (OpenNITrackerLoopback*) pCookie;
   std::cerr << "got here: " << __FILE__ << " : " << __LINE__ << std::endl;
   if (eStatus == XN_CALIBRATION_STATUS_OK)
   {
     // Calibration succeeded
     printf("%d Calibration complete, start tracking user %d\n", epochTime, nId);		
     self->g_UserGenerator.GetSkeletonCap().StartTracking(nId);
     self->publishEvent ("tracking", nId);
   }
   else
   {
     // Calibration failed
     printf("%d Calibration failed for user %d\n", epochTime, nId);
     if (self->g_bNeedPose)
     {
       self->g_UserGenerator.GetPoseDetectionCap().StartPoseDetection(self->g_strPose, nId);
       self->publishEvent ("posedetection", nId);
     }
     else
     {
       self->g_UserGenerator.GetSkeletonCap().RequestCalibration(nId, TRUE);
       self->publishEvent ("calibrating", nId);
     }
   }
 }
开发者ID:JimmyDaSilva,项目名称:realtime_urdf_filter,代码行数:30,代码来源:urdf_filtered_tracker.cpp

示例2: xnOSGetEpochTime

void XN_CALLBACK_TYPE UserTracker::User_LostUser(xn::UserGenerator& generator, XnUserID nId, void* pCookie)
{
    XnUInt32 epochTime = 0;
	xnOSGetEpochTime(&epochTime);
	printf("%d Lost user %d\n", epochTime, nId);
    removeUser(nId);
}
开发者ID:yongxiaofeng,项目名称:earthQuakeProject,代码行数:7,代码来源:UserTracker.cpp

示例3: xnOSGetEpochTime

void NiRecorder::print_text(const QString &text_ref)
{
    XnUInt32 epoch_time = 0;
    xnOSGetEpochTime(&epoch_time);

    std::cout << (QString().setNum(epoch_time) + QString(": ") + text_ref).toAscii().data() << "\n";
}
开发者ID:hudakm,项目名称:animik,代码行数:7,代码来源:NiRecorder.cpp

示例4: User_LostUser

// Callback: An existing user was lost
void XN_CALLBACK_TYPE User_LostUser(xn::UserGenerator& generator, XnUserID nId, void* pCookie)
{
	XnUInt32 epochTime = 0;
	xnOSGetEpochTime(&epochTime);
	ROS_INFO("%d Lost user %d\n", epochTime, nId);
  publishUserLost(nId);
}
开发者ID:arnthorm,项目名称:Fable,代码行数:8,代码来源:main.cpp

示例5: UserCalibration_CalibrationComplete

void XN_CALLBACK_TYPE UserCalibration_CalibrationComplete(xn::SkeletonCapability& capability, XnUserID nId, XnCalibrationStatus eStatus, void* pCookie)
{
    XnUInt32 epochTime = 0;
    xnOSGetEpochTime(&epochTime);
    if (eStatus == XN_CALIBRATION_STATUS_OK)
    {
        // Calibration succeeded
        printf("%d Calibration complete, start tracking user %d\n", epochTime, nId);		
        g_UserGenerator.GetSkeletonCap().StartTracking(nId);
    }
    else
    {
        // Calibration failed
        printf("%d Calibration failed for user %d\n", epochTime, nId);
        if(eStatus==XN_CALIBRATION_STATUS_MANUAL_ABORT)
        {
            printf("Manual abort occured, stop attempting to calibrate!");
            return;
        }
        if (g_bNeedPose)
        {
            g_UserGenerator.GetPoseDetectionCap().StartPoseDetection(g_strPose, nId);
        }
        else
        {
            g_UserGenerator.GetSkeletonCap().RequestCalibration(nId, TRUE);
        }
    }
}
开发者ID:stozpark,项目名称:openni,代码行数:29,代码来源:NiSkeletonBenchmark.cpp

示例6: User_NewUser

// Callback: New user was detected
void XN_CALLBACK_TYPE User_NewUser(xn::UserGenerator& generator, XnUserID nId, void* pCookie)
{
    XnUInt32 epochTime = 0;
    xnOSGetEpochTime(&epochTime);
    XnUserID aUsers[MAX_NUM_USERS];
    XnUInt16 nUsers;
	g_UserGenerator.GetUsers(aUsers, nUsers);
    printf("%d New User %d\n", epochTime, nId);
    // New user found
    //validate the number of users
    XnUInt16 usersTracked=0;
    for(XnUInt16 i=0; i<nUsers; i++)
    {
    	if(g_UserGenerator.GetSkeletonCap().IsTracking(aUsers[i])==TRUE)
    		usersTracked++;
    }
    if(usersTracked >= numOfUser)
    {
    	printf("%d users are currently being tracked, no more users allowed\n",numOfUser);
    	return;
    }
    if (g_bNeedPose)
    {
        g_UserGenerator.GetPoseDetectionCap().StartPoseDetection(g_strPose, nId);
    }
    else
    {
        g_UserGenerator.GetSkeletonCap().RequestCalibration(nId, TRUE);
    }
}
开发者ID:stozpark,项目名称:openni,代码行数:31,代码来源:NiSkeletonBenchmark.cpp

示例7: User_NewUser

// Callback: New user was detected
void XN_CALLBACK_TYPE User_NewUser(xn::UserGenerator& /*generator*/, XnUserID nId, void* /*pCookie*/)
{
	XnUInt32 epochTime = 0;
	xnOSGetEpochTime(&epochTime);
	printf("%d New User %d\n", epochTime, nId);
	//}
}
开发者ID:ZewiHugo,项目名称:UserTracker_modified,代码行数:8,代码来源:main.cpp

示例8: xnOSGetEpochTime

void testusuario::poseDetected(xn::PoseDetectionCapability &capability, const XnChar *strPose, XnUserID nId, void *pCookie)
{
    XnUInt32 epochTime = 0;
    xnOSGetEpochTime(&epochTime);
    printf("%d Pose %s detected for user %d\n", epochTime, strPose, nId);
    instance->cam->userG[0].GetPoseDetectionCap().StopPoseDetection(nId);
    instance->cam->userG[0].GetSkeletonCap().RequestCalibration(nId, TRUE);
}
开发者ID:martincos321,项目名称:kinect,代码行数:8,代码来源:testusuario.cpp

示例9: User_LostUser

 // Callback: An existing user was lost
 static void XN_CALLBACK_TYPE User_LostUser(xn::UserGenerator& generator, XnUserID nId, void* pCookie)
 {
   OpenNITrackerLoopback* self = (OpenNITrackerLoopback*) pCookie;
   XnUInt32 epochTime = 0;
   xnOSGetEpochTime(&epochTime);
   printf("%d Lost user %d\n", epochTime, nId);	
   self->publishEvent ("lost", nId);
 }
开发者ID:JimmyDaSilva,项目名称:realtime_urdf_filter,代码行数:9,代码来源:urdf_filtered_tracker.cpp

示例10: UserPose_PoseDetected

// Callback: Detected a pose
void XN_CALLBACK_TYPE UserPose_PoseDetected(xn::PoseDetectionCapability& capability, const XnChar* strPose, XnUserID nId, void* pCookie)
{
    XnUInt32 epochTime = 0;
    xnOSGetEpochTime(&epochTime);
    printf("%d Pose %s detected for user %d\n", epochTime, strPose, nId);
    g_UserGenerator.GetPoseDetectionCap().StopPoseDetection(nId);
    g_UserGenerator.GetSkeletonCap().RequestCalibration(nId, TRUE);
}
开发者ID:stozpark,项目名称:openni,代码行数:9,代码来源:NiSkeletonBenchmark.cpp

示例11: User_LostUser

// Callback: An existing user was lost
void XN_CALLBACK_TYPE User_LostUser(xn::UserGenerator& /*generator*/, XnUserID nId, void* /*pCookie*/){

  //TODO : soit suppression de l'utilisateur de la map, soit archivage. Les poses du squelette archivées ne doivent pas être supprimées car on peut les réutiliser.
  m_skeleton.erase(nId);

  XnUInt32 epochTime = 0;
  xnOSGetEpochTime(&epochTime);
  printf("%d Lost user %d\n", epochTime, nId);	
}
开发者ID:sgerin,项目名称:mocap,代码行数:10,代码来源:scene.cpp

示例12: User_NewUser

// Callback: New user was detected
void XN_CALLBACK_TYPE User_NewUser(xn::UserGenerator& /*generator*/, XnUserID nId, void* /*pCookie*/){
  XnUInt32 epochTime = 0;
  xnOSGetEpochTime(&epochTime);
  printf("%d New User %d\n", epochTime, nId);
  // New user found
  if (g_bNeedPose)    
    g_UserGenerator.GetPoseDetectionCap().StartPoseDetection(g_strPose, nId);
  else
    g_UserGenerator.GetSkeletonCap().RequestCalibration(nId, TRUE);
  
  // ICI ajout de l'utilisateur
  Skeleton s(nId);
  m_skeleton.insert(std::pair<XnUserID, Skeleton>(nId,s));
}
开发者ID:sgerin,项目名称:mocap,代码行数:15,代码来源:scene.cpp

示例13: xnOSGetEpochTime

// Callback: Finished calibration
void XN_CALLBACK_TYPE  SimKinect::UserCalibration_CalibrationComplete(xn::SkeletonCapability& capability, XnUserID nId, XnCalibrationStatus eStatus, void* pCookie) {
  XnUInt32 epochTime = 0;
	
  xnOSGetEpochTime(&epochTime);
  if (eStatus == XN_CALIBRATION_STATUS_OK) {
    // Calibration succeeded
    printf("%d Calibration complete, start tracking user %d\n", epochTime, nId);		
    user_generator.GetSkeletonCap().StartTracking(nId);
  }
  else {
    // Calibration failed
    printf("%d Calibration failed for user %d\n", epochTime, nId);
    user_generator.GetSkeletonCap().RequestCalibration(nId, TRUE);
  }
}
开发者ID:j0x7c4,项目名称:sim_kinect,代码行数:16,代码来源:SimpleKinectReader.cpp

示例14: User_NewUser

// Callback: New user was detected
void XN_CALLBACK_TYPE User_NewUser(xn::UserGenerator& /*generator*/, XnUserID nId, void* /*pCookie*/)
{
    XnUInt32 epochTime = 0;
    xnOSGetEpochTime(&epochTime);
    printf("%d New User %d\n", epochTime, nId);
    // New user found
    if (g_bNeedPose)
    {
        g_UserGenerator.GetPoseDetectionCap().StartPoseDetection(g_strPose, nId);
    }
    else
    {
        g_UserGenerator.GetSkeletonCap().RequestCalibration(nId, TRUE);
    }
}
开发者ID:bschreck,项目名称:gesture-drone,代码行数:16,代码来源:NiSimpleSkeleton.cpp

示例15: User_NewUser

  // Callback: New user was detected
  static void XN_CALLBACK_TYPE User_NewUser(xn::UserGenerator& generator, XnUserID nId, void* pCookie)
  {
    OpenNITrackerLoopback* self = (OpenNITrackerLoopback*) pCookie;
    if(nId > 15) 
    {	
      XnStatus res = self->g_UserGenerator.GetPoseDetectionCap().StopPoseDetection(nId);
      if (res != XN_CALIBRATION_STATUS_OK)
      {	
        std::cout << "Error StopPoseDetection";
      }
      res = self->g_UserGenerator.GetSkeletonCap().AbortCalibration(nId);
      if (res != XN_CALIBRATION_STATUS_OK)
      {	
        std::cout << "Error AbortCalibration";
      }
      res = self->g_UserGenerator.GetSkeletonCap().StopTracking(nId);
      if (res != XN_CALIBRATION_STATUS_OK)
      {	
        std::cout << "Error StopTracking";
      }
      self->g_UserGenerator.GetPoseDetectionCap().Release();
      self->g_UserGenerator.GetSkeletonCap().Release();
      return;
    }
    // New user found
    XnUInt32 epochTime = 0;
    xnOSGetEpochTime(&epochTime);
    printf("%d New User %d\n", epochTime, nId);
    self->publishEvent ("new", nId);

    if (self->g_bNeedPose)
    {
      std::cerr << "starting pose deteciton: " << __FILE__ << " : " << __LINE__ << std::endl;
      self->g_UserGenerator.GetPoseDetectionCap().StartPoseDetection(self->g_strPose, nId);
      self->publishEvent ("posedetection", nId);
    }
    else
    {
      std::cerr << "request calibration: " << __FILE__ << " : " << __LINE__ << std::endl;
      self->g_UserGenerator.GetSkeletonCap().RequestCalibration(nId, TRUE);
      self->publishEvent ("calibrating", nId);
    }
  }
开发者ID:JimmyDaSilva,项目名称:realtime_urdf_filter,代码行数:44,代码来源:urdf_filtered_tracker.cpp


注:本文中的xnOSGetEpochTime函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。