//method to run DTW and return an [array] containing the DTW data. //This has been adapted from Gina's code //@param joint corresponds to the joint that you desire (see JointData.cs for full list of usable joints) //Multiple versions of the dynamic time warping. Through multiple tests, we decided to use the 3rd version private ArrayList runDTW() { int numFrames = 30; ArrayList jData = new ArrayList(); foreach (String joint in jointsTracked) { ArrayList masterList = masterData.getJointArray(joint); ArrayList studentList = studentData.Get(joint); int size = masterList.Count; if (startFrame + numFrames > size) { numFrames = size - startFrame; } double val = dtw.DTWDistance(masterList.GetRange(startFrame, numFrames), studentList.GetRange(startFrame, numFrames)); jData.Add(val); } startFrame += numFrames; return(jData); }