Items with no label
3335 Discussions

How to get the screen coordinates of PXCMFaceData.HeadPosition?

天虞
Beginner
1,147 Views

In addition:

PXCMFaceData.HeadPosition.headCenter = DetectionData.QueryBoundingRect().centerPos?

Thanks.

0 Kudos
3 Replies
MartyG
Honored Contributor III
147 Views

The QueryHeadPosition instruction, which is part of the HeadPosition instruction set, may be what you need. The documentation says that "the QueryHeadPosition function returns the face center point position."

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

0 Kudos
天虞
Beginner
147 Views

QueryHeadPosition returns is the depthCamere space, not the screen space...

0 Kudos
MartyG
Honored Contributor III
147 Views

So if you want the screen space (image) coordinates, I think you are looking to project to Color coordinates?

The best match I could find to what you wanted was using the Image component of the LandmarkPoint instruction to get the color image coordinates of a landmark point on the face

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/landmarkpoint_pxcfacedata.html LandmarkPoint (+JS,+UWP)

An alternative to looking for a specific face landmark would be to get the color coordinates using the more general ProjectCameraToColor instruction.

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

0 Kudos
Reply