MCPcopy Create free account
hub / github.com/colmap/colmap / ValidateReport

Function ValidateReport

src/colmap/optim/ransac_test.cc:77–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75
76template <typename Report>
77void ValidateReport(const Report& report,
78 const SimilarityTransformTestData& data) {
79 EXPECT_TRUE(report.success);
80 EXPECT_GT(report.num_trials, 0);
81
82 EXPECT_EQ(report.support.num_inliers, data.num_samples - data.num_outliers);
83 for (size_t i = 0; i < data.num_samples; ++i) {
84 if (i < data.num_outliers) {
85 EXPECT_FALSE(report.inlier_mask[i]);
86 } else {
87 EXPECT_TRUE(report.inlier_mask[i]);
88 }
89 }
90
91 const double matrix_diff =
92 (data.expected_tgt_from_src.ToMatrix() - report.model).norm();
93 EXPECT_LT(matrix_diff, 1e-6);
94}
95
96TEST(RANSAC, Options) {
97 RANSACOptions options;

Callers 1

TESTFunction · 0.70

Calls 1

ToMatrixMethod · 0.45

Tested by

no test coverage detected