Exemplo 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);



            double[] casted_storeResult = wrapped_owner.DetectLandmarkArray(left.Value, right.Value, width.Value, height.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);



            double[] casted_storeResult = wrapped_owner.DetectLandmarkArray(rect.Value);

            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);
        }
Exemplo 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);

            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);
        }