/// <summary> /// This will return an aligned faceframe from the orignal by using DistanceSigniture method /// </summary> /// <returns></returns> public getDsitanceToNoseTipInOneFrame ExtractToFaceFrameSignature() { getDsitanceToNoseTipInOneFrame dc = new getDsitanceToNoseTipInOneFrame(); foreach (int m in Enum.GetValues(typeof(FeaturePoints))) { dc.Distances.Add(EuclideanDistance(Frame[m], Frame[18])); } return(dc); }
/// <summary> /// Method to extract the total distance move for points to the nose tip in a footage /// </summary> public getDsitanceToNoseTipInOneFrame averageDistance() { List <getDsitanceToNoseTipInOneFrame> oneFootage = new List <getDsitanceToNoseTipInOneFrame>(); oneFootage.Add(new getDsitanceToNoseTipInOneFrame()); //add new footage in all for (int i = 0; i < DepthFootage.Count; i++) //number of frames { oneFootage.Add(DepthFootage[i].ExtractToFaceFrameSignature()); } getDsitanceToNoseTipInOneFrame temp = new getDsitanceToNoseTipInOneFrame(); double res = 0; for (int i = 0; i < 28; i++) { for (int k = 1; k < oneFootage.Count - 1; k++) { res = Math.Abs(oneFootage[k + 1].Distances[i] - oneFootage[k].Distances[i]); res += res; } temp.Distances.Add(res * 1000); } return(temp); }