/// <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> /// 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(); }