Ejemplo n.º 1
0
 // キャリブレーションの完了
 void skelton_CalibrationEnd( object sender, CalibrationEndEventArgs e )
 {
     // キャリブレーション成功
     if ( e.Success ) {
         user.SkeletonCapability.StartTracking( e.ID );
     }
     else {
         user.PoseDetectionCapability.StartPoseDetection( user.SkeletonCapability.CalibrationPose, e.ID );
     }
 }
Ejemplo n.º 2
0
 void _skeleton_caps_CalibrationEnd(object sender, CalibrationEndEventArgs e)
 {
     if (e.Success)
     {
         _skeleton_caps.StartTracking(e.ID);
         _joints.Add(e.ID, new Dictionary<SkeletonJoint, SkeletonJointPosition>());
         _joint_orientation.Add(e.ID, new Dictionary<SkeletonJoint, SkeletonJointOrientation>());
         Console.WriteLine("Calibration succeeded with user " + e.ID);
     }
     else
     {
         _pose_detect_caps.StartPoseDetection(_calibration_pose, e.ID);
         Console.WriteLine("Calibration failed, restarting pose detection with user " + e.ID);
     }
 }
Ejemplo n.º 3
0
    void skeletonCapbility_CalibrationEnd(object sender, CalibrationEndEventArgs e)
    {
        if (e.Success)
        {
            if (AttemptToCalibrate)
            {
				SendMessage("CalibrationComplete", e, SendMessageOptions.DontRequireReceiver);
                this.skeletonCapbility.StartTracking(e.ID);
				
				SkeletonJointTransformation skelTrans = new SkeletonJointTransformation();
				skelTrans = skeletonCapbility.GetSkeletonJoint(e.ID, SkeletonJoint.Torso);
				Point3D pos = skelTrans.Position.Position;
				userCalibrationPosition[e.ID] = new Vector3(pos.X,pos.Y,-pos.Z);
				
                calibratedUsers.Add(e.ID);
            }
        }
        else
        {
			SendMessage("CalibrationFailed", e, SendMessageOptions.DontRequireReceiver);
            if (AttemptToCalibrate)
            {
                this.poseDetectionCapability.StartPoseDetection(calibPose, e.ID);
            }
        }
		
		calibratingUsers.Remove(e.ID);
		
	
    }
Ejemplo n.º 4
0
 void skeletonCapability_CalibrationEnd(object sender, CalibrationEndEventArgs e)
 {
     int id = e.ID;
     if (e.Success)
     {
         this.skeletonCapability.StartTracking(id);
         this.joints.Add(id, new Dictionary<SkeletonJoint, SkeletonJointPosition>());
         //this.skeletonCapability.SaveCalibrationData(id, 0);
         this.skeletonCapability.SaveCalibrationDataToFile(id, skeletonFile);
         OnSkeletonReady((int)id);
     }
     else
     {
         // this.skeletonCapability.RequestCalibration(id, true);
         this.poseDetectionCapability.StartPoseDetection(calibPose, id);
         OnUserFound((int)id);
         isFirstPoseAttempted = false;
     }
 }
Ejemplo n.º 5
0
 void skeletonCapbility_CalibrationEnd(object sender, CalibrationEndEventArgs e)
 {
     if (e.Success)
     {
         this.skeletonCapbility.StartTracking(e.ID);
         this.joints.Add(e.ID, new Dictionary<SkeletonJoint, SkeletonJointPosition>());
     }
     else
     {
         this.poseDetectionCapability.StartPoseDetection(calibPose, e.ID);
     }
 }
 // キャリブレーション終了
 void skelton_CalibrationEnd(object sender, CalibrationEndEventArgs e)
 {
     // キャリブレーション成功
       if (e.Success) {
     message = "キャリブレーション成功:" + e.ID;
     user.SkeletonCapability.StartTracking(e.ID);
       }
       // キャリブレーション失敗
       else {
     message = "キャリブレーション失敗:" + e.ID;
       }
 }
Ejemplo n.º 7
0
 void skeletonCapbility_CalibrationEnd(object sender, CalibrationEndEventArgs e)
 {
     if (e.Success)
     {
         if (AttemptToCalibrate)
         {
             this.skeletonCapbility.StartTracking(e.ID);
             calibratedUsers.Add(e.ID);
         }
     }
     else
     {
         if (AttemptToCalibrate)
         {
             this.poseDetectionCapability.StartPoseDetection(calibPose, e.ID);
         }
     }
     calibratingUsers.Remove(e.ID);
 }
Ejemplo n.º 8
0
 void HandleSkeletonCapabilityCalibrationEnd(object sender, CalibrationEndEventArgs ce)
 {
     if (ce.Success) {
         HUD.text =  (HUD.text + "\ncallibration ended successfully");
         skeletonCapability.StartTracking (ce.ID);
         needsCalibration = false;
         //c.bouncer.StartBounceDetector();
     } else {
         poseDetectionCapability.StartPoseDetection (calibPose, ce.ID);
     }
 }
 private void CalibrationEnd(object sender, CalibrationEndEventArgs e)
 {
     Console.Write(e.ID + " Calibration ended " + (e.Success ? "successfully" : "unsuccessfully"));
     if (e.Success)
     {
         if (trackingUser)
             userGenerator.SkeletonCapability.StopTracking(trackingUserId);
         userGenerator.SkeletonCapability.StartTracking(e.ID);
         trackingUser = true;
         trackingUserId = e.ID;
         userGenerator.SkeletonCapability.SaveCalibrationDataToFile(trackingUserId, "skeleton.cal");
     }
     else
     {
         userGenerator.PoseDetectionCapability.StartPoseDetection(userGenerator.SkeletonCapability.CalibrationPose, e.ID);
     }
 }