getting raw finger points

getting raw finger points

Could anyone help me out, I am trying to just get the co ordinates of the finger points so that I can set up some sort of custom gesture. I have tried looking at the sample application but I could not figure it out other then getting x and y from the draw method. 

Thanks for your help.

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

The gesture_render.h/cpp found in the Gesture_viewer sample application (in the SDK) shows a good approach on how one could retrieve these finger coordinates. Apart from that, one could also refer to the sdkmanuals.chm (also in the SDK) document for more detailed descriptions about the corresponding methods and enums.

Hope this helps!


Thanks I understand that the Geonode position can be retreived by the positionImage method but how can I convert this geonode variable into x y z floats?

GeoNode.PositionImage.x will give you x coordinate in float same exits for y and z coordinates.


Here is a stupid simple Java implementation for anyone that has the same trouubles I did:

import intel.pcsdk.*;
private PImage display;
private static int mode=PXCUPipeline.GESTURE;
private PXCUPipeline pp;
void setup() {
 size(320, 240);
pp=new PXCUPipeline(this);
 if (!pp.Init(mode)) {
 print("Failed to initialize PXCUPipelinen");
//String[] cmds=new String[]{"one","two","three"};
int[] dsize=new int[2];
 if (pp.QueryRGBSize(dsize)) {
 display=createImage(dsize[0], dsize[1], RGB);
 if (pp.QueryLabelMapSize(dsize)) {
 display=createImage(dsize[0], dsize[1], RGB);
void draw() { 
 if (pp.AcquireFrame(false)) {
 if (pp.QueryLabelMapAsImage(display)) image(display, 0, 0); else if (pp.QueryRGB(display)) image(display, 0, 0);
String[] myStringArray = new String[3];
 PXCMGesture.GeoNode ndata = new PXCMGesture.GeoNode();
 PXCMGesture.GeoNode ndata2 = new PXCMGesture.GeoNode();
 PXCMGesture.GeoNode ndata3 = new PXCMGesture.GeoNode();
 PXCMGesture.GeoNode ndata4 = new PXCMGesture.GeoNode();
 PXCMGesture.GeoNode ndata5 = new PXCMGesture.GeoNode();
 PXCMGesture.GeoNode ndata6 = new PXCMGesture.GeoNode();
pp.QueryGeoNode(PXCMGesture.GeoNode.LABEL_BODY_HAND_LEFT, ndata2);
 pp.QueryGeoNode(PXCMGesture.GeoNode.LABEL_BODY_HAND_PRIMARY|PXCMGesture.GeoNode.LABEL_FINGER_THUMB, ndata3);
 pp.QueryGeoNode(PXCMGesture.GeoNode.LABEL_BODY_HAND_PRIMARY|PXCMGesture.GeoNode.LABEL_FINGER_MIDDLE, ndata4);
 pp.QueryGeoNode(PXCMGesture.GeoNode.LABEL_BODY_HAND_PRIMARY|PXCMGesture.GeoNode.LABEL_FINGER_RING, ndata5);
 pp.QueryGeoNode(PXCMGesture.GeoNode.LABEL_BODY_HAND_PRIMARY|PXCMGesture.GeoNode.LABEL_FINGER_PINKY, ndata6);
 pp.QueryGeoNode(PXCMGesture.GeoNode.LABEL_BODY_HAND_PRIMARY|PXCMGesture.GeoNode.LABEL_FINGER_INDEX, ndata);
if (ndata2.positionImage != null && ndata.positionImage != null&& ndata3.positionImage != null&& ndata4.positionImage != null&& ndata5.positionImage != null&& ndata6.positionImage != null) {
 stroke(127, 0, 121);
 line(ndata2.positionImage.x, ndata2.positionImage.y, ndata.positionImage.x, ndata.positionImage.y);
 line(ndata2.positionImage.x, ndata2.positionImage.y, ndata3.positionImage.x, ndata3.positionImage.y);
 line(ndata2.positionImage.x, ndata2.positionImage.y, ndata4.positionImage.x, ndata4.positionImage.y);
 line(ndata2.positionImage.x, ndata2.positionImage.y, ndata5.positionImage.x, ndata5.positionImage.y);
 line(ndata2.positionImage.x, ndata2.positionImage.y, ndata6.positionImage.x, ndata6.positionImage.y);

I think I read somewhere that sdk is available to C# and C++ developers...Great dude you tried with java...

Haha thanks just built on the processing example. The C# and C++ demos were complicated and I stuggled with understanding the actual structure of the SDK. With this demo I can understand how Geonodes are used and how to extract data from them

Correction: The SDK is available in C++, a wrapper for C#, and a set of simpler wrappers for Unity (C# 2.0) and Processing (Java).

Leave a Comment

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