コード例 #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);

            double[] casted_storeResult = wrapped_owner.DetectArray();

            if (!storeResult.IsNone)
            {
                casted_storeResult.CopyTo(storeResult.floatValues, 0);
            }
        }
コード例 #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);
            }
        }