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

Method ReadAllMatches

src/colmap/scene/database_sqlite.cc:902–919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

900 }
901
902 std::vector<std::pair<image_pair_t, FeatureMatches>> ReadAllMatches()
903 const override {
904 Sqlite3StmtContext context(sql_stmt_read_matches_all_);
905
906 std::vector<std::pair<image_pair_t, FeatureMatches>> all_matches;
907
908 int rc;
909 while ((rc = SQLITE3_CALL(sqlite3_step(sql_stmt_read_matches_all_))) ==
910 SQLITE_ROW) {
911 const image_pair_t pair_id = static_cast<image_pair_t>(
912 sqlite3_column_int64(sql_stmt_read_matches_all_, 0));
913 const FeatureMatchesBlob blob = ReadDynamicMatrixBlob<FeatureMatchesBlob>(
914 sql_stmt_read_matches_all_, rc, 1);
915 all_matches.emplace_back(pair_id, FeatureMatchesFromBlob(blob));
916 }
917
918 return all_matches;
919 }
920
921 std::vector<std::pair<image_pair_t, int>> ReadNumMatches() const override {
922 Sqlite3StmtContext context(sql_stmt_read_num_matches_);

Callers 8

TEST_PFunction · 0.45
TESTFunction · 0.45
MergeMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 1

FeatureMatchesFromBlobFunction · 0.85

Tested by 6

TEST_PFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36