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

Method ToFile

src/colmap/geometry/sim3.cc:39–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37namespace colmap {
38
39void Sim3d::ToFile(const std::filesystem::path& path) const {
40 std::ofstream file(path, std::ios::trunc);
41 THROW_CHECK(file.good()) << path;
42 file.imbue(std::locale::classic());
43 // Ensure that we don't loose any precision by storing in text.
44 file.precision(17);
45 file << scale() << " " << rotation().w() << " " << rotation().x() << " "
46 << rotation().y() << " " << rotation().z() << " " << translation().x()
47 << " " << translation().y() << " " << translation().z() << '\n';
48}
49
50Sim3d Sim3d::FromFile(const std::filesystem::path& path) {
51 std::ifstream file(path);

Callers 2

RunModelAlignerFunction · 0.80
TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64