Items with no label
3335 Discussions

Face tracking information in SDK R2, FACE_MODE_COLOR_PLUS_DEPTH

JCele
Beginner
1,444 Views

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 ?

0 Kudos
6 Replies
JCele
Beginner
167 Views

(note: the names look like the SDK R3 names only because I've been adding typedefs to prevent changing too much of the code when downgrading R3 -> R2).

0 Kudos
idata
Employee
167 Views

Hi jcelerier,

 

 

Thanks for contacting the Intel RealSense community support, allow me to investigate further on this scenario so we can test this on our end and let you know our findings in regards to the landmarks produced by the face tracking module.

 

 

Have a great day!

 

 

Regards,

 

Leonardo L

 

0 Kudos
idata
Employee
167 Views

Hi jcelerier,

 

 

We have reviewed your thread and I got the following from our research: we noticed that in the DF_FaceTracking sample code, that FACE_MODE_COLOR_PLUS_DEPTH and FACE_MODE_IR get treated the same - they both lead to renderer->SetRendererType(FaceTrackingRenderer::R3D); as seen in main.cpp line 335-338. Give this a try and let us know if this gets you the values that you need for the landmarks.

 

 

We hope you find this information helpful.

 

 

Regards,

 

Leonardo L

 

 

0 Kudos
idata
Employee
167 Views

Hi jcelerier,

 

 

We are writing to follow up on your thread, let us know if the recommendation from the previous post worked for you or if you need further assistance with this.

 

 

Have a great day!

 

 

Regards,

 

Leonardo L
0 Kudos
JCele
Beginner
167 Views

Hi,

I could solve my problem by getting the face data in

pxcStatus OnModuleProcessedFrame(pxcUID mid, PXCBase *module, PXCCapture::Sample *sample);

instead of

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

0 Kudos
idata
Employee
167 Views

Hi jcelerier,

 

 

Thanks for the update, we're glad to hear that you were able to solve your issue, also thanks for sharing the solution, It'll be useful for future users in case they experience the same issue. It was our pleasure to assist you with this issue.

 

 

Have a great day!

 

 

Regards,

 

Leonardo L
0 Kudos
Reply