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

Method CreateImageTable

src/colmap/scene/database_sqlite.cc:1977–1989  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1975 }
1976
1977 void CreateImageTable() const {
1978 const std::string sql = StringPrintf(
1979 "CREATE TABLE IF NOT EXISTS images"
1980 " (image_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,"
1981 " name TEXT NOT NULL UNIQUE,"
1982 " camera_id INTEGER NOT NULL,"
1983 " CONSTRAINT image_id_check CHECK(image_id >= 0 and image_id < %d),"
1984 " FOREIGN KEY(camera_id) REFERENCES cameras(camera_id));"
1985 "CREATE UNIQUE INDEX IF NOT EXISTS index_name ON images(name);",
1986 kMaxNumImages);
1987
1988 SQLITE3_EXEC(database_, sql.c_str(), nullptr);
1989 }
1990
1991 void CreatePosePriorTable() const {
1992 const std::string sql =

Callers

nothing calls this directly

Calls 1

StringPrintfFunction · 0.85

Tested by

no test coverage detected