|
NASA Astrobee Robot Software
0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
|
Go to the documentation of this file.
18 #ifndef VISION_COMMON_TEST_UTILITIES_H_
19 #define VISION_COMMON_TEST_UTILITIES_H_
29 #include <opencv2/core.hpp>
34 void SetFocalLengths(
const Eigen::Vector2d& focal_lengths, Eigen::Matrix3d& intrinsics);
36 void SetPrincipalPoints(
const Eigen::Vector2d& principal_points, Eigen::Matrix3d& intrinsics);
40 cv::Mat
MarkerImage(
const int row_spacing,
const int col_spacing,
int& num_markers_added,
41 const cv::Point2i& offset = cv::Point2i(0, 0));
43 int AddMarkers(
const int row_spacing,
const int col_spacing, cv::Mat& image,
44 const cv::Point2i& offset = cv::Point2i(0, 0));
62 const int num_y_levels = 2);
64 std::vector<Eigen::Vector3d>
TargetPoints(
const int points_per_row,
const int points_per_col,
65 const double row_spacing = 0.1,
const double col_spacing = 0.1);
67 template <
typename DISTORTER>
71 const std::vector<Eigen::Vector3d>& target_t_target_point,
72 const Eigen::VectorXd& distortion = Eigen::VectorXd());
78 const Eigen::Matrix3d&
intrinsics()
const {
return intrinsics_; }
83 Eigen::Matrix3d intrinsics_;
86 template <
typename DISTORTER>
89 const std::vector<Eigen::Vector3d>& target_t_target_points,
const Eigen::VectorXd& distortion)
90 : camera_T_target_(camera_T_target), intrinsics_(intrinsics) {
91 for (
const auto& target_t_target_point : target_t_target_points) {
92 const Eigen::Vector3d camera_t_target_point = camera_T_target_ * target_t_target_point;
93 if (camera_t_target_point.z() <= 0)
continue;
94 const Eigen::Vector2d image_point =
95 ProjectWithDistortion<DISTORTER>(camera_t_target_point, intrinsics_, distortion);
100 #endif // VISION_COMMON_TEST_UTILITIES_H_
cv::Mat MarkerImage(const int row_spacing, const int col_spacing, int &num_markers_added, const cv::Point2i &offset=cv::Point2i(0, 0))
Definition: test_utilities.cc:58
optimization_common::OptimizationParams DefaultOptimizationParams()
Definition: test_utilities.cc:77
void SetPrincipalPoints(const Eigen::Vector2d &principal_points, Eigen::Matrix3d &intrinsics)
Definition: test_utilities.cc:35
std::vector< Eigen::Isometry3d > EvenlySpacedTargetPoses(const int num_rows=3, const int num_cols=5, const int num_y_levels=2)
Definition: test_utilities.cc:144
const localization_common::ImageCorrespondences & correspondences() const
Definition: test_utilities.h:74
Definition: brisk_feature_detector_and_matcher.h:25
ReprojectionPoseEstimateParams DefaultReprojectionPoseEstimateParams()
Definition: test_utilities.cc:100
Definition: optimization_params.h:24
Eigen::VectorXd RandomFovDistortion()
Definition: test_utilities.cc:109
std::vector< Eigen::Vector3d > TargetPoints(const int points_per_row, const int points_per_col, const double row_spacing=0.1, const double col_spacing=0.1)
Definition: test_utilities.cc:131
RansacPnPParams DefaultRansacPnPParams()
Definition: test_utilities.cc:89
const Eigen::Isometry3d & camera_T_target() const
Definition: test_utilities.h:76
LKOpticalFlowFeatureDetectorAndMatcherParams DefaultLKOpticalFlowFeatureDetectorAndMatcherParams()
Definition: test_utilities.cc:40
Definition: image_correspondences.h:26
int AddMarkers(const int row_spacing, const int col_spacing, cv::Mat &image, const cv::Point2i &offset=cv::Point2i(0, 0))
Definition: test_utilities.cc:64
Eigen::Isometry3d Isometry3d(const Eigen::Vector3d &translation, const RotationType &rotation)
Definition: utilities.h:226
void SetFocalLengths(const Eigen::Vector2d &focal_lengths, Eigen::Matrix3d &intrinsics)
Definition: test_utilities.cc:30
Eigen::Vector3d Vector3d(const PointType &point)
Definition: utilities.h:328
RegistrationCorrespondences(const Eigen::Isometry3d &camera_T_target, const Eigen::Matrix3d &intrinsics, const std::vector< Eigen::Vector3d > &target_t_target_point, const Eigen::VectorXd &distortion=Eigen::VectorXd())
Definition: test_utilities.h:87
void AddCorrespondence(const Eigen::Vector2d &image_point, const Eigen::Vector3d &point_3d)
Definition: image_correspondences.h:31
Eigen::VectorXd RandomRadTanDistortion()
Definition: test_utilities.cc:122
const Eigen::Matrix3d & intrinsics() const
Definition: test_utilities.h:78
Eigen::VectorXd RandomRadDistortion()
Definition: test_utilities.cc:115
Definition: test_utilities.h:68