8#ifndef META_OCEAN_TRACKING_HOMOGRAPHY_TRACKER_H
9#define META_OCEAN_TRACKING_HOMOGRAPHY_TRACKER_H
56 inline unsigned int patchSize()
const;
62 inline void setPatchSize(
const unsigned int size);
117 unsigned int patchSize_ = 31u;
121 patchSize_(patchSize)
133 ocean_assert(size == 5 || size == 7u || size == 15u || size == 31u);
146 result.reserve(points.size());
148 for (Vectors2::const_iterator i = points.begin(); i != points.end(); ++i)
150 result.emplace_back(transformation * *i);
This class implements a frame pyramid.
Definition FramePyramid.h:37
void clear()
Releases the internal frame layers.
Definition FramePyramid.h:845
This class implements Ocean's image class.
Definition Frame.h:1808
This class implements a generator for random numbers.
Definition RandomGenerator.h:42
This class implements a homography tracker able to determine a homography in real-time.
Definition HomographyTracker.h:38
unsigned int patchSize_
The size of the image patches used for tracking, possible values can be [5, 7, 15,...
Definition HomographyTracker.h:117
CV::FramePyramid previousFramePyramid_
Frame pyramid of the previous frame.
Definition HomographyTracker.h:114
bool trackPoints(const Frame ¤tFrame, const Frame &yPreviousFrame, RandomGenerator &randomGenerator, const Vectors2 &previousPositions, SquareMatrix3 &homography, Worker *worker=nullptr, const Scalar frameBorder=Scalar(10))
Tracks a group of given image points from the previous frame to the current frame and determines the ...
unsigned int patchSize() const
Returns the size of the patches which are used for tracking.
Definition HomographyTracker.h:126
static Vectors2 transformPoints(const Vectors2 &points, const SquareMatrix3 &transformation)
Transforms a given set of points to a new set using a given transformation.
Definition HomographyTracker.h:143
void clear()
Clears the previous pyramid frame of this tracking object.
Definition HomographyTracker.h:138
static bool trackPoints(const Frame &yPreviousFrame, const CV::FramePyramid &previousFramePyramid, const CV::FramePyramid ¤tFramePyramid, RandomGenerator &randomGenerator, const Vectors2 &previousPositions, SquareMatrix3 &homography, Worker *worker=nullptr, const unsigned int patchSize=31u)
Tracks a group of given image points from the previous frame to the current frame and determines the ...
HomographyTracker()=default
Creates a new homography tracker object and uses 31 as patch size.
CV::FramePyramid currentFramePyramid_
Frame pyramid of the current frame.
Definition HomographyTracker.h:111
void setPatchSize(const unsigned int size)
Sets or changes the size of the patches which are used for tracking.
Definition HomographyTracker.h:131
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
float Scalar
Definition of a scalar type.
Definition Math.h:129
std::vector< Vector2 > Vectors2
Definition of a vector holding Vector2 objects.
Definition Vector2.h:64
The namespace covering the entire Ocean framework.
Definition Accessor.h:15