Feature.h
Go to the documentation of this file.
1 /*
2  * OpenVINS: An Open Platform for Visual-Inertial Research
3  * Copyright (C) 2018-2023 Patrick Geneva
4  * Copyright (C) 2018-2023 Guoquan Huang
5  * Copyright (C) 2018-2023 OpenVINS Contributors
6  * Copyright (C) 2018-2019 Kevin Eckenhoff
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef OV_CORE_FEATURE_H
23 #define OV_CORE_FEATURE_H
24 
25 #include <Eigen/Eigen>
26 #include <iostream>
27 #include <unordered_map>
28 #include <vector>
29 
30 namespace ov_core {
31 
39 class Feature {
40 
41 public:
43  size_t featid;
44 
46  bool to_delete;
47 
49  std::unordered_map<size_t, std::vector<Eigen::VectorXf>> uvs;
50 
52  std::unordered_map<size_t, std::vector<Eigen::VectorXf>> uvs_norm;
53 
55  std::unordered_map<size_t, std::vector<double>> timestamps;
56 
58  int anchor_cam_id = -1;
59 
62 
64  Eigen::Vector3d p_FinA;
65 
67  Eigen::Vector3d p_FinG;
68 
77  void clean_old_measurements(const std::vector<double> &valid_times);
78 
86  void clean_invalid_measurements(const std::vector<double> &invalid_times);
87 
95  void clean_older_measurements(double timestamp);
96 };
97 
98 } // namespace ov_core
99 
100 #endif /* OV_CORE_FEATURE_H */
ov_core::Feature::clean_invalid_measurements
void clean_invalid_measurements(const std::vector< double > &invalid_times)
Remove measurements that occur at the invalid timestamps.
Definition: Feature.cpp:55
ov_core::Feature::anchor_cam_id
int anchor_cam_id
What camera ID our pose is anchored in!! By default the first measurement is the anchor.
Definition: Feature.h:58
ov_core::Feature::clean_old_measurements
void clean_old_measurements(const std::vector< double > &valid_times)
Remove measurements that do not occur at passed timestamps.
Definition: Feature.cpp:26
ov_core::Feature::clean_older_measurements
void clean_older_measurements(double timestamp)
Remove measurements that are older then the specified timestamp.
Definition: Feature.cpp:84
ov_core::Feature::uvs
std::unordered_map< size_t, std::vector< Eigen::VectorXf > > uvs
UV coordinates that this feature has been seen from (mapped by camera ID)
Definition: Feature.h:49
ov_core::Feature::p_FinG
Eigen::Vector3d p_FinG
Triangulated position of this feature, in the global frame.
Definition: Feature.h:67
ov_core::Feature::anchor_clone_timestamp
double anchor_clone_timestamp
Timestamp of anchor clone.
Definition: Feature.h:61
ov_core::Feature::uvs_norm
std::unordered_map< size_t, std::vector< Eigen::VectorXf > > uvs_norm
UV normalized coordinates that this feature has been seen from (mapped by camera ID)
Definition: Feature.h:52
ov_core::Feature
Sparse feature class used to collect measurements.
Definition: Feature.h:39
ov_core::Feature::featid
size_t featid
Unique ID of this feature.
Definition: Feature.h:43
ov_core::Feature::timestamps
std::unordered_map< size_t, std::vector< double > > timestamps
Timestamps of each UV measurement (mapped by camera ID)
Definition: Feature.h:55
ov_core::Feature::p_FinA
Eigen::Vector3d p_FinA
Triangulated position of this feature, in the anchor frame.
Definition: Feature.h:64
ov_core::Feature::to_delete
bool to_delete
If this feature should be deleted.
Definition: Feature.h:46
ov_core
Core algorithms for OpenVINS.
Definition: CamBase.h:30


ov_core
Author(s): Patrick Geneva , Kevin Eckenhoff , Guoquan Huang
autogenerated on Mon Jan 22 2024 03:08:17