private void frameAdvantage(Framedata f, ref Player p1, ref Player p2) { bool p1idle = p1.IsCompletelyIdle(); bool p2idle = p2.IsCompletelyIdle(); if (!p1idle && !p2idle) { f.frameAdvantage = 0; f.blockstring = true; } if ((p1idle || p2idle) && f.blockstring) { if (p1idle && p2idle) { f.blockstring = false; f.updateFA = true; } if (!p1idle) { --f.frameAdvantage; } if (!p2idle) { ++f.frameAdvantage; } } }
private int getStartingFrameNumberofLift() { List <Framedata> jointsdata_clone = new List <Framedata>(jointsdata); jointsdata_clone.Sort(); Framedata startingFrame = jointsdata_clone[0]; startingFrameNumber = startingFrame.FrameID; return(startingFrameNumber); }
public void readInFramedataElement(XmlReader reader, string dotName, Framedata framedata) { //while (reader.NodeType != XmlNodeType.EndElement && reader.Name != "Frame") //{ reader.Read(); if (reader.NodeType == XmlNodeType.Text) { //Console.WriteLine(dotName + " = " + reader.Value); switch (dotName) { case "HipAngle": framedata.HipAngle = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "ShoulderAngle": framedata.ShoulderAngle = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "KneeAngle": framedata.KneeAngle = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "HeadHeight": framedata.HeadHeight = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; //joint points //frontal view case "headX": framedata.headX = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "headY": framedata.headY = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftHandX": framedata.leftHandX = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftHandY": framedata.leftHandY = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "rightHandX": framedata.rightHandX = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "rightHandY": framedata.rightHandY = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftshoulderX": framedata.leftshoulderX = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftshoulderY": framedata.leftshoulderY = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "rightshoulderX": framedata.rightshoulderX = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "rightshoulderY": framedata.rightshoulderY = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "hipX": framedata.hipX = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "hipY": framedata.hipY = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftKneeX": framedata.leftKneeX = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftKneeY": framedata.leftKneeY = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "rightKneeX": framedata.rightKneeX = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "rightKneeY": framedata.rightKneeY = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftFootX": framedata.leftFootX = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftFootY": framedata.leftFootY = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "rightFootX": framedata.rightFootX = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "rightFootY": framedata.rightFootY = Convert.ToInt32(reader.Value); reader.Read();//now on end element like </HipAngle> break; //side view case "headYabs": framedata.headYabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "headZabs": framedata.headZabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftHandYabs": framedata.leftHandYabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftHandZabs": framedata.leftHandZabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftshoulderYabs": framedata.leftshoulderYabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftshoulderZabs": framedata.leftshoulderZabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "hipYabs": framedata.hipYabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "hipZabs": framedata.hipZabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftKneeYabs": framedata.leftKneeYabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftKneeZabs": framedata.leftKneeZabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftFootYabs": framedata.leftFootYabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; case "leftFootZabs": framedata.leftFootZabs = Convert.ToDouble(reader.Value); reader.Read();//now on end element like </HipAngle> break; } } // } reader.Read();//now on the next start element like <StartingFrame> }
//read data from XML and store it in a List<T> public void readData(String filename) { XmlReaderSettings settings = new XmlReaderSettings(); settings.IgnoreWhitespace = true; settings.IgnoreComments = true; using (XmlReader reader = XmlReader.Create(filename, settings)) { while (reader.Read()) { // Only detect start elements. if (reader.IsStartElement()) { // Get element name and switch on it. //Console.WriteLine("reader.Name = " + reader.Name); switch (reader.Name) { case "Lift": reader.Read();//now on <Fileproperty> Boolean enterSubelementRegion = false; // Detect this element. //Console.WriteLine("Start <Lift> element."); //string liftname = reader["Name"]; //int startingFrame = Convert.ToInt32(reader["StartingFrame"]); while (reader.NodeType != XmlNodeType.EndElement) { if (enterSubelementRegion == false) { reader.Read();//now in the sub element region like <Name> enterSubelementRegion = true; } readInFilepropertyElement(reader, reader.Name, fileproperty); } jointsdata = new Framedata[fileproperty.TotalFrames + 100]; break; case "Frame": // Detect this article element. //Console.WriteLine("Start <Frame> element."); // Search for the attribute name on this current node. Boolean enterSubelementRegion2 = false; string frameID = reader["ID"]; int id = Convert.ToInt32(frameID); //Console.WriteLine("ID = " +id); //create object for information in this frame Framedata fdata = new Framedata(); fdata.FrameID = id; while (reader.NodeType != XmlNodeType.EndElement) { if (enterSubelementRegion2 == false) { reader.Read(); enterSubelementRegion2 = true; } readInFramedataElement(reader, reader.Name, fdata); } jointsdata[id] = fdata; break; } } } } }
//public void initialstore(ReplaySkeletonFrame frame, int framenumber) public void storeframe(ReplaySkeletonFrame frame, int framenumber, CoordinateMapper replayCoordinateMapper) { //int framenumber; double leftShoulderAngle, leftHipAngle, leftKneeAngle, headHeight; double headX, headY, leftHandX, leftHandY, rightHandX, rightHandY; double leftshoulderX, leftshoulderY, rightshoulderX, rightshoulderY; double hipX, hipY, leftKneeX, leftKneeY, rightKneeX, rightKneeY; double leftFootX, leftFootY, rightFootX, rightFootY; //side view double headYabs, headZabs, leftHandYabs, leftHandZabs; double leftshoulderYabs, leftshoulderZabs, hipYabs, hipZabs; double leftKneeYabs, leftKneeZabs, leftFootYabs, leftFootZabs; if (isStartingFrame == true) { initialFrameNumber = framenumber; System.Console.WriteLine("initialFrame = " + initialFrameNumber); isStartingFrame = false; } if (frame == null) { //currentFrameNumber = framenumber - initialFrameNumber; leftShoulderAngle = 999; leftHipAngle = 999; leftKneeAngle = 999; headHeight = 999; headX = 999; headY = 999; leftHandX = 999; leftHandY = 999; rightHandX = 999; rightHandY = 999; leftshoulderX = 999; leftshoulderY = 999; rightshoulderX = 999; rightshoulderY = 999; hipX = 999; hipY = 999; leftKneeX = 999; leftKneeY = 999; rightKneeX = 999; rightKneeY = 999; leftFootX = 999; leftFootY = 999; rightFootX = 999; rightFootY = 999; //side view headYabs = 999; headZabs = 999; leftHandYabs = 999; leftHandZabs = 999; leftshoulderYabs = 999; leftshoulderZabs = 999; hipYabs = 999; hipZabs = 999; leftKneeYabs = 999; leftKneeZabs = 999; leftFootYabs = 999; leftFootZabs = 999; //currentFrameNumber++; } else { var trackedSkeleton = frame.Skeletons.FirstOrDefault(a => a.TrackingState == SkeletonTrackingState.Tracked); //IMPORTATNT: 23 occurences frame here for deadlift1.replay if (trackedSkeleton == null) return; //set starting frame of the video to index 1 //framenumber = frame.FrameNumber - initialFrameNumber + 1; //currentFrameNumber = framenumber; leftShoulderAngle = JointAngle(trackedSkeleton.Joints[JointType.ShoulderLeft], trackedSkeleton.Joints[JointType.WristLeft], trackedSkeleton.Joints[JointType.HipLeft]); leftHipAngle = JointAngle(trackedSkeleton.Joints[JointType.HipLeft], trackedSkeleton.Joints[JointType.ShoulderLeft], trackedSkeleton.Joints[JointType.KneeLeft]); leftKneeAngle = JointAngle(trackedSkeleton.Joints[JointType.KneeLeft], trackedSkeleton.Joints[JointType.FootLeft], trackedSkeleton.Joints[JointType.HipLeft]); headHeight = trackedSkeleton.Joints[JointType.Head].Position.Y; //frontal view headX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.Head].Position, ColorImageFormat.RgbResolution640x480Fps30).X; headY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.Head].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; leftHandX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HandLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).X; leftHandY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HandLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; rightHandX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HandRight].Position, ColorImageFormat.RgbResolution640x480Fps30).X; rightHandY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HandRight].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; leftshoulderX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.ShoulderLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).X; leftshoulderY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.ShoulderLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; rightshoulderX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.ShoulderRight].Position, ColorImageFormat.RgbResolution640x480Fps30).X; rightshoulderY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.ShoulderRight].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; hipX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HipCenter].Position, ColorImageFormat.RgbResolution640x480Fps30).X; hipY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HipCenter].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; leftKneeX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.KneeLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).X; leftKneeY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.KneeLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; rightKneeX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.KneeRight].Position, ColorImageFormat.RgbResolution640x480Fps30).X; rightKneeY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.KneeRight].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; leftFootX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.FootLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).X; leftFootY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.FootLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; rightFootX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.FootRight].Position, ColorImageFormat.RgbResolution640x480Fps30).X; rightFootY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.FootRight].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; //side view 22/03/2013 headYabs = trackedSkeleton.Joints[JointType.Head].Position.Y; headZabs = trackedSkeleton.Joints[JointType.Head].Position.Z; leftHandYabs = trackedSkeleton.Joints[JointType.HandLeft].Position.Y; leftHandZabs = trackedSkeleton.Joints[JointType.HandLeft].Position.Z; leftshoulderYabs = trackedSkeleton.Joints[JointType.ShoulderLeft].Position.Y; leftshoulderZabs = trackedSkeleton.Joints[JointType.ShoulderLeft].Position.Z; hipYabs = trackedSkeleton.Joints[JointType.HipCenter].Position.Y; hipZabs = trackedSkeleton.Joints[JointType.HipCenter].Position.Z; leftKneeYabs = trackedSkeleton.Joints[JointType.KneeLeft].Position.Y; leftKneeZabs = trackedSkeleton.Joints[JointType.KneeLeft].Position.Z; leftFootYabs = trackedSkeleton.Joints[JointType.FootLeft].Position.Y; leftFootZabs = trackedSkeleton.Joints[JointType.FootLeft].Position.Z; } currentFrameNumber = framenumber - initialFrameNumber + 1; //System.Console.WriteLine("framenumber = " + framenumber); //System.Console.WriteLine("initialFrameNumber = " + initialFrameNumber); //System.Console.WriteLine("currentFrameNumber = " + currentFrameNumber); Framedata currentframe = new Framedata(currentFrameNumber, leftHipAngle, leftShoulderAngle, leftKneeAngle, headHeight, headX, headY, leftHandX, leftHandY, rightHandX, rightHandY, leftshoulderX, leftshoulderY, rightshoulderX, rightshoulderY, hipX, hipY, leftKneeX, leftKneeY, rightKneeX, rightKneeY, leftFootX, leftFootY, rightFootX, rightFootY, headYabs, headZabs, leftHandYabs, leftHandZabs, leftshoulderYabs, leftshoulderZabs, hipYabs, hipZabs, leftKneeYabs, leftKneeZabs, leftFootYabs, leftFootZabs); jointsdata.Add(currentframe); }
//public void initialstore(ReplaySkeletonFrame frame, int framenumber) public void storeframe(ReplaySkeletonFrame frame, int framenumber, CoordinateMapper replayCoordinateMapper) { //int framenumber; double leftShoulderAngle, leftHipAngle, leftKneeAngle, headHeight; double headX, headY, leftHandX, leftHandY, rightHandX, rightHandY; double leftshoulderX, leftshoulderY, rightshoulderX, rightshoulderY; double hipX, hipY, leftKneeX, leftKneeY, rightKneeX, rightKneeY; double leftFootX, leftFootY, rightFootX, rightFootY; //side view double headYabs, headZabs, leftHandYabs, leftHandZabs; double leftshoulderYabs, leftshoulderZabs, hipYabs, hipZabs; double leftKneeYabs, leftKneeZabs, leftFootYabs, leftFootZabs; if (isStartingFrame == true) { initialFrameNumber = framenumber; System.Console.WriteLine("initialFrame = " + initialFrameNumber); isStartingFrame = false; } if (frame == null) { //currentFrameNumber = framenumber - initialFrameNumber; leftShoulderAngle = 999; leftHipAngle = 999; leftKneeAngle = 999; headHeight = 999; headX = 999; headY = 999; leftHandX = 999; leftHandY = 999; rightHandX = 999; rightHandY = 999; leftshoulderX = 999; leftshoulderY = 999; rightshoulderX = 999; rightshoulderY = 999; hipX = 999; hipY = 999; leftKneeX = 999; leftKneeY = 999; rightKneeX = 999; rightKneeY = 999; leftFootX = 999; leftFootY = 999; rightFootX = 999; rightFootY = 999; //side view headYabs = 999; headZabs = 999; leftHandYabs = 999; leftHandZabs = 999; leftshoulderYabs = 999; leftshoulderZabs = 999; hipYabs = 999; hipZabs = 999; leftKneeYabs = 999; leftKneeZabs = 999; leftFootYabs = 999; leftFootZabs = 999; //currentFrameNumber++; } else { var trackedSkeleton = frame.Skeletons.FirstOrDefault(a => a.TrackingState == SkeletonTrackingState.Tracked); //IMPORTATNT: 23 occurences frame here for deadlift1.replay if (trackedSkeleton == null) { return; } //set starting frame of the video to index 1 //framenumber = frame.FrameNumber - initialFrameNumber + 1; //currentFrameNumber = framenumber; leftShoulderAngle = JointAngle(trackedSkeleton.Joints[JointType.ShoulderLeft], trackedSkeleton.Joints[JointType.WristLeft], trackedSkeleton.Joints[JointType.HipLeft]); leftHipAngle = JointAngle(trackedSkeleton.Joints[JointType.HipLeft], trackedSkeleton.Joints[JointType.ShoulderLeft], trackedSkeleton.Joints[JointType.KneeLeft]); leftKneeAngle = JointAngle(trackedSkeleton.Joints[JointType.KneeLeft], trackedSkeleton.Joints[JointType.FootLeft], trackedSkeleton.Joints[JointType.HipLeft]); headHeight = trackedSkeleton.Joints[JointType.Head].Position.Y; //frontal view headX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.Head].Position, ColorImageFormat.RgbResolution640x480Fps30).X; headY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.Head].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; leftHandX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HandLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).X; leftHandY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HandLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; rightHandX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HandRight].Position, ColorImageFormat.RgbResolution640x480Fps30).X; rightHandY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HandRight].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; leftshoulderX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.ShoulderLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).X; leftshoulderY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.ShoulderLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; rightshoulderX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.ShoulderRight].Position, ColorImageFormat.RgbResolution640x480Fps30).X; rightshoulderY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.ShoulderRight].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; hipX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HipCenter].Position, ColorImageFormat.RgbResolution640x480Fps30).X; hipY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.HipCenter].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; leftKneeX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.KneeLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).X; leftKneeY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.KneeLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; rightKneeX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.KneeRight].Position, ColorImageFormat.RgbResolution640x480Fps30).X; rightKneeY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.KneeRight].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; leftFootX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.FootLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).X; leftFootY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.FootLeft].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; rightFootX = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.FootRight].Position, ColorImageFormat.RgbResolution640x480Fps30).X; rightFootY = replayCoordinateMapper.MapSkeletonPointToColorPoint(trackedSkeleton.Joints[JointType.FootRight].Position, ColorImageFormat.RgbResolution640x480Fps30).Y; //side view 22/03/2013 headYabs = trackedSkeleton.Joints[JointType.Head].Position.Y; headZabs = trackedSkeleton.Joints[JointType.Head].Position.Z; leftHandYabs = trackedSkeleton.Joints[JointType.HandLeft].Position.Y; leftHandZabs = trackedSkeleton.Joints[JointType.HandLeft].Position.Z; leftshoulderYabs = trackedSkeleton.Joints[JointType.ShoulderLeft].Position.Y; leftshoulderZabs = trackedSkeleton.Joints[JointType.ShoulderLeft].Position.Z; hipYabs = trackedSkeleton.Joints[JointType.HipCenter].Position.Y; hipZabs = trackedSkeleton.Joints[JointType.HipCenter].Position.Z; leftKneeYabs = trackedSkeleton.Joints[JointType.KneeLeft].Position.Y; leftKneeZabs = trackedSkeleton.Joints[JointType.KneeLeft].Position.Z; leftFootYabs = trackedSkeleton.Joints[JointType.FootLeft].Position.Y; leftFootZabs = trackedSkeleton.Joints[JointType.FootLeft].Position.Z; } currentFrameNumber = framenumber - initialFrameNumber + 1; //System.Console.WriteLine("framenumber = " + framenumber); //System.Console.WriteLine("initialFrameNumber = " + initialFrameNumber); //System.Console.WriteLine("currentFrameNumber = " + currentFrameNumber); Framedata currentframe = new Framedata(currentFrameNumber, leftHipAngle, leftShoulderAngle, leftKneeAngle, headHeight, headX, headY, leftHandX, leftHandY, rightHandX, rightHandY, leftshoulderX, leftshoulderY, rightshoulderX, rightshoulderY, hipX, hipY, leftKneeX, leftKneeY, rightKneeX, rightKneeY, leftFootX, leftFootY, rightFootX, rightFootY, headYabs, headZabs, leftHandYabs, leftHandZabs, leftshoulderYabs, leftshoulderZabs, hipYabs, hipZabs, leftKneeYabs, leftKneeZabs, leftFootYabs, leftFootZabs); jointsdata.Add(currentframe); }