Ejemplo n.º 1
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.BackgroundSubtractor))
            {
                LogError("owner is not initialized. Add Action \"newBackgroundSubtractor\".");
                return;
            }
            OpenCVForUnity.VideoModule.BackgroundSubtractor wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.BackgroundSubtractor, OpenCVForUnity.VideoModule.BackgroundSubtractor>(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);
        }
 public BackgroundSubtractor(OpenCVForUnity.VideoModule.BackgroundSubtractor nativeObj) : base(nativeObj)
 {
 }