void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.legacy_MultiTracker))
            {
                LogError("owner is not initialized. Add Action \"newlegacy_MultiTracker\".");
                return;
            }
            OpenCVForUnity.TrackingModule.legacy_MultiTracker wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.legacy_MultiTracker, OpenCVForUnity.TrackingModule.legacy_MultiTracker>(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 (!(boundingBox.Value is OpenCVForUnityPlayMakerActions.MatOfRect2d))
            {
                LogError("boundingBox is not initialized. Add Action \"newMatOfRect2d\".");
                return;
            }
            OpenCVForUnity.CoreModule.MatOfRect2d wrapped_boundingBox = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfRect2d, OpenCVForUnity.CoreModule.MatOfRect2d>(boundingBox);

            storeResult.Value = wrapped_owner.update(wrapped_image, wrapped_boundingBox);

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.legacy_MultiTracker))
            {
                LogError("owner is not initialized. Add Action \"newlegacy_MultiTracker\".");
                return;
            }
            OpenCVForUnity.TrackingModule.legacy_MultiTracker wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.legacy_MultiTracker, OpenCVForUnity.TrackingModule.legacy_MultiTracker>(owner);

            if (!(newTracker.Value is OpenCVForUnityPlayMakerActions.legacy_Tracker))
            {
                LogError("newTracker is not initialized. Add Action \"newlegacy_Tracker\".");
                return;
            }
            OpenCVForUnity.TrackingModule.legacy_Tracker wrapped_newTracker = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.legacy_Tracker, OpenCVForUnity.TrackingModule.legacy_Tracker>(newTracker);

            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);

            storeResult.Value = wrapped_owner.add(wrapped_newTracker, wrapped_image, new OpenCVForUnity.CoreModule.Rect2d((double)boundingBox_x.Value, (double)boundingBox_y.Value, (double)boundingBox_width.Value, (double)boundingBox_height.Value));

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

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.MatOfRect2d))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.MatOfRect2d();
            }
            ((OpenCVForUnityPlayMakerActions.MatOfRect2d)storeResult.Value).wrappedObject = wrapped_owner.getObjects();
        }
 public legacy_MultiTracker(OpenCVForUnity.TrackingModule.legacy_MultiTracker nativeObj) : base(nativeObj)
 {
 }