8#ifndef META_OCEAN_TRACKING_OFFLINE_FRAME_TRACKER_H
9#define META_OCEAN_TRACKING_OFFLINE_FRAME_TRACKER_H
102 virtual bool onStart(
const unsigned int lowerFrameIndex,
const unsigned int initialFrameIndex,
const unsigned int upperFrameIndex);
133 virtual IterationResult onFrame(
const unsigned int previousIndex,
const unsigned int currentIndex,
const unsigned int iteration,
const unsigned int maximalIterations) = 0;
143 virtual bool onStop(
const unsigned int lowerFrameIndex,
const unsigned int initialFrameIndex,
const unsigned int upperFrameIndex);
290 virtual bool setTrackingFrameRange(
const unsigned int lowerFrameIndex,
const unsigned int upperFrameIndex,
const unsigned int startFrameIndex = (
unsigned int)(-1));
This class implements a frame pyramid.
Definition FramePyramid.h:46
This class implements Ocean's image class.
Definition Frame.h:1969
Definition of a frame type composed by the frame dimension, pixel format and pixel origin.
Definition Frame.h:30
This template class implements a smart object reference which is a specialization of an ObjectRef obj...
Definition SmartObjectRef.h:90
FramePyramidTrackerComponent(FrameTracker &tracker)
Creates a new component object.
CV::FramePyramid previousFramePyramid_
Frame pyramid that has been created in the previous component iteration.
Definition FrameTracker.h:233
~FramePyramidTrackerComponent() override
Destructor.
Definition FrameTracker.h:371
unsigned int framePyramidLayers_
Number of pyramid layers that should be created in each pyramid.
Definition FrameTracker.h:239
CV::FramePyramid currentFramePyramid_
Frame pyramid that has been created for the current component iteration.
Definition FrameTracker.h:236
bool onStartIncreasing() override
Component increasing start event function.
bool onStartDecreasing() override
Component decreasing start event function.
bool onSetupIteration(const unsigned int index) override
Iteration setup event function.
This class implements the base class for all components of a frame tracker.
Definition FrameTracker.h:155
bool onStartDecreasing() override
Component decreasing start event function.
~FrameTrackerComponent() override
Destructor.
Definition FrameTracker.h:366
Frame currentFrame_
Frame that has been created for the current component iteration.
Definition FrameTracker.h:189
Frame previousFrame_
Frame that has been created in the previous component iteration.
Definition FrameTracker.h:186
bool onSetupIteration(const unsigned int index) override
Iteration setup event function.
FrameTrackerComponent(FrameTracker &tracker)
Creates a new component object.
virtual ~TrackerComponent()
Destructs a tracker component object.
virtual IterationResult onFrame(const unsigned int previousIndex, const unsigned int currentIndex, const unsigned int iteration, const unsigned int maximalIterations)=0
Applies one component step.
IterationResult
Definition of individual results for the component iterations.
Definition FrameTracker.h:62
@ IR_SUCCEEDED
The iteration succeeded and thus the component proceeds with the next frame.
Definition FrameTracker.h:64
@ IR_FAILED
The iteration failed and thus also the component fails.
Definition FrameTracker.h:66
@ IR_FINISHED
The iteration finished and thus also the component finishes.
Definition FrameTracker.h:68
virtual bool onStartIncreasing()
Component increasing start event function.
virtual bool invoke(const TrackerEvent &startEvent, TrackerEvent &breakEvent, TrackerEvent &finishEvent, const unsigned int lowerFrameIndex, const unsigned int initialFrameIndex, const unsigned int upperFrameIndex)
Invokes the component.
virtual bool onStart(const unsigned int lowerFrameIndex, const unsigned int initialFrameIndex, const unsigned int upperFrameIndex)
Component start event function.
virtual bool onStop(const unsigned int lowerFrameIndex, const unsigned int initialFrameIndex, const unsigned int upperFrameIndex)
Component stop event function.
FrameTracker & parent_
Parent tracker object that invokes this component.
Definition FrameTracker.h:148
virtual bool onSetupIteration(const unsigned int index)
Iteration setup event function.
TrackerComponent(FrameTracker &parent)
Creates a new component object.
virtual bool onStartDecreasing()
Component decreasing start event function.
This class implements the base class for all visual offline tracker using frames to provide the track...
Definition FrameTracker.h:46
const PinholeCamera & camera() const
Returns the camera object this is applied by this tracker.
Definition FrameTracker.h:383
unsigned int upperFrameIndex_
Index of the upper frame range.
Definition FrameTracker.h:351
PinholeCamera camera_
The camera object of this tracker.
Definition FrameTracker.h:354
virtual bool setTrackingFrameRange(const unsigned int lowerFrameIndex, const unsigned int upperFrameIndex, const unsigned int startFrameIndex=(unsigned int)(-1))
Sets the frame range of this frame tracker.
bool start() override
Starts the offline tracker.
bool succeeded_
Succeeded state of the tracker.
Definition FrameTracker.h:363
virtual bool setCamera(const PinholeCamera &pinholeCamera, const Scalar cameraPrecision, const bool optimizeCamera)
Sets a camera object that will be used by this tracker.
CV::FrameProviderInterfaceRef frameProviderInterface_
Frame provider interface that allows to request the individual frames for this offline tracker.
Definition FrameTracker.h:342
Scalar cameraPrecision() const
Returns the camera precision of this tracker.
Definition FrameTracker.h:388
bool optimizeCamera_
True, if the camera needs to be optimized during the tracking process.
Definition FrameTracker.h:360
bool succeeded() const override
Returns whether the offline tracker has finished and succeeded since the last start or has not been s...
FrameTracker()=default
Creates a new offline frame tracker object.
void threadRun() override
Thread run function.
Scalar cameraPrecision_
The precision of the camera object in squared pixel errors.
Definition FrameTracker.h:357
virtual void updateCamera(const PinholeCamera &pinholeCamera)
Updates the camera of this tracker and invokes the corresponding state event(s).
unsigned int startFrameIndex_
Index of the frame at that the tracking will start, or -1 if no specific frame is specified.
Definition FrameTracker.h:348
FrameType applyFrameTrackingInitialization()
Applies the initialization of the frame tracker.
virtual bool setFrameProviderInterface(const CV::FrameProviderInterfaceRef &frameProviderInterface)
Sets the frame provider interface that allows to request the individual frames for the offline tracke...
virtual bool applyFrameTracking(const FrameType &frameType)=0
Frame tracker run function.
unsigned int lowerFrameIndex_
Index of the lower frame range.
Definition FrameTracker.h:345
OfflineTracker()
Creates a new offline tracker object.
This class implements the base class for all tracker events.
Definition TrackerEvent.h:51
ObjectRef< FrameProviderInterface > FrameProviderInterfaceRef
Definition of an object reference holding a frame provider interface.
Definition FrameProviderInterface.h:31
PinholeCameraT< Scalar > PinholeCamera
Definition of an pinhole camera object with Scalar precision.
Definition PinholeCamera.h:39
float Scalar
Definition of a scalar type.
Definition Math.h:129
SmartObjectRef< FrameTracker, OfflineTracker > FrameTrackerRef
Definition of a smart object reference holding a FrameTracker object.
Definition FrameTracker.h:39
Namespace of the Offline Tracker library.
Definition offline/Frame2FrameTracker.h:31
Namespace of the Tracker library.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15