void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.legacy_Tracker))
            {
                LogError("owner is not initialized. Add Action \"newlegacy_Tracker\".");
                return;
            }
            OpenCVForUnity.TrackingModule.legacy_Tracker wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.legacy_Tracker, OpenCVForUnity.TrackingModule.legacy_Tracker>(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.Rect2d))
            {
                LogError("boundingBox is not initialized. Add Action \"newRect2d\".");
                return;
            }
            OpenCVForUnity.CoreModule.Rect2d wrapped_boundingBox = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Rect2d, OpenCVForUnity.CoreModule.Rect2d>(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);
        }
Ejemplo n.º 3
0
        void DoProcess()
        {
            if (!(legacy_tracker.Value is OpenCVForUnityPlayMakerActions.legacy_Tracker))
            {
                LogError("legacy_tracker is not initialized. Add Action \"newlegacy_Tracker\".");
                return;
            }
            OpenCVForUnity.TrackingModule.legacy_Tracker wrapped_legacy_tracker = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.legacy_Tracker, OpenCVForUnity.TrackingModule.legacy_Tracker>(legacy_tracker);

            if (!(storeResult.Value is OpenCVForUnityPlayMakerActions.Tracker))
            {
                storeResult.Value = new OpenCVForUnityPlayMakerActions.Tracker();
            }
            ((OpenCVForUnityPlayMakerActions.Tracker)storeResult.Value).wrappedObject = OpenCVForUnity.TrackingModule.Tracking.legacy_upgradeTrackingAPI(wrapped_legacy_tracker);
        }
Ejemplo n.º 4
0
 public legacy_Tracker(OpenCVForUnity.TrackingModule.legacy_Tracker nativeObj) : base(nativeObj)
 {
 }