void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.EM)) { LogError("owner is not initialized. Add Action \"newEM\"."); return; } OpenCVForUnity.MlModule.EM wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.EM, OpenCVForUnity.MlModule.EM>(owner); if (!(samples.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("samples is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_samples = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(samples); if (!(probs0.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("probs0 is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_probs0 = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(probs0); if (!(logLikelihoods.Value is OpenCVForUnityPlayMakerActions.Mat)) { LogError("logLikelihoods is not initialized. Add Action \"newMat\"."); return; } OpenCVForUnity.CoreModule.Mat wrapped_logLikelihoods = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(logLikelihoods); storeResult.Value = wrapped_owner.trainM(wrapped_samples, wrapped_probs0, wrapped_logLikelihoods); Fsm.Event(storeResult.Value ? trueEvent : falseEvent); }