8 #ifndef META_OCEAN_TRACKING_POINT_SIMILARITY_TRACKER_H
9 #define META_OCEAN_TRACKING_POINT_SIMILARITY_TRACKER_H
100 bool determineSimilarity(
const Frame& yFrame,
const CV::PixelBoundingBox& previousSubRegion,
SquareMatrix3* currentTprevious =
nullptr,
Vector2* translation =
nullptr,
Scalar* rotation =
nullptr,
Scalar* scale =
nullptr,
const Vector2& predictedTranslation =
Vector2(0, 0),
TrackerConfidence* trackerConfidence =
nullptr,
RegionTextureness* regionTextureness =
nullptr,
Worker* worker =
nullptr);
179 unsigned int keyFramePointsLayerIndex_ = (
unsigned int)(-1);
209 ocean_assert((
unsigned int)(trackerConfidence) < 4u);
210 ocean_assert((
unsigned int)(regionTextureness) < 4u);
212 constexpr
float confidenceValues[] =
220 return confidenceValues[(
unsigned int)(trackerConfidence)] * confidenceValues[(
unsigned int)(regionTextureness)];
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:1792
This class implements a generator for random numbers.
Definition: RandomGenerator.h:42
void toIdentity()
Sets the matrix to the identity matrix.
Definition: SquareMatrix3.h:1297
This class implements a tracker determining a similarity transformation between two successive video ...
Definition: SimilarityTracker.h:44
SimilarityTracker()=default
Creates a new tracker object.
bool determineSimilarity(const Frame &yFrame, const CV::PixelBoundingBox &previousSubRegion, SquareMatrix3 *currentTprevious=nullptr, Vector2 *translation=nullptr, Scalar *rotation=nullptr, Scalar *scale=nullptr, const Vector2 &predictedTranslation=Vector2(0, 0), TrackerConfidence *trackerConfidence=nullptr, RegionTextureness *regionTextureness=nullptr, Worker *worker=nullptr)
Determines the similarity between two successive video frame within a specified sub-region.
static bool determineFeaturePoints(const CV::FramePyramid &yFramePyramid, const CV::PixelBoundingBox &subRegion, const size_t minimalFeaturePoints, const size_t desiredFeaturePoints, const size_t maximalFeaturePoints, Vectors2 &featurePoints, unsigned int &usedLayerIndex, RegionTextureness ®ionTextureness, Worker *worker=nullptr)
Detects feature points in given frame for which a frame pyramid exists.
unsigned int keyFramePointsLayerIndex_
The frame pyramid layer index in which 'keyFramePoints_' have been determined, -1 if invalid.
Definition: SimilarityTracker.h:179
static bool determineSimilarityTransformation(const CV::FramePyramid &yPreviousFramePyramid, const CV::FramePyramid &yCurrentFramePyramid, const Vectors2 &previousPoints, const Vectors2 &roughCurrentPoints, RandomGenerator &randomGenerator, SquareMatrix3 ¤tTprevious, Indices32 &validCorrespondences, const unsigned int coarsestLayerRadius, const unsigned int subPixelIterations, Worker *worker=nullptr)
Determines the similarity transformation between two successive frames.
SquareMatrix3 previous_T_key_
The similarity since 'previousFramePyramid_' have been updated the last time, defined in the resoluti...
Definition: SimilarityTracker.h:173
RegionTextureness
Definition of individual textureness qualities.
Definition: SimilarityTracker.h:68
@ RT_MODERATE
The textureness is moderate.
Definition: SimilarityTracker.h:74
@ RT_LOW
The textureness is low (an almost homogeneous region).
Definition: SimilarityTracker.h:72
@ RT_UNKNOWN
The textureness is unknown.
Definition: SimilarityTracker.h:70
static float combinedConfidence(const TrackerConfidence trackerConfidence, const RegionTextureness regionTextureness)
Calculate an overall confidence values based on a tracker confidence and a region textureness.
Definition: SimilarityTracker.h:202
const CV::FramePyramid & keyFramePyramid() const
Returns the frame pyramid of one of the previous frames (the current key-frame).
Definition: SimilarityTracker.h:187
Vectors2 keyFramePoints_
The image points located in 'previousFramePyramid_', defined in the usage pyramid layer.
Definition: SimilarityTracker.h:176
const CV::FramePyramid & currentFramePyramid() const
Returns the frame pyramid of the most recent frame.
Definition: SimilarityTracker.h:182
TrackerConfidence
Definition of individual confidence values.
Definition: SimilarityTracker.h:51
@ TC_MODERATE
The determined similarity has a moderate quality.
Definition: SimilarityTracker.h:57
@ TC_GOOD
The determined similarity has a good quality.
Definition: SimilarityTracker.h:59
@ TC_BAD
The determined similarity may have a bad quality.
Definition: SimilarityTracker.h:55
@ TC_VERY_GOOD
The determined similarity has a very good quality and can be trusted regardless.
Definition: SimilarityTracker.h:61
@ TC_NONE
No similarity could be determined.
Definition: SimilarityTracker.h:53
CV::FramePyramid currentFramePyramid_
The frame pyramid of the current frame.
Definition: SimilarityTracker.h:167
void reset()
Resets the similarity tracker.
Definition: SimilarityTracker.h:192
RandomGenerator randomGenerator_
The random generator object.
Definition: SimilarityTracker.h:170
CV::FramePyramid keyFramePyramid_
The frame pyramid of the key frame, one of the previous frames.
Definition: SimilarityTracker.h:164
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition: Base.h:96
SquareMatrixT3< Scalar > SquareMatrix3
Definition of the SquareMatrix3 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with ...
Definition: SquareMatrix3.h:35
float Scalar
Definition of a scalar type.
Definition: Math.h:128
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:21
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15