void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.OCRHMMDecoder))
            {
                LogError("owner is not initialized. Add Action \"newOCRHMMDecoder\".");
                return;
            }
            OpenCVForUnity.TextModule.OCRHMMDecoder wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.OCRHMMDecoder, OpenCVForUnity.TextModule.OCRHMMDecoder>(owner);

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

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

            storeResult.Value = wrapped_owner.run(wrapped_image, wrapped_mask, min_confidence.Value);
        }
Ejemplo n.º 2
0
        //
        // C++: static Ptr_OCRHMMDecoder cv::text::OCRHMMDecoder::create(Ptr_OCRHMMDecoder_ClassifierCallback classifier, String vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table, int mode = OCR_DECODER_VITERBI)
        //

        // Unknown type 'Ptr_OCRHMMDecoder_ClassifierCallback' (I), skipping the function


        //
        // C++: static Ptr_OCRHMMDecoder cv::text::OCRHMMDecoder::create(String filename, String vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table, int mode = OCR_DECODER_VITERBI, int classifier = OCR_KNN_CLASSIFIER)
        //

        /**
         * Creates an instance of the OCRHMMDecoder class. Loads and initializes HMMDecoder from the specified path
         *
         *
         * param filename automatically generated
         * param vocabulary automatically generated
         * param transition_probabilities_table automatically generated
         * param emission_probabilities_table automatically generated
         * param mode automatically generated
         * param classifier automatically generated
         * return automatically generated
         */
        public static OCRHMMDecoder create(string filename, string vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table, int mode, int classifier)
        {
            if (transition_probabilities_table != null)
            {
                transition_probabilities_table.ThrowIfDisposed();
            }
            if (emission_probabilities_table != null)
            {
                emission_probabilities_table.ThrowIfDisposed();
            }

            return(OCRHMMDecoder.__fromPtr__(text_OCRHMMDecoder_create_10(filename, vocabulary, transition_probabilities_table.nativeObj, emission_probabilities_table.nativeObj, mode, classifier)));
        }
Ejemplo n.º 3
0
        //javadoc: OCRHMMDecoder::create(filename, vocabulary, transition_probabilities_table, emission_probabilities_table, mode)
        public static OCRHMMDecoder create(string filename, string vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table, int mode)
        {
            if (transition_probabilities_table != null)
            {
                transition_probabilities_table.ThrowIfDisposed();
            }
            if (emission_probabilities_table != null)
            {
                emission_probabilities_table.ThrowIfDisposed();
            }
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            OCRHMMDecoder retVal = OCRHMMDecoder.__fromPtr__(text_OCRHMMDecoder_create_11(filename, vocabulary, transition_probabilities_table.nativeObj, emission_probabilities_table.nativeObj, mode));

            return(retVal);
#else
            return(null);
#endif
        }
Ejemplo n.º 4
0
 public OCRHMMDecoder(OpenCVForUnity.TextModule.OCRHMMDecoder nativeObj) : base(nativeObj)
 {
 }