예제 #1
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.QRCodeDetector))
            {
                LogError("owner is not initialized. Add Action \"newQRCodeDetector\".");
                return;
            }
            OpenCVForUnity.ObjdetectModule.QRCodeDetector wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.QRCodeDetector, OpenCVForUnity.ObjdetectModule.QRCodeDetector>(owner);

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

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

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

            storeResult.Value = wrapped_owner.decode(wrapped_img, wrapped_points, wrapped_straight_qrcode);
        }
예제 #2
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.QRCodeDetector))
            {
                LogError("owner is not initialized. Add Action \"newQRCodeDetector\".");
                return;
            }
            OpenCVForUnity.ObjdetectModule.QRCodeDetector wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.QRCodeDetector, OpenCVForUnity.ObjdetectModule.QRCodeDetector>(owner);

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

            string[]      string_decoded_info  = decoded_info.stringValues;
            List <string> wrapped_decoded_info = new List <string>(string_decoded_info);

            storeResult.Value = wrapped_owner.detectAndDecodeMulti(wrapped_img, wrapped_decoded_info);

            for (int i = 0; i < wrapped_decoded_info.Count; i++)
            {
                decoded_info.Set(i, (string)wrapped_decoded_info[i]);
            }
            decoded_info.SaveChanges();

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

            wrapped_owner.setEpsX((float)epsX.Value);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.QRCodeDetector))
            {
                LogError("owner is not initialized. Add Action \"newQRCodeDetector\".");
                return;
            }
            OpenCVForUnity.ObjdetectModule.QRCodeDetector wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.QRCodeDetector, OpenCVForUnity.ObjdetectModule.QRCodeDetector>(owner);

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

            storeResult.Value = wrapped_owner.detectAndDecodeCurved(wrapped_img);
        }
예제 #5
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.QRCodeDetector))
            {
                LogError("owner is not initialized. Add Action \"newQRCodeDetector\".");
                return;
            }
            OpenCVForUnity.ObjdetectModule.QRCodeDetector wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.QRCodeDetector, OpenCVForUnity.ObjdetectModule.QRCodeDetector>(owner);

            if (!(epsX.Value is OpenCVForUnityPlayMakerActions.Double))
            {
                LogError("epsX is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_epsX = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(epsX);

            wrapped_owner.setEpsX(wrapped_epsX);
        }
 public QRCodeDetector(OpenCVForUnity.ObjdetectModule.QRCodeDetector nativeObj) : base(nativeObj)
 {
 }