15#include <opencv2/opencv.hpp>
17#include "types/fptypes.hpp"
18#include "vision/features.hpp"
38 inline bool empty() const noexcept {
return uvs_.empty(); }
45 inline size_t size() const noexcept
60 assert(invalid.size() ==
uvs_.size());
67 while (i <
uvs_.size())
92 void removeTail(
const fp& timestamp,
const bool& remove_equal =
true)
100 while (i <
uvs_.size())
135using Tracks = std::unordered_map<uint, Track>;
(Cache friendly) Track struct. Define a feature (labeled via a feature id) detected/tracked at differ...
Definition track.hpp:30
void removeInvalid(std::vector< bool > &invalid)
Remove invalid features coordinates, normalized feature coordinates and ids given a vector of boolean...
Definition track.hpp:58
bool empty() const noexcept
Check if there valid coordinates in uvs_.
Definition track.hpp:38
void removeTail(const fp ×tamp, const bool &remove_equal=true)
Remove the tail of the track. this method removes coordinates and timestamps that are older or equal ...
Definition track.hpp:92
FeaturesCoordinates uvs_
(u, v) coordinates of the same feature at different time steps
Definition track.hpp:130
size_t size() const noexcept
Return the amount of features (size of uvs_)
Definition track.hpp:45
friend bool operator<(const Track &lhs, const Track &rhs)
Comparison operator with other tracks for sorting based on track length.
Definition track.hpp:128
FeaturesCoordinates normalized_uvs_
Normalized (u, v) coordinates of the same feature at different time steps.
Definition track.hpp:131
Times timestamps_
Timestamps of the camera measurement containing the feature.
Definition track.hpp:132
std::vector< fp > Times
vector of timestamps
Definition track.hpp:31