This class implements an offline tracker able to detect and track a previously known 2D pattern.
More...
|
| PatternTracker () |
| Creates a new pattern tracker object.
|
|
Vector2 | patternDimension () const |
| Returns the current dimension of the tracking pattern.
|
|
bool | setPattern (const Frame &frame, const Vector2 &dimension) |
| Sets the tracking pattern that will be tracked in the video stream.
|
|
bool | setCamera (const PinholeCamera &pinholeCamera, const Scalar cameraPrecision, const bool optimizeCamera) override |
| Sets a camera object that will be used by this tracker.
|
|
bool | succeeded () const override |
| Returns whether the offline tracker has finished and succeeded since the last start or has not been started yet.
|
|
const PinholeCamera & | camera () const |
| Returns the camera object this is applied by this tracker.
|
|
Scalar | cameraPrecision () const |
| Returns the camera precision of this tracker.
|
|
bool | start () override |
| Starts the offline tracker.
|
|
virtual bool | setFrameProviderInterface (const CV::FrameProviderInterfaceRef &frameProviderInterface) |
| Sets the frame provider interface that allows to request the individual frames for the offline tracker.
|
|
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.
|
|
virtual | ~OfflineTracker () |
| Frees the offline tracker object.
|
|
virtual bool | stop (const unsigned int timeout=0u) |
| Stops the offline tracker.
|
|
unsigned int | id () const |
| Returns the unique id of this tracker object.
|
|
virtual bool | running () const |
| Returns whether the tracker has been started (and is currently tracking).
|
|
virtual bool | finished () const |
| Returns whether the offline tracker has finished since the last start or has not been started yet.
|
|
virtual OfflinePoses | poses () const |
| Returns the currently determined poses of this tracker.
|
|
virtual OfflinePose | pose (const unsigned int index) const |
| Returns one pose of this tracker.
|
|
void | addEventCallback (const EventCallback &callback) |
| Adds a state event callback function.
|
|
void | removeEventCallback (const EventCallback &callback) |
| Removes a state event callback function.
|
|
virtual Plane3 | plane () const |
| Returns the plane of this tracker.
|
|
virtual bool | objectTransformation (HomogenousMatrix4 &transformation) const |
| Determines the transformation that transforms points defined in the local coordinate of the tracked object into points defined in the world coordinate system.
|
|
|
bool | applyFrameTracking (const FrameType &frameType) override |
| Frame tracker run function.
|
|
bool | determineRoughCameraFov (const unsigned int lowerFrameIndex, const unsigned int initialFrameIndex, const unsigned int upperFrameIndex, const unsigned int cameraFovDeterminationFrames=10u) |
| Guesses the rough field of view of the camera.
|
|
bool | determineRoughPoses (const unsigned int lowerFrameIndex, const unsigned int initialFrameIndex, const unsigned int upperFrameIndex) |
| Determines the initial rough poses for the entire video stream.
|
|
bool | closeGaps (const unsigned int lowerFrameIndex, const unsigned int upperFrameIndex, const unsigned int minimalCorrespondences=50u) |
| Closes the tracking gaps (break-downs) for the provided video stream.
|
|
bool | fineAdjustment (const unsigned iterations, const unsigned int detectionBorder, const unsigned int horizontalBinSize, const unsigned int verticalBinSize, const bool optimizeCamera, const unsigned int lowerFrameIndex, const unsigned int initialFrameIndex, const unsigned int upperFrameIndex) |
| Applies a fine adjustment of the camera poses.
|
|
Scalar | projectedPatternArea (const HomogenousMatrix4 &pose, const PinholeCamera &pinholeCamera) const |
| Calculates the projection area of the defined 3D object pattern.
|
|
Triangles2 | projectedPatternTriangles (const HomogenousMatrix4 &pose, const PinholeCamera &pinholeCamera) const |
| Returns projected 2D triangles that cover the area of the 3D tracking pattern.
|
|
bool | updatePatternDimension (const Vector2 &dimension) |
| Updates the pattern dimension of this tracker and invokes the corresponding state event(s).
|
|
| FrameTracker ()=default |
| Creates a new offline frame tracker object.
|
|
| FrameTracker (const CV::FrameProviderInterfaceRef &frameProviderInterface) |
| Creates a new offline frame tracker object.
|
|
void | threadRun () override |
| Thread run function.
|
|
FrameType | applyFrameTrackingInitialization () |
| Applies the initialization of the frame tracker.
|
|
virtual void | updateCamera (const PinholeCamera &pinholeCamera) |
| Updates the camera of this tracker and invokes the corresponding state event(s).
|
|
| OfflineTracker () |
| Creates a new offline tracker object.
|
|
void | updateTrackerProgress (const Scalar localProgress) |
| Updates the tracker process progress value of this tracker.
|
|
void | updatePoses (const OfflinePoses &poses) |
| Updates all poses of this tracker and invokes the corresponding state event(s).
|
|
void | removeIrregularPoses (const Scalar factor=Scalar(5)) |
| Removes irregular poses at the boundary between valid and invalid poses.
|
|
void | extrapolatePoses (const unsigned int number, const unsigned int base) |
| Extrapolates poses at the boundary between valid and invalid poses.
|
|
| Thread (const Thread &thread)=delete |
| Disabled copy constructor.
|
|
void | createThread () |
| Creates the thread itself.
|
|
void | destroyThread () |
| Destroys the thread itself.
|
|
void | stopThreadExplicitly (const unsigned int timeout=5000u) |
| Tries to stop the thread gracefully.
|
|
Thread & | operator= (const Thread &thread)=delete |
| The disabled assign operator.
|
|
| Thread (const std::string &name=std::string()) |
| Creates a new thread object.
|
|
| Thread (const unsigned int randomNumberSeedValue, const std::string &name=std::string()) |
| Creates a new thread object.
|
|
virtual | ~Thread () |
| Destructs a thread object.
|
|
bool | startThread () |
| Starts the thread.
|
|
void | stopThread () |
| Informs the thread to stop.
|
|
bool | terminateThread () |
| Terminates the thread.
|
|
bool | joinThread (const unsigned int timeout=(unsigned int)(-1)) |
| Waits until this thread has been stopped.
|
|
bool | shouldThreadStop () const |
| Returns whether this thread should stop.
|
|
bool | isThreadInvokedToStart () const |
| Returns whether this thread has been invoked to start immediately.
|
|
bool | isThreadActive () const |
| Returns whether this thread is active.
|
|
| PlaneTracker ()=default |
| Creates a new plane tracker object.
|
|
| PlaneTracker (const Plane3 &plane) |
| Creates a new plane tracker object.
|
|
virtual void | updatePlane (const Plane3 &plane) |
| Updates the plane of this tracker and invokes the corresponding state event(s).
|
|
|
enum | TrackingQuality {
TQ_LOW
, TQ_MODERATE
, TQ_HIGH
, TQ_ULTRA
,
TQ_INSANE
, TQ_AUTOMATIC
, TQ_COARSE
, TQ_FINE
} |
| Definition of individual tracking qualities. More...
|
|
enum | AbstractMotionType { AMT_UNKNOWN
, AMT_PURE_ROTATIONAL
, AMT_COMPLEX
} |
| Definition of individual abstract camera motion types. More...
|
|
enum | CameraModel { CM_INVALID
, CM_LOW_QUALITY
, CM_MEDIUM_QUALITY
, CM_HIGH_QUALITY
} |
| Definition of individual camera models. More...
|
|
typedef Callback< void, const TrackerEvent & > | EventCallback |
| Definition of a component event callback function.
|
|
typedef std::vector< EventStackLayer > | EventStack |
| Definition of a vector holding EventStackLayer objects which actually is used to implement a stack of these objects.
|
|
typedef ConcurrentCallbacks< EventCallback > | EventCallbacks |
| Definition of a vector holding event callback functions.
|
|
typedef std::pair< pthread_t, bool > | TimedJoinPair |
| Definition of a pair holding a thread id and a boolean state.
|
|
enum | ThreadPriority {
PRIORITY_IDLE
, PRIORTY_BELOW_NORMAL
, PRIORTY_NORMAL
, PRIORTY_ABOVE_NORMAL
,
PRIORTY_HIGH
, PRIORTY_REALTIME
} |
| Definition of different thread priority values. More...
|
|
static bool | isPlausibleCamera (const PinholeCamera &pinholeCamera, const CameraModel model) |
| Checks whether the camera parameters of a given camera profiles matches to the specified camera model.
|
|
static void | extrapolateSinglePose (const OfflinePoses::Index invalidIndex, OfflinePoses &offlinePoses) |
| Interpolates the pose of a single invalid pose which is enclosed by two valid poses.
|
|
static void | extrapolateLeftPoses (const OfflinePoses::Index invalidIndex, const unsigned int number, const unsigned int base, OfflinePoses &offlinePoses) |
| Interpolates some poses to the left of a gap with invalid poses.
|
|
static void | extrapolateRightPoses (const OfflinePoses::Index invalidIndex, const unsigned int number, const unsigned int base, OfflinePoses &offlinePoses) |
| Interpolates some poses to the right of a gap with invalid poses.
|
|
static void | extrapolateCenterPoses (const OfflinePoses::Index invalidIndex, const unsigned int number, const unsigned int base, OfflinePoses &offlinePoses) |
| Interpolates some poses to the left or to the right of a gap with invalid poses.
|
|
static Lock & | idCounterLock () |
| Returns a reference to the lock for the tracker id counter.
|
|
static void | sleep (unsigned int ms) |
| Sleeps the calling thread for a given time.
|
|
static void | giveUp () |
| Gives up the remaining thread time.
|
|
static ThreadId | currentThreadId () |
| Returns the thread id of the current (calling) thread.
|
|
static ThreadPriority | threadPriority () |
| Returns the priority of the current thread.
|
|
static bool | setThreadPriority (const ThreadPriority priority) |
| Sets the priority of the current thread.
|
|
template<typename TObject , typename TExpectedValue > |
static bool | waitForValue (TObject &object, const TExpectedValue &expectedValue, const double timeout=-1.0) |
| Waits until an object/variable has an expected value.
|
|
template<typename TObject , typename TExpectedValue > |
static bool | waitForValue (TObject &object, const TExpectedValue &expectedValue, TemporaryScopedLock &temporaryScopedLock, const double timeout=-1.0) |
| Waits until an object/variable has an expected value.
|
|
static int | pthread_timedjoin_np (pthread_t thread, void **retval, const struct timespec *abstime) |
| Implements a thread join function with timeout value.
|
|
static unsigned int | idCounter_ |
| The tracker id counter.
|
|
This class implements an offline tracker able to detect and track a previously known 2D pattern.
The tracker does not provide real-time performance but creates tracking results with high accuracy.
The given video stream is passed through several times to increase the tracking quality.
- See also
- PatternTrackerRef.