Beispiel #1
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2))
            {
                LogError("owner is not initialized. Add Action \"newBackgroundSubtractorMOG2\".");
                return;
            }
            OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2 wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2, OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2>(owner);

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

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

            wrapped_owner.apply(wrapped_image, wrapped_fgmask);
        }
Beispiel #2
0
        //
        // C++:  Ptr_BackgroundSubtractorMOG2 cv::createBackgroundSubtractorMOG2(int history = 500, double varThreshold = 16, bool detectShadows = true)
        //

        //javadoc: createBackgroundSubtractorMOG2(history, varThreshold, detectShadows)
        public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold, bool detectShadows)
        {
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(video_Video_createBackgroundSubtractorMOG2_10(history, varThreshold, detectShadows));

            return(retVal);
#else
            return(null);
#endif
        }
Beispiel #3
0
        //javadoc: createBackgroundSubtractorMOG2()
        public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2()
        {
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(video_Video_createBackgroundSubtractorMOG2_13());

            return(retVal);
#else
            return(null);
#endif
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2))
            {
                LogError("owner is not initialized. Add Action \"newBackgroundSubtractorMOG2\".");
                return;
            }
            OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2 wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2, OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2>(owner);

            storeResult.Value = wrapped_owner.getNMixtures();
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2))
            {
                LogError("owner is not initialized. Add Action \"newBackgroundSubtractorMOG2\".");
                return;
            }
            OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2 wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2, OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2>(owner);

            wrapped_owner.setDetectShadows(detectShadows.Value);
        }
Beispiel #6
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2))
            {
                LogError("owner is not initialized. Add Action \"newBackgroundSubtractorMOG2\".");
                return;
            }
            OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2 wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2, OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2>(owner);

            wrapped_owner.setComplexityReductionThreshold((float)ct.Value);
        }
Beispiel #7
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2))
            {
                LogError("owner is not initialized. Add Action \"newBackgroundSubtractorMOG2\".");
                return;
            }
            OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2 wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2, OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2>(owner);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Double))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.Double();
            }
            ((OpenCVForUnityPlayMakerActions.Double)storeResult.Value).wrappedObject = wrapped_owner.getComplexityReductionThreshold();
        }
Beispiel #8
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2))
            {
                LogError("owner is not initialized. Add Action \"newBackgroundSubtractorMOG2\".");
                return;
            }
            OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2 wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.BackgroundSubtractorMOG2, OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2>(owner);

            if (!(varInit.Value is OpenCVForUnityPlayMakerActions.Double))
            {
                LogError("varInit is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_varInit = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(varInit);

            wrapped_owner.setVarInit(wrapped_varInit);
        }
 public BackgroundSubtractorMOG2(OpenCVForUnity.VideoModule.BackgroundSubtractorMOG2 nativeObj) : base(nativeObj)
 {
 }