aboutsummaryrefslogtreecommitdiff
path: root/signature.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-11 01:39:29 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-11 01:39:29 -0400
commitc41768dbbd50a0055298d5ec6318ae7f1d2e4ab3 (patch)
tree4fe4ec18a65424998c33c6654456b2551996ae39 /signature.hpp
parentfd2773c2407aa475ba8aa4c8a72c91b83fd99c42 (diff)
downloaddeduper-c41768dbbd50a0055298d5ec6318ae7f1d2e4ab3.tar.xz
New testdrive using sqlite db as data storage.
Add signature serialization & deserialization. Only link what we need from OpenCV.
Diffstat (limited to 'signature.hpp')
-rw-r--r--signature.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/signature.hpp b/signature.hpp
index 4e8c10f..ba342fa 100644
--- a/signature.hpp
+++ b/signature.hpp
@@ -5,6 +5,7 @@
#include <memory>
#include <filesystem>
+#include <string>
struct signature_config
{
@@ -42,6 +43,9 @@ public:
double length() const;
double distance(const signature &o) const;
bool operator ==(const signature &o) const;
+ std::string to_string() const;
+
+ static signature from_string(std::string &&s);
static signature from_path(const std::filesystem::path &path, const signature_config &cfg);