8#ifndef META_OCEAN_TRACKING_HOMOGRAPHY_TRACKER_H
9#define META_OCEAN_TRACKING_HOMOGRAPHY_TRACKER_H
133 ocean_assert(size == 5 || size == 7u || size == 15u || size == 31u);
146 result.reserve(points.size());
148 for (
const Vector2& point : points)
150 result.emplace_back(transformation * point);
This class implements a frame pyramid.
Definition FramePyramid.h:46
This class implements Ocean's image class.
Definition Frame.h:1969
This class implements a generator for random numbers.
Definition RandomGenerator.h:42
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
std::vector< Vector2 > Vectors2
Definition of a vector holding Vector2 objects.
Definition Vector2.h:64
VectorT2< Scalar > Vector2
Definition of a 2D vector.
Definition Vector2.h:28
SquareMatrixT3< Scalar > SquareMatrix3
Definition of the SquareMatrix3 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with ...
Definition SquareMatrix3.h:43
float Scalar
Definition of a scalar type.
Definition Math.h:129
Namespace of the Tracker library.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15