NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
utilities.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 #ifndef LOCALIZATION_SPARSE_MAPPING_TOOLS_UTILITIES_H_
19 #define LOCALIZATION_SPARSE_MAPPING_TOOLS_UTILITIES_H_
20 
21 #include <camera/camera_params.h>
23 
24 #include <boost/optional.hpp>
25 #include <Eigen/Core>
26 #include <Eigen/Geometry>
27 
28 #include <string>
29 #include <vector>
30 
31 namespace sparse_mapping {
32 cv::Point2f CvPoint2(const Eigen::Vector2d& point);
33 
34 void CreateSubdirectory(const std::string& directory, const std::string& subdirectory);
35 
36 boost::optional<vision_common::FeatureMatches> Matches(
37  const vision_common::FeatureImage& current_image, const vision_common::FeatureImage& next_image,
39 
41  const camera::CameraParameters& camera_params, std::vector<cv::DMatch>& inliers);
42 
43 vision_common::FeatureImage LoadImage(const int index, const std::vector<std::string>& image_names,
44  cv::Feature2D& detector);
45 
47 
49  const double max_low_movement_mean_distance);
50 
51 bool LowMovementImagePair(const vision_common::FeatureImage& current_image,
52  const vision_common::FeatureImage& next_image, const double max_low_movement_mean_distance,
54 
55 std::vector<std::string> GetImageNames(const std::string& image_directory, const std::string& image_extension = ".jpg");
56 } // namespace sparse_mapping
57 
58 #endif // LOCALIZATION_SPARSE_MAPPING_TOOLS_UTILITIES_H_
sparse_mapping::EstimateAffine3d
Eigen::Affine3d EstimateAffine3d(const vc::FeatureMatches &matches, const camera::CameraParameters &camera_params, std::vector< cv::DMatch > &inliers)
Definition: utilities.cc:61
vision_common::FeatureMatches
std::vector< FeatureMatch > FeatureMatches
Definition: feature_match.h:35
sparse_mapping::LoadImage
vc::FeatureImage LoadImage(const int index, const std::vector< std::string > &image_names, cv::Feature2D &detector)
Definition: utilities.cc:85
sparse_mapping
Definition: localization_parameters.h:22
camera::CameraParameters
Definition: camera_params.h:58
sparse_mapping::GetImageNames
std::vector< std::string > GetImageNames(const std::string &image_directory, const std::string &image_extension)
Definition: utilities.cc:153
sparse_mapping::CreateSubdirectory
void CreateSubdirectory(const std::string &directory, const std::string &subdirectory)
Definition: utilities.cc:41
vision_common::FeatureImage
Definition: feature_image.h:27
sparse_mapping::Matches
boost::optional< vc::FeatureMatches > Matches(const vc::FeatureImage &current_image, const vc::FeatureImage &next_image, vc::LKOpticalFlowFeatureDetectorAndMatcher &detector_and_matcher)
Definition: utilities.cc:48
sparse_mapping::LowMovementImagePair
bool LowMovementImagePair(const vision_common::FeatureMatches &matches, const double max_low_movement_mean_distance)
Definition: utilities.cc:112
sparse_mapping::LoadParams
vc::LKOpticalFlowFeatureDetectorAndMatcherParams LoadParams()
Definition: utilities.cc:93
vision_common::LKOpticalFlowFeatureDetectorAndMatcher
Definition: lk_optical_flow_feature_detector_and_matcher.h:26
optimization_common::Affine3d
Eigen::Affine3d Affine3d(const Eigen::Matrix< double, 7, 1 > &affine_vector)
Definition: utilities.cc:43
lk_optical_flow_feature_detector_and_matcher.h
vision_common::LKOpticalFlowFeatureDetectorAndMatcherParams
Definition: lk_optical_flow_feature_detector_and_matcher_params.h:24
camera_params.h
sparse_mapping::CvPoint2
cv::Point2f CvPoint2(const Eigen::Vector2d &point)
Definition: utilities.cc:39