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

            wrapped_owner.getVotes(wrapped_samples, wrapped_results, flags.Value);
        }
Exemplo n.º 2
0
        //javadoc: RTrees::load(filepath)
        public static new RTrees load(string filepath)
        {
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            RTrees retVal = RTrees.__fromPtr__(ml_RTrees_load_11(filepath));

            return(retVal);
#else
            return(null);
#endif
        }
Exemplo n.º 3
0
        //
        // C++: static Ptr_RTrees cv::ml::RTrees::create()
        //

        //javadoc: RTrees::create()
        public static new RTrees create()
        {
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            RTrees retVal = RTrees.__fromPtr__(ml_RTrees_create_10());

            return(retVal);
#else
            return(null);
#endif
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.RTrees))
            {
                LogError("owner is not initialized. Add Action \"newRTrees\".");
                return;
            }
            OpenCVForUnity.MlModule.RTrees wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.RTrees, OpenCVForUnity.MlModule.RTrees>(owner);

            wrapped_owner.setActiveVarCount(val.Value);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.RTrees))
            {
                LogError("owner is not initialized. Add Action \"newRTrees\".");
                return;
            }
            OpenCVForUnity.MlModule.RTrees wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.RTrees, OpenCVForUnity.MlModule.RTrees>(owner);

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

            wrapped_owner.setTermCriteria(new OpenCVForUnity.CoreModule.TermCriteria((int)val_type.Value, (int)val_maxCount.Value, (double)val_epsilon.Value));
        }
Exemplo n.º 7
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.RTrees))
            {
                LogError("owner is not initialized. Add Action \"newRTrees\".");
                return;
            }
            OpenCVForUnity.MlModule.RTrees wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.RTrees, OpenCVForUnity.MlModule.RTrees>(owner);

            storeResult.Value = wrapped_owner.getCalculateVarImportance();

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
Exemplo n.º 8
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.RTrees))
            {
                LogError("owner is not initialized. Add Action \"newRTrees\".");
                return;
            }
            OpenCVForUnity.MlModule.RTrees wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.RTrees, OpenCVForUnity.MlModule.RTrees>(owner);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Mat))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.Mat();
            }
            ((OpenCVForUnityPlayMakerActions.Mat)storeResult.Value).wrappedObject = wrapped_owner.getVarImportance();
        }
Exemplo n.º 9
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.RTrees))
            {
                LogError("owner is not initialized. Add Action \"newRTrees\".");
                return;
            }
            OpenCVForUnity.MlModule.RTrees wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.RTrees, OpenCVForUnity.MlModule.RTrees>(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);
        }
Exemplo n.º 10
0
 public RTrees(OpenCVForUnity.MlModule.RTrees nativeObj) : base(nativeObj)
 {
 }
Exemplo n.º 11
0
        //
        // C++: static Ptr_RTrees cv::ml::RTrees::load(String filepath, String nodeName = String())
        //

        /**
         * Loads and creates a serialized RTree from a file
         *
         * Use RTree::save to serialize and store an RTree to disk.
         * Load the RTree 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 RTree
         * param nodeName name of node containing the classifier
         * return automatically generated
         */
        public static new RTrees load(string filepath, string nodeName)
        {
            return(RTrees.__fromPtr__(ml_RTrees_load_10(filepath, nodeName)));
        }
Exemplo n.º 12
0
        //
        // C++: static Ptr_RTrees cv::ml::RTrees::create()
        //

        /**
         * Creates the empty model.
         *     Use StatModel::train to train the model, StatModel::train to create and train the model,
         *     Algorithm::load to load the pre-trained model.
         * return automatically generated
         */
        public static new RTrees create()
        {
            return(RTrees.__fromPtr__(ml_RTrees_create_10()));
        }
Exemplo n.º 13
0
 /**
  * Loads and creates a serialized RTree from a file
  *
  * Use RTree::save to serialize and store an RTree to disk.
  * Load the RTree 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 RTree
  * return automatically generated
  */
 public static new RTrees load(string filepath)
 {
     return(RTrees.__fromPtr__(ml_RTrees_load_11(filepath)));
 }