diff options
author | 2022-09-22 00:03:01 -0400 | |
---|---|---|
committer | 2022-09-22 00:03:01 -0400 | |
commit | 8ece6d3ec1b0105047c192c0aa044e4257118e01 (patch) | |
tree | ca4202e6e41d31c6f73fc7514c237a5b2b2c2764 /qdeduper/sigdb_qt.cpp | |
parent | 1d41325a9685cf677f8eeaa4940f032931fd8780 (diff) | |
download | deduper-8ece6d3ec1b0105047c192c0aa044e4257118e01.tar.xz |
Add "reverse image search".
Fixed a stupid performance degradation in the signature library
in the process.
Diffstat (limited to 'qdeduper/sigdb_qt.cpp')
-rw-r--r-- | qdeduper/sigdb_qt.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/qdeduper/sigdb_qt.cpp b/qdeduper/sigdb_qt.cpp index 67cc3e6..733a198 100644 --- a/qdeduper/sigdb_qt.cpp +++ b/qdeduper/sigdb_qt.cpp @@ -97,6 +97,22 @@ void SignatureDB::interrupt_scan() sdb->populate_interrupt(); } +std::vector<std::pair<size_t, double>> SignatureDB::search_file(const fs::path &files) +{ + populate_cfg_t pcfg = { + 3, + 3, + cfg_full, + cfg_subslice, + 0.3, + nullptr, + 0 + }; + if(sdb) + return sdb->search_image(files, pcfg, false); + return {}; +} + size_t SignatureDB::num_groups() { return groups.size(); |