Beispiel #1
0
 public static FaceModel FaceModelV4ToFaceModel(FaceModelV4 faceModelV4)
 {
     return(new FaceModel
     {
         FaceRect = FaceUnit.FaceModelRectV3ToFaceModelRect(faceModelV4.FaceRect),
         Feature = faceModelV4.Feature
     });
 }
Beispiel #2
0
        public static FaceModel FaceModelV2ToFaceModel(FaceModelV2 faceModelV2)
        {
            //return new FaceModel
            //{
            //    FaceRect = FaceUnit.FaceModelRectV3ToFaceModelRect(faceModelV2.FaceRect),
            //    Feature = faceModelV2.Feature,
            //    LeftEyeFacePoint = FaceUnit.ToFaceModelPoint(faceModelV2.LeftEyeFacePointInt),
            //    LeftMouthFacePoint = FaceUnit.ToFaceModelPoint(faceModelV2.LeftMouthFacePointInt),
            //    Nose = FaceUnit.ToFaceModelPoint(faceModelV2.Nose),
            //    RightEyeFacePoint = FaceUnit.ToFaceModelPoint(faceModelV2.RightEyeFacePointInt),
            //    RightMouthFacePoint = FaceUnit.ToFaceModelPoint(faceModelV2.RightMouthFacePointInt),
            //    FaceRect.fConf = faceModelV2.Conf,
            //    FaceRect.fRotAngle = faceModelV2.Angle
            //    //FaceRect =
            //    //{
            //    //    fConf = faceModelV2.Conf,
            //    //    fRotAngle = faceModelV2.Angle
            //    //}

            //    //FaceRect.fConf = faceModelV2.Conf;
            //    //FaceRect.fRotAngle = faceModelV2.Angle;
            //    //    =
            //    //{
            //    //    fConf = faceModelV2.Conf,
            //    //    fRotAngle = faceModelV2.Angle
            //    //}
            //};
            FaceModel x = new FaceModel
            {
                FaceRect           = FaceUnit.FaceModelRectV3ToFaceModelRect(faceModelV2.FaceRect),
                Feature            = faceModelV2.Feature,
                LeftEyeFacePoint   = FaceUnit.ToFaceModelPoint(faceModelV2.LeftEyeFacePointInt),
                LeftMouthFacePoint = FaceUnit.ToFaceModelPoint(faceModelV2.LeftMouthFacePointInt),
                Nose = FaceUnit.ToFaceModelPoint(faceModelV2.Nose),
                RightEyeFacePoint   = FaceUnit.ToFaceModelPoint(faceModelV2.RightEyeFacePointInt),
                RightMouthFacePoint = FaceUnit.ToFaceModelPoint(faceModelV2.RightMouthFacePointInt)
                                      //FaceRect.fConf = faceModelV2.Conf,
                                      //FaceRect.fRotAngle = faceModelV2.Angle
                                      //FaceRect =
                                      //{
                                      //    fConf = faceModelV2.Conf,
                                      //    fRotAngle = faceModelV2.Angle
                                      //}

                                      //FaceRect.fConf = faceModelV2.Conf;
                                      //FaceRect.fRotAngle = faceModelV2.Angle;
                                      //    =
                                      //{
                                      //    fConf = faceModelV2.Conf,
                                      //    fRotAngle = faceModelV2.Angle
                                      //}
            };

            x.FaceRect.fConf     = faceModelV2.Conf;
            x.FaceRect.fRotAngle = faceModelV2.Angle;
            return(x);
        }
Beispiel #3
0
 public static FaceModel FaceModelV3ToFaceModel(FaceModelV3 faceModelV3)
 {
     return(new FaceModel
     {
         FaceRect = FaceUnit.FaceModelRectV3ToFaceModelRect(faceModelV3.FaceRect),
         Feature = faceModelV3.Feature,
         LeftEyeFacePoint = FaceUnit.ToFaceModelPoint(faceModelV3.LeftEyeFacePointInt),
         LeftMouthFacePoint = FaceUnit.ToFaceModelPoint(faceModelV3.LeftMouthFacePointInt),
         Nose = FaceUnit.ToFaceModelPoint(faceModelV3.Nose),
         RightEyeFacePoint = FaceUnit.ToFaceModelPoint(faceModelV3.RightEyeFacePointInt),
         RightMouthFacePoint = FaceUnit.ToFaceModelPoint(faceModelV3.RightMouthFacePointInt)
     });
 }