Items with no label
3335 Discussions

R200 Head Position in Unity

OHami
Beginner
1,131 Views

What's the best way to get the real-world 3D position (x,y,z) in mm of the users head?

I'm using Unity 5.4.

I can track the face in 2D and get the Avg. depth using...

PXCMFaceModule faceModule;

PXCMFaceData faceData;

PXCMFaceData.Face[] faces;

PXCMFaceData.DetectionData detectionData;

faceModule = senseManager.QueryFace ();

faceData = faceModule.CreateOutput ();

faceData.Update ();

faces = faceData.QueryFaces();

detectionData = faces[0].QueryDetection();

detectionData.QueryBoundingRect(out boundingRect);

detectionData.QueryFaceAverageDepth(out depth);

But I need the 3D location, Any hints?

I tried the person tracking module...

PXCMPersonTrackingModule personModule;

PXCMPersonTrackingData personData;

personModule = senseManager.QueryPersonTracking();

personData = personModule.QueryOutput();

PXCMPersonTrackingData.Person person = personData.QueryPersonDataById(0);

PXCMPersonTrackingData.PersonTracking PT = person.QueryTracking();

This provides...

PT.Query3DBoundingBox()... which is a whole body bounding box. Nope.

PT.QueryHeadBoundingBox()... which is a 2D box in pixels!!! NOPE!

I only want the head position in 3D.

0 Kudos
3 Replies
OHami
Beginner
207 Views

Update:

I've tried using the https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/doc_utils_the_point_converter_utility.html The Point Converter Utility [F200,SR300] but it only list the F200 and SR300... why are these functions not available on the R200?

0 Kudos
idata
Employee
207 Views

Hi Oliver,

 

 

Thanks for your interest in the Intel® RealSense Platform.

 

 

We don't have a direct way to specifically get the head position in 3D coordinates, however, you could use the Projection APIs to get the depth data from the bounding boxes. If you use the Face or Head Bounding Boxes then find the center point and you can use Projection to map to depth. Please take a look at this link: https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?pxcprojection.html Intel® RealSense™ SDK 2016 R2 Documentation.

 

 

Moreover, regarding your last question, we would like to let you know that The Point Converter Utility was originally developed to be used with the Hand module, and Hand is supported only in F200 and SR300.

 

 

Hope this information helps.

 

 

Regards,

 

-Yermi

 

0 Kudos
idata
Employee
207 Views

Hi Oliver,

 

 

We would like to know if the information provided above helps, also if you have any other question.

 

 

Regards,

 

-Yermi

 

0 Kudos
Reply