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

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

            OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(patternImages, wrapped_patternImages);

            if (!(projPix.Value is OpenCVForUnityPlayMakerActions.Point))
            {
                LogError("projPix is not initialized. Add Action \"newPoint\".");
                return;
            }
            OpenCVForUnity.CoreModule.Point wrapped_projPix = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Point, OpenCVForUnity.CoreModule.Point>(projPix);

            storeResult.Value = wrapped_owner.getProjPixel(wrapped_patternImages, x.Value, y.Value, wrapped_projPix);

            OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.Mat, OpenCVForUnityPlayMakerActions.Mat>(wrapped_patternImages, patternImages);

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
예제 #2
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.GrayCodePattern))
            {
                LogError("owner is not initialized. Add Action \"newGrayCodePattern\".");
                return;
            }
            OpenCVForUnity.Structured_lightModule.GrayCodePattern wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.GrayCodePattern, OpenCVForUnity.Structured_lightModule.GrayCodePattern>(owner);

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

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

            wrapped_owner.getImagesForShadowMasks(wrapped_blackImage, wrapped_whiteImage);
        }
예제 #3
0
        //
        // C++: static Ptr_GrayCodePattern cv::structured_light::GrayCodePattern::create(int width, int height)
        //

        //javadoc: GrayCodePattern::create(width, height)
        public static GrayCodePattern create(int width, int height)
        {
#if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            GrayCodePattern retVal = GrayCodePattern.__fromPtr__(structured_1light_GrayCodePattern_create_10(width, height));

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

            wrapped_owner.setWhiteThreshold((int)value.Value);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.GrayCodePattern))
            {
                LogError("owner is not initialized. Add Action \"newGrayCodePattern\".");
                return;
            }
            OpenCVForUnity.Structured_lightModule.GrayCodePattern wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.GrayCodePattern, OpenCVForUnity.Structured_lightModule.GrayCodePattern>(owner);

            storeResult.Value = (int)wrapped_owner.getNumberOfPatternImages();
        }
예제 #6
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.GrayCodePattern))
            {
                LogError("owner is not initialized. Add Action \"newGrayCodePattern\".");
                return;
            }
            OpenCVForUnity.Structured_lightModule.GrayCodePattern wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.GrayCodePattern, OpenCVForUnity.Structured_lightModule.GrayCodePattern>(owner);

            if (!(value.Value is OpenCVForUnityPlayMakerActions.Long))
            {
                LogError("value is not initialized. Add Action \"newLong\".");
                return;
            }
            System.Int64 wrapped_value = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Long, System.Int64>(value);

            wrapped_owner.setBlackThreshold(wrapped_value);
        }
예제 #7
0
        //
        // C++: static Ptr_GrayCodePattern cv::structured_light::GrayCodePattern::create(int width, int height)
        //

        /**
         * Constructor
         * param width automatically generated
         * param height automatically generated
         * return automatically generated
         */
        public static GrayCodePattern create(int width, int height)
        {
            return(GrayCodePattern.__fromPtr__(structured_1light_GrayCodePattern_create_10(width, height)));
        }
 public GrayCodePattern(OpenCVForUnity.Structured_lightModule.GrayCodePattern nativeObj) : base(nativeObj)
 {
 }