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);
239 unsigned int framePyramidLayers_ = (
unsigned int)(-1);
261 inline Scalar cameraPrecision()
const;
290 virtual bool setTrackingFrameRange(
const unsigned int lowerFrameIndex,
const unsigned int upperFrameIndex,
const unsigned int startFrameIndex = (
unsigned int)(-1));
345 unsigned int lowerFrameIndex_ = (
unsigned int)(-1);
348 unsigned int startFrameIndex_ = (
unsigned int)(-1);
351 unsigned int upperFrameIndex_ = (
unsigned int)(-1);
360 bool optimizeCamera_ =
true;
363 bool succeeded_ =
true;
This class implements a frame pyramid.
Definition FramePyramid.h:37
This class implements Ocean's image class.
Definition Frame.h:1808
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
This class implements the base class for all components of a frame tracker.
Definition FrameTracker.h:196
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
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.
This class implements the base class for all components of a frame tracker.
Definition FrameTracker.h:55
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
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
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.
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 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).
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.
This class is the base class for all offline tracker objects.
Definition OfflineTracker.h:45
This class implements the base class for all tracker events.
Definition TrackerEvent.h:51
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
The namespace covering the entire Ocean framework.
Definition Accessor.h:15