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

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

            List <OpenCVForUnity.CoreModule.MatOfDMatch> wrapped_matches = new List <OpenCVForUnity.CoreModule.MatOfDMatch>();

            OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.MatOfDMatch, OpenCVForUnity.CoreModule.MatOfDMatch>(matches, wrapped_matches);

            List <OpenCVForUnity.CoreModule.Mat> wrapped_masks = new List <OpenCVForUnity.CoreModule.Mat>();

            OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(masks, wrapped_masks);

            wrapped_owner.knnMatch(wrapped_queryDescriptors, wrapped_matches, k.Value, wrapped_masks, compactResult.Value);

            OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.MatOfDMatch, OpenCVForUnityPlayMakerActions.MatOfDMatch>(wrapped_matches, matches);

            OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_masks, masks);
        }
Esempio n. 2
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.DescriptorMatcher))
            {
                LogError("owner is not initialized. Add Action \"newDescriptorMatcher\".");
                return;
            }
            OpenCVForUnity.Features2dModule.DescriptorMatcher wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DescriptorMatcher, OpenCVForUnity.Features2dModule.DescriptorMatcher>(owner);

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

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

            if (!(matches.Value is OpenCVForUnityPlayMakerActions.MatOfDMatch))
            {
                LogError("matches is not initialized. Add Action \"newMatOfDMatch\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfDMatch wrapped_matches = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDMatch, OpenCVForUnity.CoreModule.MatOfDMatch>(matches);

            wrapped_owner.match(wrapped_queryDescriptors, wrapped_trainDescriptors, wrapped_matches);
        }
Esempio n. 3
0
        //
        // C++: static Ptr_DescriptorMatcher cv::DescriptorMatcher::create(DescriptorMatcher_MatcherType matcherType)
        //

        //javadoc: DescriptorMatcher::create(matcherType)
        public static DescriptorMatcher create(int matcherType)
        {
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            DescriptorMatcher retVal = DescriptorMatcher.__fromPtr__(features2d_DescriptorMatcher_create_10(matcherType));

            return(retVal);
#else
            return(null);
#endif
        }
Esempio n. 4
0
        //javadoc: DescriptorMatcher::clone()
        public DescriptorMatcher clone()
        {
            ThrowIfDisposed();
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            DescriptorMatcher retVal = DescriptorMatcher.__fromPtr__(features2d_DescriptorMatcher_clone_11(nativeObj));

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

            wrapped_owner.write(fileName.Value);
        }
Esempio n. 6
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.DescriptorMatcher))
            {
                LogError("owner is not initialized. Add Action \"newDescriptorMatcher\".");
                return;
            }
            OpenCVForUnity.Features2dModule.DescriptorMatcher wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DescriptorMatcher, OpenCVForUnity.Features2dModule.DescriptorMatcher>(owner);

            storeResult.Value = wrapped_owner.isMaskSupported();

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
Esempio n. 7
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.DescriptorMatcher))
            {
                LogError("owner is not initialized. Add Action \"newDescriptorMatcher\".");
                return;
            }
            OpenCVForUnity.Features2dModule.DescriptorMatcher wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DescriptorMatcher, OpenCVForUnity.Features2dModule.DescriptorMatcher>(owner);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.DescriptorMatcher))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.DescriptorMatcher();
            }
            ((OpenCVForUnityPlayMakerActions.DescriptorMatcher)storeResult.Value).wrappedObject = wrapped_owner.clone(emptyTrainData.Value);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.DescriptorMatcher))
            {
                LogError("owner is not initialized. Add Action \"newDescriptorMatcher\".");
                return;
            }
            OpenCVForUnity.Features2dModule.DescriptorMatcher wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DescriptorMatcher, OpenCVForUnity.Features2dModule.DescriptorMatcher>(owner);

            List <OpenCVForUnity.CoreModule.Mat> wrapped_storeResult = wrapped_owner.getTrainDescriptors();

            if (!storeResult.IsNone)
            {
                OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_storeResult, storeResult);
            }
        }
Esempio n. 9
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.DescriptorMatcher))
            {
                LogError("owner is not initialized. Add Action \"newDescriptorMatcher\".");
                return;
            }
            OpenCVForUnity.Features2dModule.DescriptorMatcher wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DescriptorMatcher, OpenCVForUnity.Features2dModule.DescriptorMatcher>(owner);

            List <OpenCVForUnity.CoreModule.Mat> wrapped_descriptors = new List <OpenCVForUnity.CoreModule.Mat>();

            OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(descriptors, wrapped_descriptors);

            wrapped_owner.add(wrapped_descriptors);

            OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_descriptors, descriptors);
        }
Esempio n. 10
0
 public DescriptorMatcher(OpenCVForUnity.Features2dModule.DescriptorMatcher nativeObj) : base(nativeObj)
 {
 }
Esempio n. 11
0
        //
        // C++: static Ptr_DescriptorMatcher cv::DescriptorMatcher::create(DescriptorMatcher_MatcherType matcherType)
        //

        public static DescriptorMatcher create(int matcherType)
        {
            return(DescriptorMatcher.__fromPtr__(features2d_DescriptorMatcher_create_10(matcherType)));
        }
Esempio n. 12
0
        /**
         * Clones the matcher.
         *
         *     that is, copies both parameters and train data. If emptyTrainData is true, the method creates an
         *     object copy with the current parameters but with empty train data.
         * return automatically generated
         */
        public DescriptorMatcher clone()
        {
            ThrowIfDisposed();

            return(DescriptorMatcher.__fromPtr__(features2d_DescriptorMatcher_clone_11(nativeObj)));
        }
Esempio n. 13
0
        //
        // C++:  Ptr_DescriptorMatcher cv::DescriptorMatcher::clone(bool emptyTrainData = false)
        //

        /**
         * Clones the matcher.
         *
         *     param emptyTrainData If emptyTrainData is false, the method creates a deep copy of the object,
         *     that is, copies both parameters and train data. If emptyTrainData is true, the method creates an
         *     object copy with the current parameters but with empty train data.
         * return automatically generated
         */
        public DescriptorMatcher clone(bool emptyTrainData)
        {
            ThrowIfDisposed();

            return(DescriptorMatcher.__fromPtr__(features2d_DescriptorMatcher_clone_10(nativeObj, emptyTrainData)));
        }
Esempio n. 14
0
        //
        // C++: static Ptr_DescriptorMatcher cv::DescriptorMatcher::create(String descriptorMatcherType)
        //

        /**
         * Creates a descriptor matcher of a given type with the default parameters (using default
         *     constructor).
         *
         *     param descriptorMatcherType Descriptor matcher type. Now the following matcher types are
         *     supported:
         * <ul>
         *   <li>
         *        {code BruteForce} (it uses L2 )
         *   </li>
         *   <li>
         *        {code BruteForce-L1}
         *   </li>
         *   <li>
         *        {code BruteForce-Hamming}
         *   </li>
         *   <li>
         *        {code BruteForce-Hamming(2)}
         *   </li>
         *   <li>
         *        {code FlannBased}
         *   </li>
         * </ul>
         * return automatically generated
         */
        public static DescriptorMatcher create(string descriptorMatcherType)
        {
            return(DescriptorMatcher.__fromPtr__(features2d_DescriptorMatcher_create_11(descriptorMatcherType)));
        }