Ejemplo n.º 1
0
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);

            if (!(adjust_threshold.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                LogError("adjust_threshold is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_adjust_threshold = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Double, System.Double> (adjust_threshold);


            List <UnityEngine.Rect> wrapped_storeResult = wrapped_owner.Detect(wrapped_adjust_threshold);

            if (!storeResult.IsNone)
            {
                if (storeResult.Length != wrapped_storeResult.Count)
                {
                    storeResult.Resize(wrapped_storeResult.Count);
                }
                for (int i = 0; i < wrapped_storeResult.Count; i++)
                {
                    storeResult.Set(i, wrapped_storeResult[i]);
                }
            }
        }
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);



            List <UnityEngine.Vector2> wrapped_storeResult = wrapped_owner.DetectLandmark((float)left.Value, (float)right.Value, (float)width.Value, (float)height.Value);

            if (!storeResult.IsNone)
            {
                if (storeResult.Length != wrapped_storeResult.Count)
                {
                    storeResult.Resize(wrapped_storeResult.Count);
                }
                for (int i = 0; i < wrapped_storeResult.Count; i++)
                {
                    storeResult.Set(i, wrapped_storeResult[i]);
                }
            }
        }
Ejemplo n.º 3
0
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);

            if (!(adjust_threshold.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                LogError("adjust_threshold is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_adjust_threshold = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Double, System.Double> (adjust_threshold);


            if (!storeResult.IsNone)
            {
                if (!(storeResult.Value is DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray))
                {
                    storeResult.Value = new DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray();
                }
                ((DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray)storeResult.Value).wrappedObject = wrapped_owner.DetectArray(wrapped_adjust_threshold);
            }
        }
Ejemplo n.º 4
0
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);



            double[] casted_storeResult = wrapped_owner.DetectArray((float)adjust_threshold.Value);

            if (!storeResult.IsNone)
            {
                if (storeResult.Length != casted_storeResult.Length)
                {
                    storeResult.Resize(casted_storeResult.Length);
                }
                for (int i = 0; i < casted_storeResult.Length; i++)
                {
                    storeResult.Set(i, (float)casted_storeResult[i]);
                }
                storeResult.SaveChanges();
            }
        }
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);

            wrapped_owner.SetImage(texture2D.Value as Texture2D);
        }
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);

            storeResult.Value = (int)wrapped_owner.GetShapePredictorNumFeatures();
        }
Ejemplo n.º 7
0
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);

            wrapped_owner.DrawDetectResult(texture2D.Value as Texture2D, r.Value, g.Value, b.Value, a.Value, thickness.Value);
        }
Ejemplo n.º 8
0
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);

            storeResult.Value = wrapped_owner.IsAllPartsInRect();

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);

            if (!(left.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                LogError("left is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_left = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Double, System.Double> (left);
            if (!(right.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                LogError("right is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_right = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Double, System.Double> (right);
            if (!(width.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                LogError("width is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_width = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Double, System.Double> (width);
            if (!(height.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                LogError("height is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_height = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Double, System.Double> (height);


            List <UnityEngine.Vector2> wrapped_storeResult = wrapped_owner.DetectLandmark(wrapped_left, wrapped_right, wrapped_width, wrapped_height);

            if (!storeResult.IsNone)
            {
                if (storeResult.Length != wrapped_storeResult.Count)
                {
                    storeResult.Resize(wrapped_storeResult.Count);
                }
                for (int i = 0; i < wrapped_storeResult.Count; i++)
                {
                    storeResult.Set(i, wrapped_storeResult[i]);
                }
            }
        }
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);

            if (!(storeResult.Value is DlibFaceLandmarkDetectorPlayMakerActions.Long))
            {
                storeResult.Value = new DlibFaceLandmarkDetectorPlayMakerActions.Long();
            }
            ((DlibFaceLandmarkDetectorPlayMakerActions.Long)storeResult.Value).wrappedObject = wrapped_owner.GetShapePredictorNumParts();
        }
Ejemplo n.º 11
0
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);

            double[] casted_storeResult = wrapped_owner.DetectArray();

            if (!storeResult.IsNone)
            {
                casted_storeResult.CopyTo(storeResult.floatValues, 0);
            }
        }
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);



            if (!(storeResult.Value is DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray))
            {
                storeResult.Value = new DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray();
            }
            ((DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray)storeResult.Value).wrappedObject = wrapped_owner.DetectLandmarkArray(rect.Value);
        }
Ejemplo n.º 13
0
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);


            List <DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection> wrapped_storeResult = wrapped_owner.DetectRectDetection();

            if (!storeResult.IsNone)
            {
                DlibFaceLandmarkDetectorPlayMakerActionsUtils.ConvertListToFsmArray <DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection, DlibFaceLandmarkDetectorPlayMakerActions.RectDetection> (wrapped_storeResult, storeResult);
            }
        }
Ejemplo n.º 14
0
        void DoProcess()
        {
            if (!(faceLandmarkDetector.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("faceLandmarkDetector is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_faceLandmarkDetector = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (faceLandmarkDetector);

            if (!(imgMat.Value is OpenCVForUnityPlayMakerActions.Mat))
            {
                LogError("imgMat is not initialized. Add Action \"newMat\".");
                return;
            }
            OpenCVForUnity.CoreModule.Mat wrapped_imgMat = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat> (imgMat);


            OpenCVForUnityUtils.SetImage(wrapped_faceLandmarkDetector, wrapped_imgMat);
        }
Ejemplo n.º 15
0
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector))
            {
                LogError("owner is not initialized. Add Action \"newFaceLandmarkDetector\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.FaceLandmarkDetector, DlibFaceLandmarkDetector.FaceLandmarkDetector> (owner);

            if (!(left.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                LogError("left is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_left = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Double, System.Double> (left);
            if (!(right.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                LogError("right is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_right = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Double, System.Double> (right);
            if (!(width.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                LogError("width is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_width = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Double, System.Double> (width);
            if (!(height.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                LogError("height is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_height = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Double, System.Double> (height);



            if (!(storeResult.Value is DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray))
            {
                storeResult.Value = new DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray();
            }
            ((DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray)storeResult.Value).wrappedObject = wrapped_owner.DetectLandmarkArray(wrapped_left, wrapped_right, wrapped_width, wrapped_height);
        }
 public FaceLandmarkDetector(DlibFaceLandmarkDetector.FaceLandmarkDetector nativeObj)
     : base(nativeObj)
 {
 }