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

            if (!(rowRange.Value is OpenCVForUnityPlayMakerActions.Range))
            {
                LogError("rowRange is not initialized. Add Action \"newRange\".");
                return;
            }
            OpenCVForUnity.CoreModule.Range wrapped_rowRange = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Range, OpenCVForUnity.CoreModule.Range>(rowRange);

            if (!(colRange.Value is OpenCVForUnityPlayMakerActions.Range))
            {
                LogError("colRange is not initialized. Add Action \"newRange\".");
                return;
            }
            OpenCVForUnity.CoreModule.Range wrapped_colRange = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Range, OpenCVForUnity.CoreModule.Range>(colRange);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Mat))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.Mat();
            }
            ((OpenCVForUnityPlayMakerActions.Mat)storeResult.Value).wrappedObject = wrapped_owner.submat(wrapped_rowRange, wrapped_colRange);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Range))
            {
                LogError("owner is not initialized. Add Action \"newRange\".");
                return;
            }
            OpenCVForUnity.CoreModule.Range wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Range, OpenCVForUnity.CoreModule.Range>(owner);

            storeResult.Value = wrapped_owner.size();
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Range))
            {
                LogError("owner is not initialized. Add Action \"newRange\".");
                return;
            }
            OpenCVForUnity.CoreModule.Range wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Range, OpenCVForUnity.CoreModule.Range>(owner);

            storeResult.Value = wrapped_owner.Equals(new OpenCVForUnity.CoreModule.Range((int)a_start.Value, (int)a_end.Value));

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
Exemple #4
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Range))
            {
                LogError("owner is not initialized. Add Action \"newRange\".");
                return;
            }
            OpenCVForUnity.CoreModule.Range wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Range, OpenCVForUnity.CoreModule.Range>(owner);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Range))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.Range();
            }
            ((OpenCVForUnityPlayMakerActions.Range)storeResult.Value).wrappedObject = wrapped_owner.intersection(new OpenCVForUnity.CoreModule.Range((int)r1_start.Value, (int)r1_end.Value));
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Range))
            {
                LogError("owner is not initialized. Add Action \"newRange\".");
                return;
            }
            OpenCVForUnity.CoreModule.Range wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Range, OpenCVForUnity.CoreModule.Range>(owner);

            if (!(vals.Value is OpenCVForUnityPlayMakerActions.DoubleArray))
            {
                LogError("vals is not initialized. Add Action \"newDoubleArray\".");
                return;
            }
            System.Double[] wrapped_vals = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DoubleArray, System.Double[]>(vals);

            wrapped_owner.set(wrapped_vals);
        }
Exemple #6
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Mat))
            {
                LogError("owner is not initialized. Add Action \"newMat\".");
                return;
            }
            OpenCVForUnity.CoreModule.Mat wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Mat, OpenCVForUnity.CoreModule.Mat>(owner);

            OpenCVForUnity.CoreModule.Range[] wrapped_ranges = new OpenCVForUnity.CoreModule.Range[ranges.Length];
            OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToArray <OpenCVForUnityPlayMakerActions.Range, OpenCVForUnity.CoreModule.Range>(ranges, wrapped_ranges);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Mat))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.Mat();
            }
            ((OpenCVForUnityPlayMakerActions.Mat)storeResult.Value).wrappedObject = wrapped_owner.submat(wrapped_ranges);

            OpenCVForUnityPlayMakerActionsUtils.ConvertArrayToFsmArray <OpenCVForUnity.CoreModule.Range, OpenCVForUnityPlayMakerActions.Range>(wrapped_ranges, ranges);
        }
Exemple #7
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Range))
            {
                LogError("owner is not initialized. Add Action \"newRange\".");
                return;
            }
            OpenCVForUnity.CoreModule.Range wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Range, OpenCVForUnity.CoreModule.Range>(owner);

            float[]  float_vals  = vals.floatValues;
            double[] casted_vals = new double[float_vals.Length];
            float_vals.CopyTo(casted_vals, 0);

            wrapped_owner.set(casted_vals);

            for (int i = 0; i < casted_vals.Length; i++)
            {
                vals.Set(i, (float)casted_vals[i]);
            }
            vals.SaveChanges();
        }
 public Range(OpenCVForUnity.CoreModule.Range nativeObj) : base(nativeObj)
 {
 }