| 177 | } |
| 178 | |
| 179 | void WriteComparisonErrorsCSV(const std::filesystem::path& path, |
| 180 | const std::vector<ImageAlignmentError>& errors) { |
| 181 | std::ofstream file(path, std::ios::trunc); |
| 182 | THROW_CHECK_FILE_OPEN(file, path); |
| 183 | |
| 184 | file.imbue(std::locale::classic()); |
| 185 | file.precision(17); |
| 186 | file << "# Model comparison pose errors: one entry per common image\n"; |
| 187 | file << "# <rotation error (deg)>, <proj center error>\n"; |
| 188 | for (size_t i = 0; i < errors.size(); ++i) { |
| 189 | file << errors[i].rotation_error_deg << ", " << errors[i].proj_center_error |
| 190 | << '\n'; |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | void PrintErrorStats(std::ostream& out, |
| 195 | const AlignmentErrorSummary::Statistics& stats) { |
no test coverage detected