Example #1
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.LogisticRegression))
            {
                LogError("owner is not initialized. Add Action \"newLogisticRegression\".");
                return;
            }
            OpenCVForUnity.MlModule.LogisticRegression wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.LogisticRegression, OpenCVForUnity.MlModule.LogisticRegression>(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);
        }
Example #2
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.LogisticRegression))
            {
                LogError("owner is not initialized. Add Action \"newLogisticRegression\".");
                return;
            }
            OpenCVForUnity.MlModule.LogisticRegression wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.LogisticRegression, OpenCVForUnity.MlModule.LogisticRegression>(owner);

            wrapped_owner.setTrainMethod(val.Value);
        }
Example #3
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.LogisticRegression))
            {
                LogError("owner is not initialized. Add Action \"newLogisticRegression\".");
                return;
            }
            OpenCVForUnity.MlModule.LogisticRegression wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.LogisticRegression, OpenCVForUnity.MlModule.LogisticRegression>(owner);

            storeResult.Value = (float)wrapped_owner.getLearningRate();
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.LogisticRegression))
            {
                LogError("owner is not initialized. Add Action \"newLogisticRegression\".");
                return;
            }
            OpenCVForUnity.MlModule.LogisticRegression wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.LogisticRegression, OpenCVForUnity.MlModule.LogisticRegression>(owner);

            wrapped_owner.setTermCriteria(new OpenCVForUnity.CoreModule.TermCriteria((int)val_type.Value, (int)val_maxCount.Value, (double)val_epsilon.Value));
        }
Example #5
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.LogisticRegression))
            {
                LogError("owner is not initialized. Add Action \"newLogisticRegression\".");
                return;
            }
            OpenCVForUnity.MlModule.LogisticRegression wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.LogisticRegression, OpenCVForUnity.MlModule.LogisticRegression>(owner);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.TermCriteria))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.TermCriteria();
            }
            ((OpenCVForUnityPlayMakerActions.TermCriteria)storeResult.Value).wrappedObject = wrapped_owner.getTermCriteria();
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.LogisticRegression))
            {
                LogError("owner is not initialized. Add Action \"newLogisticRegression\".");
                return;
            }
            OpenCVForUnity.MlModule.LogisticRegression wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.LogisticRegression, OpenCVForUnity.MlModule.LogisticRegression>(owner);

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

            wrapped_owner.setLearningRate(wrapped_val);
        }
Example #7
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.LogisticRegression))
            {
                LogError("owner is not initialized. Add Action \"newLogisticRegression\".");
                return;
            }
            OpenCVForUnity.MlModule.LogisticRegression wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.LogisticRegression, OpenCVForUnity.MlModule.LogisticRegression>(owner);

            if (!(val.Value is OpenCVForUnityPlayMakerActions.TermCriteria))
            {
                LogError("val is not initialized. Add Action \"newTermCriteria\".");
                return;
            }
            OpenCVForUnity.CoreModule.TermCriteria wrapped_val = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.TermCriteria, OpenCVForUnity.CoreModule.TermCriteria>(val);

            wrapped_owner.setTermCriteria(wrapped_val);
        }
 public LogisticRegression(OpenCVForUnity.MlModule.LogisticRegression nativeObj) : base(nativeObj)
 {
 }
        //
        // C++: static Ptr_LogisticRegression cv::ml::LogisticRegression::create()
        //

        /**
         * Creates empty model.
         *
         *     Creates Logistic Regression model with parameters given.
         * return automatically generated
         */
        public static LogisticRegression create()
        {
            return(LogisticRegression.__fromPtr__(ml_LogisticRegression_create_10()));
        }
 /**
  * Loads and creates a serialized LogisticRegression from a file
  *
  * Use LogisticRegression::save to serialize and store an LogisticRegression to disk.
  * Load the LogisticRegression from this file again, by calling this function with the path to the file.
  * Optionally specify the node for the file containing the classifier
  *
  * param filepath path to serialized LogisticRegression
  * return automatically generated
  */
 public static LogisticRegression load(string filepath)
 {
     return(LogisticRegression.__fromPtr__(ml_LogisticRegression_load_11(filepath)));
 }
        //
        // C++: static Ptr_LogisticRegression cv::ml::LogisticRegression::load(String filepath, String nodeName = String())
        //

        /**
         * Loads and creates a serialized LogisticRegression from a file
         *
         * Use LogisticRegression::save to serialize and store an LogisticRegression to disk.
         * Load the LogisticRegression from this file again, by calling this function with the path to the file.
         * Optionally specify the node for the file containing the classifier
         *
         * param filepath path to serialized LogisticRegression
         * param nodeName name of node containing the classifier
         * return automatically generated
         */
        public static LogisticRegression load(string filepath, string nodeName)
        {
            return(LogisticRegression.__fromPtr__(ml_LogisticRegression_load_10(filepath, nodeName)));
        }