MSCEqF
1.0
Multi State Constraint Equivariant Filter for visual inertial navigation
Toggle main menu visibility
Loading...
Searching...
No Matches
track_manager.hpp
1
// Copyright (C) 2023 Alessandro Fornasier.
2
// Control of Networked Systems, University of Klagenfurt, Austria.
3
//
4
// All rights reserved.
5
//
6
// This software is licensed under the terms of the Apache License, Version 2.0
7
// (the "License"); you may not use this file except in compliance with the
8
// License. You may obtain a copy of the License at
9
//
10
// http://www.apache.org/licenses/LICENSE-2.0
11
//
12
// Unless required by applicable law or agreed to in writing, software
13
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
// License for the specific language governing permissions and limitations
16
// under the License.
17
//
18
// You can contact the authors at <alessandro.fornasier@ieee.org>
19
20
#ifndef TRACK_MANAGER_HPP
21
#define TRACK_MANAGER_HPP
22
23
#include <opencv2/opencv.hpp>
24
#include <unordered_set>
25
26
#include "types/fptypes.hpp"
27
#include "vision/tracker.hpp"
28
29
namespace
msceqf
30
{
35
class
TrackManager
36
{
37
public
:
44
TrackManager
(
const
TrackManagerOptions
& opts,
const
Vector4& intrinsics);
45
51
void
processCamera
(
Camera
&
cam
);
52
58
void
processFeatures
(
const
TriangulatedFeatures
& features);
59
65
const
Tracks&
tracks
()
const
;
66
76
void
tracksIds
(
const
fp& timestamp, std::unordered_set<uint>& active_ids, std::unordered_set<uint>& lost_ids)
const
;
77
85
void
activeTracksIds
(
const
fp& timestamp, std::unordered_set<uint>& active_ids)
const
;
86
94
void
lostTracksIds
(
const
fp& timestamp, std::unordered_set<uint>& lost_ids)
const
;
95
103
void
removeTracksId
(
const
std::unordered_set<uint>& ids);
104
113
void
removeTracksTail
(
const
fp& timestamp,
const
bool
& remove_equal =
true
);
114
119
inline
void
clear
() { tracks_.clear(); }
120
126
const
PinholeCameraUniquePtr&
cam
()
const
;
127
128
private
:
133
void
updateTracks();
134
135
Tracker
tracker_;
136
Tracks tracks_;
137
138
size_t
max_track_length_;
139
};
140
141
}
// namespace msceqf
142
143
#endif
// TRACK_MANAGER_HPP
msceqf::TrackManager::activeTracksIds
void activeTracksIds(const fp ×tamp, std::unordered_set< uint > &active_ids) const
Get all the ids corresponding to active tracks at a given timestamp. Active tracks are defined as tra...
msceqf::TrackManager::lostTracksIds
void lostTracksIds(const fp ×tamp, std::unordered_set< uint > &lost_ids) const
Get all the ids corresponding to lost tracks at a given timestamp. Lost tracks are defined as tracks ...
msceqf::TrackManager::processCamera
void processCamera(Camera &cam)
Process a single camera measurement. Forward camera measurement to tracker, and update tracks.
msceqf::TrackManager::clear
void clear()
Clear all the tracks.
Definition
track_manager.hpp:119
msceqf::TrackManager::removeTracksTail
void removeTracksTail(const fp ×tamp, const bool &remove_equal=true)
Remove the tail of tracks. This method remove from each track all the coordinates as well as the time...
msceqf::TrackManager::processFeatures
void processFeatures(const TriangulatedFeatures &features)
Process a single features measurement. update tracks.
msceqf::TrackManager::tracksIds
void tracksIds(const fp ×tamp, std::unordered_set< uint > &active_ids, std::unordered_set< uint > &lost_ids) const
Get all the ids corresponding to active and lost tracks at a given timestamp. Active tracks are defin...
msceqf::TrackManager::TrackManager
TrackManager(const TrackManagerOptions &opts, const Vector4 &intrinsics)
TrackManager constructor.
msceqf::TrackManager::tracks
const Tracks & tracks() const
Get all the tracks.
msceqf::TrackManager::removeTracksId
void removeTracksId(const std::unordered_set< uint > &ids)
Remove all the tracks corresponding to given ids.
msceqf::TrackManager::cam
const PinholeCameraUniquePtr & cam() const
Get the camera pointer.
msceqf::Tracker
This class implement the feature tracker module based on Lucas-Kanade optical flow....
Definition
tracker.hpp:39
msceqf::Camera
Definition
sensor_data.hpp:86
msceqf::TrackManagerOptions
Definition
msceqf_options.hpp:208
msceqf::TriangulatedFeatures
Definition
sensor_data.hpp:106
include
vision
track_manager.hpp
Generated by
1.17.0