From 8ece6d3ec1b0105047c192c0aa044e4257118e01 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Thu, 22 Sep 2022 00:03:01 -0400 Subject: Add "reverse image search". Fixed a stupid performance degradation in the signature library in the process. --- qdeduper/sigdb_qt.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'qdeduper/sigdb_qt.cpp') 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> 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(); -- cgit v1.2.3