Hi everyone, atm im stuck, ive got a nice proccesing sketch controlling my cursor from skeleton data of my hand.
Only problem is i cant figure out how to get it to left click or stay left clicked (i.e. to move items around)
im using on pose rules in an if statment so all i litrally need is someone to tell me how to control the mouse through processing, ive looked at the references but they dont really help.
Thank you for helping or just looking
this is the bit i need help on what is the command for the mouse click?
I've used the kinect to follow my hand and use the robot class to control the mouse, but its limitation is that once my hand reachs the top of the sketch it wont go further.
I know you can fullscreen your sketch, but is it possible to make it completly transparent/ or a way to lay it under the desktop so i can still inter act with everything?
i've missed out the kinect callback stuff and my other class's this is where the main magic happens,
I was thinking a way to increase the movement generated by the skech to the cursor how would i approch it ?
void drawHands(){ int userId = calibratedUserID; //make a vector to store the left hand PVector rightHand = new PVector(); //put the position of the left hand into the vector float confidence = kinect.getJointPositionSkeleton(userId, SimpleOpenNI.SKEL_LEFT_HAND, rightHand); //convert the detected hand postion, to projective co-ords, that match the depth image PVector convertedRightHand = new PVector();
Hi guys, im using the kinect with SimpleOpenNI through processing, ive managed to get all the skeleton tracking and hand tracking, but my concept is trying to use the hand data as a mouse cursor.
Below is my code, im using a drawSkeleton Class attached to the sketch, this simpy uses a custom regonition/ calibration that ive saved, it pretty much instantly recgonises me and my hand, using a sketch i wrote to save the gesture as a .skel, it works with my much larger house mate aswell. The eclipse is just to show it tracking my hand.
The problem is i cant figure out how to convert the "convertedRightHand.x, convertedRightHand.y" for use with the mouseX, mouseY commands the "convertedRight.." is an int, while mouseX is a float, i cant figure a way to convert the two.
The other is, once achived how would i interactive with the compter as a mouse?
Your Help is apreacited! thank you!
Main sketch
import SimpleOpenNI.*; SimpleOpenNI kinect;
int calibratedUserID = 0;
void setup(){ frameRate(30); size(640, 480); kinect = new SimpleOpenNI(this); kinect.enableDepth();
//enable skeleton generation for all joints kinect.enableUser(SimpleOpenNI.SKEL_PROFILE_ALL); }
//make a vector to store the left hand PVector rightHand = new PVector(); //put the position of the left hand into the vector float confidence = kinect.getJointPositionSkeleton(userId,
SimpleOpenNI.SKEL_LEFT_HAND, rightHand);
//convert the detected hand postion, to projective co-ords, that match the depth image PVector convertedRightHand = new PVector();
kinect.convertRealWorldToProjective(rightHand, convertedRightHand); //display it fill(255,0,0); ellipse(convertedRightHand.x, convertedRightHand.y, 10, 10); }