Community
cancel
Showing results for 
Search instead for 
Did you mean: 
punto_d_
Beginner
80 Views

Is it possible to get only eye landmark points?

Hello, I'm new to intel realsense, 
according to the sample code, we need to use this code to retrieve the face landmark points :
 

                if (face.landmarks.points !== 'undefined') {
                    for (var i = 0; i < face.landmarks.points.length; i++) {
                        point = face.landmarks.points;
                        if (point != null) {

                            // update sample renderer landmarks position
                            nodestorender.position.set(point.image.x * factor, point.image.y * factor, 0);
                        }
                    }
                }

is it possible to get only the eye landmark points?
thank you.

0 Kudos
6 Replies
MartyG
Honored Contributor III
80 Views

I remembered addressing this question at the end of last year when another developer asked how they could track only the ears.  I managed to dig up the link to that post.  Basically, you can query individual landmark points instead of all of them by using a function called QueryPoint.  

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/querypoint...

The values of particular landmark points are on a face chart.

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html...

punto_d_
Beginner
80 Views

Thank you for your effort. I'll look it up.
punto_d_
Beginner
80 Views

for QueryPoint, can I code in JavaScript? 

MartyG
Honored Contributor III
80 Views

The SDK does support JavaScript.  I do not personally have experience of using it with the camera, but the RealSense developer guide document does contain information on configuring for a JavaScript development environment.

https://software.intel.com/sites/default/files/managed/41/4e/sdkdevguide.pdf

In particular, refer to pages 21, 22 and 34.

In regard to using the QueryPoint instruction specifically: a useful reference for you may be the JavaScript face-tracking sample program that comes packaged with the SDK.  You can find it in the following SDK folder:

RSSDK > framework > JavaScript > DF_FaceTracking

Double-leftclick on the 'DF_FaceTracking' web file in this folder to run the sample program.

You can open the JavaScript files in the folder in a word processor or text editor to view the code and see how RealSense instructions are structured in JavaScript.

I opened another of the samples in the Javascript samples folder, 'DF_BlobViewer', and that script used the QueryPoints instruction.  So it would seem that the instruction for looking at individual points (QueryPoint) is almost certainly supported in JavaScript too.

punto_d_
Beginner
80 Views

Yes i know. But in QueryPoint documentation, there is no javascript available. Screenshoot :http://imgur.com/oA4RJsi This is why i posted this question in the first place. .

MartyG
Honored Contributor III
80 Views

QueryPoints does not have a JavaScript example either, yet it is featured in the JavaScript sample programs.  So it is likely to be a case of there not being a JavaScript example provided in the documentation, rather than QueryPoint not being supported at all.

This theory is supported by the existence of JavaScript functions for the LandmarkType instruction for referring to specific facial features.

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/landmarkty...

Looking at the format of the JavaScript on that page,a line - for example - to reference the center point of the left eye might be something like:

intel.realsense.face.LandmarkType = LANDMARK_EYE_LEFT_CENTER

(apologies if the syntax is incorrect, it's been years since I wrote in non-Unity JavaScript!)

Reply