PXCMFaceAnalysis Face Landmark

PXCMFaceAnalysis Face Landmark

What is the face variable defined as in sample 57 (snippet from Face Landmark Data doc)? 

PXCMFaceAnalysis.Landmark landmark=face.DynamicCast<PXCMFaceAnalysis.Landmark>(PXCMFaceAnalysis.Landmark.CUID);

 

for (uint i=0;;i++) {

   int fid; ulong ts;

   if (face.QueryFace(i,out fid,out ts)<pxcmStatus.PXCM_STATUS_NO_ERROR) break;

 

   PXCMFaceAnalysis.Landmark.LandmarkData ldata;

   landmark.QueryLandmarkData(fid,PXCMFaceAnalysis.Landmark.Label.LABEL_NOSE_TIP,0,out data);

 

   // Process data

}

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

It is the PXCMFaceAnalsysis instance. 

Quote:

David Lu (Intel) wrote:

It is the PXCMFaceAnalsysis instance. 

I receive the errors below for declaring face variable using PXCMFaceAnalysis: 

PXCMFaceAnalysis face;

PXCMFaceAnalysis.Landmark landmark=face.DynamicCast<PXCMFaceAnalysis.Landmark>(PXCMFaceAnalysis.Landmark.CUID);

Assets/Testing/FaceFeatures.cs(21,41): error CS1061: Type `PXCMFaceAnalysis' does not contain a definition for `DynamicCast' and no extension method `DynamicCast' of type `PXCMFaceAnalysis' could be found (are you missing a using directive or an assembly reference?)

This instance need be assigned before you used. If you use Utilpipeline, you can use face = pipeline.QueryFace(); Then you can get landmark...

Can you provide a working snippet (with all variables declared and assigned) 

see sample @C:\Program Files (x86)\Intel\PCSDK\framework\CSharp\face_tracking.cs. Enjoy!

Leave a Comment

Please sign in to add a comment. Not a member? Join today