Getting all 0s for GeoNode Data

Getting all 0s for GeoNode Data

Hi,  

I am trying to get the fingertracking data from a gesturepipeline as in the tutorial. However, I want to save the acualy data to a text file so I am first trying to get the indiviual GeoNodes I want.

I used the code below in the onNewFrame method:

PXCGesture::GeoNode fingertip;
QueryGesture()->QueryNodeData(0,PXCGesture::GeoNode::LABEL_HAND_FINGERTIP,&fingertip);
PXCGesture::GeoNode upper;
QueryGesture()->QueryNodeData(0,PXCGesture::GeoNode::LABEL_HAND_UPPER,&upper);
PXCGesture::GeoNode hmiddle;
QueryGesture()->QueryNodeData(0,PXCGesture::GeoNode::LABEL_HAND_MIDDLE,&hmiddle);
PXCGesture::GeoNode lower;
QueryGesture()->QueryNodeData(0,PXCGesture::GeoNode::LABEL_HAND_LOWER,&lower);
PXCGesture::GeoNode thumb;
QueryGesture()->QueryNodeData(0,PXCGesture::GeoNode::LABEL_FINGER_THUMB,&thumb);
PXCGesture::GeoNode index;
QueryGesture()->QueryNodeData(0,PXCGesture::GeoNode::LABEL_FINGER_INDEX,&index);
PXCGesture::GeoNode middle;
QueryGesture()->QueryNodeData(0,PXCGesture::GeoNode::LABEL_FINGER_MIDDLE,&middle);
PXCGesture::GeoNode ring;
QueryGesture()->QueryNodeData(0,PXCGesture::GeoNode::LABEL_FINGER_RING,&ring);
PXCGesture::GeoNode pinky;
QueryGesture()->QueryNodeData(0,PXCGesture::GeoNode::LABEL_FINGER_PINKY,&pinky);

However, the positionImage.x and positionImage.y for all the nodes gotten is always 0. I don't know what I'm doing wrong. Any help??

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

You have to bit-OR from the general to the specific... for example: PXCGesture:GeoNode::LABEL_HAND_PRIMARY|PXCGesture:GeoNode::LABEL_FINGER_RING

 

i did the same thing..but still i get 0 value...

PXCGesture::GeoNode dif;

bool ifvalid=(gesture->QueryNodeData(0,PXCGesture::GeoNode::LABEL_BODY_HAND_LEFT|PXCGesture::GeoNode::LABEL_FINGER_INDEX,&dif));

       x=dif.positionImage.x;
        y=dif.positionImage.y;
        z=dif.positionImage.z;

gives 0 values...

rsa

I did not have your whole code. But it looks like you did not use PXCGesture *gesture=pp->QueryGesture(); before gesture->QueryNodeData.

Leave a Comment

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