Assignment #6: Make a processing app that you interact with via a depth-sensing camera (Kinect)
{"skeletons":[{"userid":0,"joints":[{"joint":"head","X":-702.131,"Y":486.367,"Z":1579.783},{"joint":"neck","X":-676.385,"Y":273.182,"Z":1570.143},{"joint":"neck","X":-676.385,"Y":273.182,"Z":1570.143},{"joint":"l_shoulder","X":-645.730,"Y":268.028,"Z":1768.476},{"joint":"l_elbow","X":-645.831,"Y":-27.049,"Z":1768.808},{"joint":"l_elbow","X":-645.831,"Y":-27.049,"Z":1768.808},{"joint":"l_hand","X":-647.107,"Y":-322.086,"Z":1764.067},{"joint":"l_hand","X":-647.107,"Y":-322.086,"Z":1764.067},{"joint":"l_hand","X":-647.107,"Y":-322.086,"Z":1764.067},{"joint":"r_shoulder","X":-707.041,"Y":278.335,"Z":1371.810},{"joint":"r_elbow","X":-714.375,"Y":-16.645,"Z":1369.905},{"joint":"r_elbow","X":-714.375,"Y":-16.645,"Z":1369.905},{"joint":"r_hand","X":-755.104,"Y":-308.767,"Z":1378.805},{"joint":"r_hand","X":-755.104,"Y":-308.767,"Z":1378.805},{"joint":"torso","X":-647.342,"Y":50.508,"Z":1559.868},{"joint":"torso","X":-647.342,"Y":50.508,"Z":1559.868},{"joint":"l_hip","X":-603.110,"Y":-174.720,"Z":1647.858},{"joint":"l_knee","X":-816.152,"Y":-553.847,"Z":1768.455},{"joint":"l_knee","X":-816.152,"Y":-553.847,"Z":1768.455},{"joint":"l_foot","X":-796.903,"Y":-987.331,"Z":1763.658},{"joint":"r_hip","X":-633.487,"Y":-169.613,"Z":1451.327},{"joint":"r_knee","X":-776.181,"Y":-590.984,"Z":1527.173},{"joint":"r_knee","X":-776.181,"Y":-590.984,"Z":1527.173},{"joint":"r_foot","X":-775.487,"Y":-1024.921,"Z":1527.667}]}],"elapsed":8.181}
Listdata = new ArrayList (); String[] lines = loadStrings("output.txt"); for(int i = 0; i< lines.length; i++){ if((lines[i].length() > 0) && (lines[i].charAt(0) == '{')){ try{ data.add(new JSONObject(lines[i])); } catch(Exception e){ println("error"+i); } finally{} } }
float myX(float x){
return (_offsetx+x*_scalex);
}
float myY(float y){
return (_offsety + (-1.0*y*_scaley));
}