3 Replies Latest reply on Nov 4, 2016 5:39 PM by Intel Corporation

    Face Landmarks - Java

    Kasun_Chandrasiri

      I am searching for an answer in weeks, But I still didn't got any.

       

      I am working on R200 camera and trying to capture face landmark data. But the array return with null values. As I following the forum I saw it was not supporting with java and will release in next SDK. Some of the posts were in 2015 and I realize Intel release the latest SDK in Feb 2016 if I am correct, which I am currently using.

      Can you please confirm the latest Java library contains face landmark functionality ?

       

      If you check the below discussion 

       

      https://software.intel.com/en-us/forums/realsense/topic/545241

       

      David Lu (Intel)

       

       

      Tue, 05/19/2015 - 14:07

       

      This is a known bug. Same issue in the face reflection. We will fix in the next public release. Thanks!

       

       

       

      So this is 19th May 2015, But seems it doesn't solve yet.

       

      The only solution I can think is using c++ library with java native programming, which is a going to be lot of work.

       

      I think this should really fix soon as possible and add to the java library so can use in easy way.

       

      I am expecting an positive and accurate answer ASAP.

       

      Cheers

        • 1. Re: Face Landmarks - Java
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi Kasun,

          Thank you for reaching out, we are sorry to hear that you’re having troubles with the implementation of this feature. Let us try to help you.
          I was looking at the SDK Reference Manual for Face Tracking and I’m wondering if you’re implementing the Face Landmarks Java code exactly as it is in the manual (page 21-22). Could you please let us take a look at your code?
          Also, on page 59 and 60 you can find the details for QueryLandmarks, the function that returns the instance to retrieve the landmarks. Apparently, a NULL/null will be returned if face detection is not enabled, you can check that to make sure everything is as expected.
          Please let us know your results, we will keep investigating for confirmation on your other questions and requests.  

          Regards,
          -Pablo

          • 2. Re: Face Landmarks - Java
            Kasun_Chandrasiri

            Hi Pablo,

             

            Thanks for the quick reply. At last some valuable information. I have tried  the same code and the array has null values.

             

            it seems below method return null value array

             

            pxcmStatus QueryPoints(PXCMPointI32[] data)

            I was able to get values using below method

             

            boolean QueryPoint(int index, LandmarkPoint point);

            So my code looks like,

             

            int npoints = ldata.QueryNumPoints();
            PXCMFaceData.LandmarkPoint[] points = new PXCMFaceData.LandmarkPoint[npoints];
            for (int x = 0; x < points.length; x++) {

              PXCMFaceData.LandmarkPoint point = new PXCMFaceData.LandmarkPoint();
               ldata.QueryPoint(x, point);
               points[x] = point;
            }

             

            So this array will give me values of 78 face Landmarks.

             

            Do you think I am doing something wrong, which doesn't give values from one and  other gives.

             

            Thank you again for the reply and information provided.

             

            Kind Regards

            Kasun

            • 3. Re: Face Landmarks - Java
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hi Kasun,

              You’re welcome. I’m glad to know you got it working using the other function.
              Regarding your original code, pxcmStatus QueryPoints(PXCMPointI32[] data), everything seems to be right with it.
              Looking at the description for each function, QueryPoints “returns the landmark data for all landmark data”, while QueryPoint “retrieves individual data by the specified index” and can also be called multiple times unlike QueryPoints. My guess is that the way the program handles de landmarks when using QueryPoints might provide a null value for the array at some point. Now, I’m not sure how this function is implemented, but its return might become NULL when an individual null value is detected (which in turns makes it “unavailable”). But again, this is just a guess.

              Regards,
              -Pablo