protected override void UserCalibrationEndFail(CalibrationProgressEventArgs e)
 {
     base.UserCalibrationEndFail(e);
     if (m_playerStatus != UserStatus.Failure)
         return; // not really a failure
     m_COMWhenFail = m_settingsManager.UserGenrator.GetUserCenterOfMass(m_openNIUserID);
 }
 // キャリブレーション終了
 void skelton_CalibrationComplete( object sender, CalibrationProgressEventArgs e )
 {
     // キャリブレーション成功
       if (e.Status == CalibrationStatus.OK) {
     message = "キャリブレーション成功:" + e.ID;
     user.SkeletonCapability.StartTracking(e.ID);
       }
       // キャリブレーション失敗
       else {
     message = "キャリブレーション失敗:" + e.ID;
       }
 }
예제 #3
0
 void skeletonCapbility_CalibrationComplete(object sender, CalibrationProgressEventArgs e)
 {
     if (e.Status == CalibrationStatus.OK)
     {
         this.skeletonCapbility.StartTracking(e.ID);
         this.joints.Add(e.ID, new Dictionary<SkeletonJoint, SkeletonJointPosition>());
     }
     else if (e.Status != CalibrationStatus.ManualAbort)
     {
         if (this.skeletonCapbility.DoesNeedPoseForCalibration)
         {
             this.poseDetectionCapability.StartPoseDetection(calibPose, e.ID);
         }
         else
         {
             this.skeletonCapbility.RequestCalibration(e.ID, true);
         }
     }
 }
예제 #4
0
 private void OnSkeletonCapbilityCalibrationComplete(object sender, CalibrationProgressEventArgs e)
 {
     if (e.Status == CalibrationStatus.OK)
     {
         this.skeletonCapbility.StartTracking(e.ID);
         this.joints.Add(e.ID, new Dictionary<SkeletonJoint, SkeletonJointPosition>());
     }
     else if (e.Status != CalibrationStatus.ManualAbort)
     {
         this.skeletonCapbility.RequestCalibration(e.ID, true);
     }
 }
 /// <summary>
 /// Function that is called whenever the calibration of a new user is complete.
 /// On a succesful calibration, the user will be tracked from now on.
 /// On a failure (not manual), the calibration for this user it retried.
 /// </summary>
 /// <param name="sender">The object that called this function</param>
 /// <param name="e">The events associated with this call; used to retrieve the users id</param>
 private void OnCalibrationComplete(object sender, CalibrationProgressEventArgs e)
 {
     if (e.Status == CalibrationStatus.OK)
     {
         Logger.Log("Calibration succeeded on user: "******"Calibration failed on user: "******"Retrying calibration on user: " + e.ID);
         SkeletonCapability.RequestCalibration(e.ID, false);
     }
 }
예제 #6
0
 void skeletonCapbility_CalibrationComplete(object sender, CalibrationProgressEventArgs e)
 {
     if (e.Status == CalibrationStatus.OK)
     {
         this.skeletonCapbility.StartTracking(e.ID);
         this.joints.Add(e.ID, new Dictionary<SkeletonJoint, SkeletonJointPosition>());
     }
     else
     {
         this.poseDetectionCapability.StartPoseDetection(calibPose, e.ID);
     }
 }
예제 #7
0
        void _SkeletonCapability_CalibrationComplete(object sender, CalibrationProgressEventArgs e)
        {
            var user = _FindUser(e.ID);

            if (e.Status == CalibrationStatus.Pose)
            {
                _SkeletonCapability.StartTracking(e.ID);
                _SkeletonCapability.SaveCalibrationDataToFile(e.ID, this.CalibrationPath);

                if (user != null)
                {
                    user.IsCalibrated = true;
                    SkeletonReady.Raise(this, user);
                }
            }
            else
            {
                _PoseDetectionCapability.StartPoseDetection(_CalibrationPose, e.ID);
            }

            CalibrationEnded.Raise(this, user, e.Status == CalibrationStatus.Pose);
        }
예제 #8
0
 void SkeletonCapability_CalibrationComplete(object sender, CalibrationProgressEventArgs e)
 {
     // キャリブレーション成功
     if (e.Status == CalibrationStatus.OK)
     {
         Trace.WriteLine("Calibration Success:" + e.ID);
         user.SkeletonCapability.StartTracking(e.ID);
     }
     // キャリブレーション失敗
     else
     {
         Trace.WriteLine("Calibration Failed:" + e.ID);
     }
 }
 /// @brief callback for updating structures when calibration ends
 /// 
 /// This callback is called when a calibration process ends. If the calibration succeeded
 /// then the user is in a calibrated state, otherwise it starts the calibration process from
 /// scratch.
 /// @param sender who called the callback
 /// @param e the arguments of the event.
 private void CalibrationEndCallback(object sender, CalibrationProgressEventArgs e)
 {
     if (e.ID != m_openNIUserID)
         return; // not us...
     m_settingsManager.Log("finished calibration for user="******" status=" + e.Status, NIEventLogger.Categories.Callbacks, NIEventLogger.Sources.Skeleton, NIEventLogger.VerboseLevel.Verbose);
     if (e.Status == CalibrationStatus.OK)
     {
         UserCalibrationEndSuccess();
     }
     else
     {
         UserCalibrationEndFail(e);
     }
 }
 /// @brief virtual function on calibration failure
 ///  
 /// @param e the calibration error arguments from the calibration callback.
 /// This method retries the calibration if necessary. It is virtual to allow overriding
 protected virtual void UserCalibrationEndFail(CalibrationProgressEventArgs e)
 {
     if (e.Status == CalibrationStatus.ManualAbort)
         return; // it is a legal option...
     m_playerStatus = UserStatus.Failure;
     if(m_numRetries>0)
     {
         m_numRetries--;
         Skeleton.RequestCalibration(m_openNIUserID, true);
     }
 }