Integer value/byte/pixel size sent from Processing to Arduino
in
Contributed Library Questions
•
1 year ago
The problem I am having is trying to figure out the byte/value/pixel range size that is being sent to the arduino. Using the following as imports : SimpleOpenNI and processing.serial. Code is here:
//if user is successfully calibrated
if ( kinect.isTrackingSkeleton(userId)) {
drawSkeleton(userId); //draw the skeleton on the depth image
PVector torso = new PVector(); //make a vector to store torso
kinect.getJointPositionSkeleton(userId, SimpleOpenNI.SKEL_TORSO, torso); //put the position of torso into vector
port.write(int(torso.z)); //z-coordinate corresponds to how far it is from kinect, convert to int and send data through serial port
}
I found the user's torso.z from depth image and sent this to arduino.
//if user is successfully calibrated
if ( kinect.isTrackingSkeleton(userId)) {
drawSkeleton(userId); //draw the skeleton on the depth image
PVector torso = new PVector(); //make a vector to store torso
kinect.getJointPositionSkeleton(userId, SimpleOpenNI.SKEL_TORSO, torso); //put the position of torso into vector
port.write(int(torso.z)); //z-coordinate corresponds to how far it is from kinect, convert to int and send data through serial port
}
I found the user's torso.z from depth image and sent this to arduino.
1