예제 #1
0
        /// <summary>
        /// Calls <see cref="InitializeRectification"/> and <see cref="InitializeUndistortionMaps"/> and susbcribes to
        /// <see cref="ArucoCamera.UndistortRectifyImages"/>.
        /// </summary>
        protected override void Starting()
        {
            base.Starting();

            InitializeRectification();
            InitializeUndistortionMaps();

            ArucoCamera.UndistortRectifyImages += ArucoCamera_UndistortRectifyImages;
            remapThread = new ArucoCameraSeparateThread(ArucoCamera, UndistortRectifyImages)
            {
                CopyBackImages = true
            };
            remapThread.Start();
        }
        /// <summary>
        /// Calls <see cref="InitializeRectification"/> and <see cref="InitializeUndistortionMaps"/> and susbcribes to
        /// <see cref="ArucoCamera.UndistortRectifyImages"/>.
        /// </summary>
        protected override void Starting()
        {
            base.Starting();

            InitializeRectification();
            InitializeUndistortionMaps();

            ArucoCamera.UndistortRectifyImages += ArucoCamera_UndistortRectifyImages;
            remapThread = new ArucoCameraSeparateThread(ArucoCamera, UndistortRectifyImages)
            {
                CopyBackImages = true
            };
            //HACK: turn off openCV undistort thread since we do it in shader
            // remapThread.Start();
        }
예제 #3
0
            /// <summary>
            /// Initializes the tracking, activates the trackers, susbcribes to the <see cref="ArucoObjectsController{T}.ArucoObjectAdded"/> and
            /// <see cref="ArucoObjectsController{T}.ArucoObjectRemoved"/> events and starts the tracking thread.
            /// </summary>
            public override void StartController()
            {
                base.StartController();

                MarkerTracker.Activate(this);
                foreach (var arucoObjectDictionary in ArucoObjects)
                {
                    foreach (var arucoObject in arucoObjectDictionary.Value)
                    {
                        ArucoObjectsController_ArucoObjectAdded(arucoObject.Value);
                    }
                }

                ArucoObjectAdded   += ArucoObjectsController_ArucoObjectAdded;
                ArucoObjectRemoved += ArucoObjectsController_ArucoObjectRemoved;

                trackingThread = new ArucoCameraSeparateThread(ArucoCamera, UpdateArucoObjects, TrackArucoObjects,
                                                               () => { StopController(); });
                trackingThread.Start();

                OnStarted();
            }
        /// <summary>
        /// Initializes the tracking, activates the trackers, susbcribes to the <see cref="ArucoObjectsController{T}.ArucoObjectAdded"/> and
        /// <see cref="ArucoObjectsController{T}.ArucoObjectRemoved"/> events and starts the tracking thread.
        /// </summary>
        protected override void Starting()
        {
            base.Starting();

            MarkerTracker.Activate(this);
            foreach (var arucoObjectDictionary in ArucoObjects)
            {
                foreach (var arucoObject in arucoObjectDictionary.Value)
                {
                    ArucoObjectsController_ArucoObjectAdded(arucoObject.Value);
                }
            }

            ArucoObjectAdded   += ArucoObjectsController_ArucoObjectAdded;
            ArucoObjectRemoved += ArucoObjectsController_ArucoObjectRemoved;

            ArucoCamera.ImagesUpdated += ArucoCamera_ImagesUpdated;
            trackingThread             = new ArucoCameraSeparateThread(ArucoCamera, TrackArucoObjects)
            {
                CopyBackImages = DrawDetectedMarkers || DrawRejectedCandidates || DrawAxes || DrawDetectedCharucoMarkers || DrawDetectedDiamonds
            };
            trackingThread.Start();
        }