Example #1
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.TextDetectorCNN))
            {
                LogError("owner is not initialized. Add Action \"newTextDetectorCNN\".");
                return;
            }
            OpenCVForUnity.TextModule.TextDetectorCNN wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.TextDetectorCNN, OpenCVForUnity.TextModule.TextDetectorCNN>(owner);

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

            if (!(Bbox.Value is OpenCVForUnityPlayMakerActions.MatOfRect))
            {
                LogError("Bbox is not initialized. Add Action \"newMatOfRect\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfRect wrapped_Bbox = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfRect, OpenCVForUnity.CoreModule.MatOfRect>(Bbox);

            if (!(confidence.Value is OpenCVForUnityPlayMakerActions.MatOfFloat))
            {
                LogError("confidence is not initialized. Add Action \"newMatOfFloat\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfFloat wrapped_confidence = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfFloat, OpenCVForUnity.CoreModule.MatOfFloat>(confidence);

            wrapped_owner.detect(wrapped_inputImage, wrapped_Bbox, wrapped_confidence);
        }
Example #2
0
        //
        // C++: static Ptr_TextDetectorCNN cv::text::TextDetectorCNN::create(String modelArchFilename, String modelWeightsFilename)
        //

        //javadoc: TextDetectorCNN::create(modelArchFilename, modelWeightsFilename)
        public static TextDetectorCNN create(string modelArchFilename, string modelWeightsFilename)
        {
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            TextDetectorCNN retVal = TextDetectorCNN.__fromPtr__(text_TextDetectorCNN_create_10(modelArchFilename, modelWeightsFilename));

            return(retVal);
#else
            return(null);
#endif
        }
Example #3
0
 public TextDetectorCNN(OpenCVForUnity.TextModule.TextDetectorCNN nativeObj) : base(nativeObj)
 {
 }
        //
        // C++: static Ptr_TextDetectorCNN cv::text::TextDetectorCNN::create(String modelArchFilename, String modelWeightsFilename)
        //

        public static TextDetectorCNN create(string modelArchFilename, string modelWeightsFilename)
        {
            return(TextDetectorCNN.__fromPtr__(text_TextDetectorCNN_create_10(modelArchFilename, modelWeightsFilename)));
        }