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.setBackgroundRatio((float)ratio.Value); }
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 (!(ratio.Value is OpenCVForUnityPlayMakerActions.Double)) { LogError("ratio is not initialized. Add Action \"newDouble\"."); return; } System.Double wrapped_ratio = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(ratio); wrapped_owner.setBackgroundRatio(wrapped_ratio); }