6 Replies Latest reply on Jul 18, 2017 11:45 AM by Intel Corporation

    Face tracking information in SDK R2, FACE_MODE_COLOR_PLUS_DEPTH

    jcelerier

      Hello,

      due to the issues with the SDK R3 we've been downgrading to SDK R2.

       

      However the following issue arise:

       

      * Face tracking is rs::Face::FaceConfiguration::FACE_MODE_COLOR_PLUS_DEPTH

       

      * Streams are setup like this:

              rs::DataDesc ddesc = {};
              memset(&ddesc, 0, sizeof(rs::DataDesc));
      
              ddesc.streams.color.sizeMin = { 1920, 1080 };
              ddesc.streams.color.sizeMax = { 1920, 1080 };
              ddesc.streams.color.frameRate = { 3, 60 };
      
              ddesc.streams.depth.sizeMin = { 1, 1 };
              ddesc.streams.depth.sizeMax = { 1920, 1080 };
              ddesc.streams.depth.frameRate = { 3, 60 };
      
              m_reader->EnableStreams(&ddesc);
              m_rs->EnableFace();
      
      

       

      * I'm using the event handler method, reimplementing

      pxcStatus PXCAPI OnNewSample(pxcUID sender, rs::Sample* sample)
      

       

      Inside, both the sample->color and sample->depth members contain data at each call.

      I'm then trying to read landmarks from the PXCFaceData.

       

      But sometimes the landmarks are scaled to the depth image, and sometimes they are scaled to the color image.

       

      If I set rs::Face::FaceConfiguration::FACE_MODE_COLOR they are always scaled to the color image, and if I set rs::Face::FaceConfiguration::FACE_MODE_IR
      they are always scaled to the depth image.

      But how can I know, from the OnNewSample callback, from which stream those points are originating in FACE_MODE_COLOR_PLUS_DEPTH ?