93 math::RandomGenerator rng(math::RandomGenerator::Seed());
96 cv::Mat cv_image1, cv_image2;
97 image1.ToCV(cv_image1);
98 image2.ToCV(cv_image2);
101 cv::Mat combined_image;
102 cv::hconcat(cv_image1, cv_image2, combined_image);
105 for (
const auto& feature_match : feature_matches) {
107 feature1.x = feature_match.feature1_.u_;
108 feature1.y = feature_match.feature1_.v_;
111 feature2.x = feature_match.feature2_.u_;
112 feature2.y = feature_match.feature2_.v_;
113 feature2 += cv::Point(image2.Width(), 0);
116 const cv::Scalar color(rng.Double(), rng.Double(), rng.Double());
117 cv::line(combined_image, feature1, feature2, color, line_thickness);
120 cv::circle(combined_image, feature1, line_thickness * 3 , color,
122 cv::circle(combined_image, feature2, line_thickness * 3 , color,
127 cv::namedWindow(window_name.c_str(), CV_WINDOW_AUTOSIZE);
128 cv::imshow(window_name.c_str(), combined_image);