NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
feature_point.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under 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 
19 #ifndef VISION_COMMON_FEATURE_POINT_H_
20 #define VISION_COMMON_FEATURE_POINT_H_
21 
23 
24 #include <gtsam/geometry/Point2.h>
25 
26 #include <vector>
27 
28 namespace vision_common {
29 using FeatureId = int;
30 using ImageId = int;
31 // Point belonging to an image space feature track.
32 // Contains an image_id corresponding to the image it belongs to and a feature_track_id
33 // corresponding to the feature track it belongs to.
34 struct FeaturePoint {
35  FeaturePoint(const double u, const double v, const ImageId image_id, const FeatureId feature_track_id,
39  gtsam::Point2 image_point;
43 
44  private:
45  // Serialization function
47  template <class ARCHIVE>
48  void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
49  ar& BOOST_SERIALIZATION_NVP(image_point);
50  ar& BOOST_SERIALIZATION_NVP(image_id);
51  ar& BOOST_SERIALIZATION_NVP(feature_track_id);
52  ar& BOOST_SERIALIZATION_NVP(timestamp);
53  }
54 };
55 
56 using FeaturePoints = std::vector<FeaturePoint>;
57 } // namespace vision_common
58 
59 #endif // VISION_COMMON_FEATURE_POINT_H_
vision_common
Definition: brisk_feature_detector_and_matcher.h:25
vision_common::FeaturePoint
Definition: feature_point.h:34
vision_common::ImageId
int ImageId
Definition: feature_point.h:30
vision_common::FeaturePoints
std::vector< FeaturePoint > FeaturePoints
Definition: feature_point.h:56
time.h
vision_common::FeaturePoint::feature_track_id
FeatureId feature_track_id
Definition: feature_point.h:41
vision_common::FeaturePoint::image_id
ImageId image_id
Definition: feature_point.h:40
vision_common::FeaturePoint::timestamp
localization_common::Time timestamp
Definition: feature_point.h:42
vision_common::FeaturePoint::access
friend class boost::serialization::access
Definition: feature_point.h:46
vision_common::FeaturePoint::FeaturePoint
FeaturePoint()
Definition: feature_point.h:38
vision_common::FeatureId
int FeatureId
Definition: feature_point.h:29
localization_common::Time
double Time
Definition: time.h:23
vision_common::FeaturePoint::FeaturePoint
FeaturePoint(const double u, const double v, const ImageId image_id, const FeatureId feature_track_id, const localization_common::Time timestamp)
Definition: feature_point.h:35
vision_common::FeaturePoint::image_point
gtsam::Point2 image_point
Definition: feature_point.h:39