コード例 #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);
     }
 }
コード例 #3
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);
     }
 }
コード例 #4
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);
     }
 }
コード例 #5
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);
        }
コード例 #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);
        }