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

Method ReadDescriptors

src/colmap/scene/database_sqlite.cc:841–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

839 }
840
841 FeatureDescriptors ReadDescriptors(const image_t image_id) const override {
842 Sqlite3StmtContext context(sql_stmt_read_descriptors_);
843
844 SQLITE3_CALL(sqlite3_bind_int64(sql_stmt_read_descriptors_, 1, image_id));
845
846 const int rc = SQLITE3_CALL(sqlite3_step(sql_stmt_read_descriptors_));
847 FeatureDescriptors descriptors;
848 descriptors.data = ReadDynamicMatrixBlob<FeatureDescriptorsData>(
849 sql_stmt_read_descriptors_, rc, 0);
850
851 // Read feature type from column 3 (0-indexed after rows, cols, data).
852 if (rc == SQLITE_ROW &&
853 sqlite3_column_type(sql_stmt_read_descriptors_, 3) != SQLITE_NULL) {
854 descriptors.type = static_cast<FeatureExtractorType>(
855 sqlite3_column_int(sql_stmt_read_descriptors_, 3));
856 }
857
858 return descriptors;
859 }
860
861 FeatureMatchesBlob ReadMatchesBlob(image_t image_id1,
862 image_t image_id2) const override {

Callers 8

TEST_PFunction · 0.45
TESTFunction · 0.45
MergeMethod · 0.45
FeatureMatcherCacheMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
RunVocabTreeRetrieverFunction · 0.45

Calls

no outgoing calls

Tested by 4

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