3 Replies Latest reply on Jan 17, 2017 4:51 PM by Intel Corporation

    R200 Head Position in Unity

    oliverH

      What's the best way to get the real-world 3D position (x,y,z) in mm of the users head?

       

      I'm using Unity 5.4.

      I can track the face in 2D and get the Avg. depth using...

       

      PXCMFaceModule faceModule;

      PXCMFaceData faceData;

      PXCMFaceData.Face[] faces;

      PXCMFaceData.DetectionData detectionData;

       

      faceModule = senseManager.QueryFace ();

      faceData = faceModule.CreateOutput ();

      faceData.Update ();

      faces = faceData.QueryFaces();

      detectionData = faces[0].QueryDetection();

      detectionData.QueryBoundingRect(out boundingRect);

      detectionData.QueryFaceAverageDepth(out depth);

       

      But I need the 3D location, Any hints?

      I tried the person tracking module...

       

      PXCMPersonTrackingModule personModule;

      PXCMPersonTrackingData personData;

      personModule = senseManager.QueryPersonTracking();

      personData = personModule.QueryOutput();

      PXCMPersonTrackingData.Person person = personData.QueryPersonDataById(0);

      PXCMPersonTrackingData.PersonTracking PT = person.QueryTracking();

       

      This provides...

      PT.Query3DBoundingBox()... which is a whole body bounding box. Nope.

      PT.QueryHeadBoundingBox()... which is a 2D box in pixels!!! NOPE!

       

      I only want the head position in 3D.