示例#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);



            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();
            }
        }
示例#2
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);
            }
        }
示例#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);


            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]);
                }
            }
        }
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                owner.Value = new DlibFaceLandmarkDetectorPlayMakerActions.Double(0);
            }

            System.Double wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Double, System.Double> (owner);
            storeResult.Value = (float)wrapped_owner;
        }
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.Long))
            {
                owner.Value = new DlibFaceLandmarkDetectorPlayMakerActions.Long(0);
            }

            System.Int64 wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.Long, System.Int64> (owner);
            storeResult.Value = (int)wrapped_owner;
        }
示例#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);
        }
        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();
        }
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.DlibObject))
            {
                LogError("owner is not initialized. Add Action \"newClassName\".");
                return;
            }
            System.Object wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.DlibObject, System.Object> (owner);

            storeResult.Value = wrapped_owner.GetHashCode();
        }
示例#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);

            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();
        }
示例#14
0
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray))
            {
                owner.Value = new DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray(new System.Double[0]);
            }

            System.Double[] wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.DoubleArray, System.Double[]> (owner);

            storeResult.Resize(wrapped_owner.Length);

            for (int i = 0; i < wrapped_owner.Length; i++)
            {
                storeResult.Set(i, (float)wrapped_owner[i]);
            }
        }
示例#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);

            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);
        }
示例#17
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);
            }
        }
示例#18
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);
        }
示例#19
0
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.RectDetection))
            {
                LogError("owner is not initialized. Add Action \"newRectDetection\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.RectDetection, DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection> (owner);



            storeResult.Value = (int)wrapped_owner.weight_index;
        }
        void DoProcess()
        {
            if (!(owner.Value is DlibFaceLandmarkDetectorPlayMakerActions.RectDetection))
            {
                LogError("owner is not initialized. Add Action \"newRectDetection\".");
                return;
            }
            DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection wrapped_owner = DlibFaceLandmarkDetectorPlayMakerActionsUtils.GetWrappedObject <DlibFaceLandmarkDetectorPlayMakerActions.RectDetection, DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection> (owner);


            if (!(storeResult.Value is DlibFaceLandmarkDetectorPlayMakerActions.Double))
            {
                storeResult.Value = new DlibFaceLandmarkDetectorPlayMakerActions.Double();
            }
            ((DlibFaceLandmarkDetectorPlayMakerActions.Double)storeResult.Value).wrappedObject = wrapped_owner.detection_confidence;
        }
示例#21
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);
        }