Пример #1
0
 public static void Deserialize(out MoCapFacialExpressionCalibration calibration)
 {
     using (var stream = File.Open("Face.calib", FileMode.Open))
     {
         var xml = new XmlSerializer(typeof(MoCapFacialExpressionCalibration));
         calibration = (MoCapFacialExpressionCalibration)xml.Deserialize(stream);
     }
 }
Пример #2
0
 public static void Serialize(ref MoCapFacialExpressionCalibration calibration)
 {
     using (var stream = File.Open("Face.calib", FileMode.Create))
     {
         var xml = new XmlSerializer(typeof(MoCapFacialExpressionCalibration));
         xml.Serialize(stream, calibration);
     }
 }
 public static void Serialize(ref MoCapFacialExpressionCalibration calibration)
 {
     using (var stream = File.Open("Face.calib", FileMode.Create))
     {
         var xml = new XmlSerializer(typeof (MoCapFacialExpressionCalibration));
         xml.Serialize(stream, calibration);
     }
 }
 public static void Deserialize(out MoCapFacialExpressionCalibration calibration)
 {
     using (var stream = File.Open("Face.calib", FileMode.Open))
     {
         var xml = new XmlSerializer(typeof (MoCapFacialExpressionCalibration));
         calibration = (MoCapFacialExpressionCalibration) xml.Deserialize(stream);
     }
 }
        static MoCapFacialExpressionCalibration()
        {
            Default = new MoCapFacialExpressionCalibration
            {
                Calibration = new MoCapFacialExpressionCalibrationUnit[(int) MoCapKinectFacialExpression.Count]
            };

            foreach (MoCapKinectFacialExpression expression in Enum.GetValues(typeof (MoCapKinectFacialExpression)))
                if (MoCapFacialExpressionMapper.IsValidKinectFacialExpression(expression))
                    Default.Calibration[(int) expression] = new MoCapFacialExpressionCalibrationUnit(-1.00f, 1.00f);

            Deserialize(out Optimized);
        }
Пример #6
0
        static MoCapFacialExpressionCalibration()
        {
            Default = new MoCapFacialExpressionCalibration
            {
                Calibration = new MoCapFacialExpressionCalibrationUnit[(int)MoCapKinectFacialExpression.Count]
            };

            foreach (MoCapKinectFacialExpression expression in Enum.GetValues(typeof(MoCapKinectFacialExpression)))
            {
                if (MoCapFacialExpressionMapper.IsValidKinectFacialExpression(expression))
                {
                    Default.Calibration[(int)expression] = new MoCapFacialExpressionCalibrationUnit(-1.00f, 1.00f);
                }
            }

            Deserialize(out Optimized);
        }