void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.StatModel))
            {
                LogError("owner is not initialized. Add Action \"newStatModel\".");
                return;
            }
            OpenCVForUnity.MlModule.StatModel wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.StatModel, OpenCVForUnity.MlModule.StatModel>(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 (!(results.Value is OpenCVForUnityPlayMakerActions.Mat))
            {
                LogError("results is not initialized. Add Action \"newMat\".");
                return;
            }
            OpenCVForUnity.CoreModule.Mat wrapped_results = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(results);

            storeResult.Value = wrapped_owner.predict(wrapped_samples, wrapped_results, flags.Value);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.StatModel))
            {
                LogError("owner is not initialized. Add Action \"newStatModel\".");
                return;
            }
            OpenCVForUnity.MlModule.StatModel wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.StatModel, OpenCVForUnity.MlModule.StatModel>(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 (!(responses.Value is OpenCVForUnityPlayMakerActions.Mat))
            {
                LogError("responses is not initialized. Add Action \"newMat\".");
                return;
            }
            OpenCVForUnity.CoreModule.Mat wrapped_responses = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(responses);

            storeResult.Value = wrapped_owner.train(wrapped_samples, layout.Value, wrapped_responses);

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
Exemple #3
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.StatModel))
            {
                LogError("owner is not initialized. Add Action \"newStatModel\".");
                return;
            }
            OpenCVForUnity.MlModule.StatModel wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.StatModel, OpenCVForUnity.MlModule.StatModel>(owner);

            if (!(data.Value is OpenCVForUnityPlayMakerActions.TrainData))
            {
                LogError("data is not initialized. Add Action \"newTrainData\".");
                return;
            }
            OpenCVForUnity.MlModule.TrainData wrapped_data = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.TrainData, OpenCVForUnity.MlModule.TrainData>(data);

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

            storeResult.Value = wrapped_owner.calcError(wrapped_data, test.Value, wrapped_resp);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.StatModel))
            {
                LogError("owner is not initialized. Add Action \"newStatModel\".");
                return;
            }
            OpenCVForUnity.MlModule.StatModel wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.StatModel, OpenCVForUnity.MlModule.StatModel>(owner);

            storeResult.Value = wrapped_owner.getVarCount();
        }
Exemple #5
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.StatModel))
            {
                LogError("owner is not initialized. Add Action \"newStatModel\".");
                return;
            }
            OpenCVForUnity.MlModule.StatModel wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.StatModel, OpenCVForUnity.MlModule.StatModel>(owner);

            storeResult.Value = wrapped_owner.isClassifier();

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
Exemple #6
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.StatModel))
            {
                LogError("owner is not initialized. Add Action \"newStatModel\".");
                return;
            }
            OpenCVForUnity.MlModule.StatModel wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.StatModel, OpenCVForUnity.MlModule.StatModel>(owner);

            if (!(trainData.Value is OpenCVForUnityPlayMakerActions.TrainData))
            {
                LogError("trainData is not initialized. Add Action \"newTrainData\".");
                return;
            }
            OpenCVForUnity.MlModule.TrainData wrapped_trainData = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.TrainData, OpenCVForUnity.MlModule.TrainData>(trainData);

            storeResult.Value = wrapped_owner.train(wrapped_trainData, flags.Value);

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
Exemple #7
0
 public StatModel(OpenCVForUnity.MlModule.StatModel nativeObj) : base(nativeObj)
 {
 }