예제 #1
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Feature2D))
            {
                LogError("owner is not initialized. Add Action \"newFeature2D\".");
                return;
            }
            OpenCVForUnity.Features2dModule.Feature2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Feature2D, OpenCVForUnity.Features2dModule.Feature2D>(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 (!(keypoints.Value is OpenCVForUnityPlayMakerActions.MatOfKeyPoint))
            {
                LogError("keypoints is not initialized. Add Action \"newMatOfKeyPoint\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfKeyPoint wrapped_keypoints = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints);

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

            wrapped_owner.compute(wrapped_image, wrapped_keypoints, wrapped_descriptors);
        }
예제 #2
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Feature2D))
            {
                LogError("owner is not initialized. Add Action \"newFeature2D\".");
                return;
            }
            OpenCVForUnity.Features2dModule.Feature2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Feature2D, OpenCVForUnity.Features2dModule.Feature2D>(owner);

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

            OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(images, wrapped_images);

            List <OpenCVForUnity.CoreModule.MatOfKeyPoint> wrapped_keypoints = new List <OpenCVForUnity.CoreModule.MatOfKeyPoint>();

            OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.MatOfKeyPoint, OpenCVForUnity.CoreModule.MatOfKeyPoint>(keypoints, wrapped_keypoints);

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

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

            wrapped_owner.compute(wrapped_images, wrapped_keypoints, wrapped_descriptors);

            OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_images, images);

            OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.MatOfKeyPoint, OpenCVForUnityPlayMakerActions.MatOfKeyPoint>(wrapped_keypoints, keypoints);

            OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_descriptors, descriptors);
        }
예제 #3
0
        /**
         * param backend The detector/extractor you want to use as backend.
         *     param maxTilt The highest power index of tilt factor. 5 is used in the paper as tilt sampling range n.
         *     param minTilt The lowest power index of tilt factor. 0 is used in the paper.
         * return automatically generated
         */
        public static AffineFeature create(Feature2D backend, int maxTilt, int minTilt)
        {
            if (backend != null)
            {
                backend.ThrowIfDisposed();
            }

            return(AffineFeature.__fromPtr__(features2d_AffineFeature_create_12(backend.getNativeObjAddr(), maxTilt, minTilt)));
        }
예제 #4
0
        //
        // C++: static Ptr_AffineFeature cv::AffineFeature::create(Ptr_Feature2D backend, int maxTilt = 5, int minTilt = 0, float tiltStep = 1.4142135623730951f, float rotateStepBase = 72)
        //

        /**
         * param backend The detector/extractor you want to use as backend.
         *     param maxTilt The highest power index of tilt factor. 5 is used in the paper as tilt sampling range n.
         *     param minTilt The lowest power index of tilt factor. 0 is used in the paper.
         *     param tiltStep Tilt sampling step \(\delta_t\) in Algorithm 1 in the paper.
         *     param rotateStepBase Rotation sampling step factor b in Algorithm 1 in the paper.
         * return automatically generated
         */
        public static AffineFeature create(Feature2D backend, int maxTilt, int minTilt, float tiltStep, float rotateStepBase)
        {
            if (backend != null)
            {
                backend.ThrowIfDisposed();
            }

            return(AffineFeature.__fromPtr__(features2d_AffineFeature_create_10(backend.getNativeObjAddr(), maxTilt, minTilt, tiltStep, rotateStepBase)));
        }
예제 #5
0
        /**
         * param backend The detector/extractor you want to use as backend.
         * return automatically generated
         */
        public static AffineFeature create(Feature2D backend)
        {
            if (backend != null)
            {
                backend.ThrowIfDisposed();
            }

            return(AffineFeature.__fromPtr__(features2d_AffineFeature_create_14(backend.getNativeObjAddr())));
        }
예제 #6
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Feature2D))
            {
                LogError("owner is not initialized. Add Action \"newFeature2D\".");
                return;
            }
            OpenCVForUnity.Features2dModule.Feature2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Feature2D, OpenCVForUnity.Features2dModule.Feature2D>(owner);

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

            wrapped_owner.write(fileName.Value);
        }
        void DoProcess()
        {
            if (!(backend.Value is OpenCVForUnityPlayMakerActions.Feature2D))
            {
                LogError("backend is not initialized. Add Action \"newFeature2D\".");
                return;
            }
            OpenCVForUnity.Features2dModule.Feature2D wrapped_backend = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Feature2D, OpenCVForUnity.Features2dModule.Feature2D>(backend);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.AffineFeature))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.AffineFeature();
            }
            ((OpenCVForUnityPlayMakerActions.AffineFeature)storeResult.Value).wrappedObject = OpenCVForUnity.Features2dModule.AffineFeature.create(wrapped_backend, maxTilt.Value);
        }
 public Feature2D(OpenCVForUnity.Features2dModule.Feature2D nativeObj) : base(nativeObj)
 {
 }