diff options
author | Chris Xiong <chirs241097@gmail.com> | 2022-09-07 13:04:17 -0400 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2022-09-07 13:04:17 -0400 |
commit | 6c77ce2361d713fc13a4d21f8dec87084de45c9e (patch) | |
tree | ed9ab89b97a6df4756bdddfbb00019df9bc2c7d6 /signature.hpp | |
parent | 532ea00ea6ec0e20898ef009e432ea1f55dc8db1 (diff) | |
download | deduper-6c77ce2361d713fc13a4d21f8dec87084de45c9e.tar.xz |
Pass matrices as pointers so that headers no longer depend on opencv.
Diffstat (limited to 'signature.hpp')
-rw-r--r-- | signature.hpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/signature.hpp b/signature.hpp index e01a739..4e8c10f 100644 --- a/signature.hpp +++ b/signature.hpp @@ -5,7 +5,6 @@ #include <memory> #include <filesystem> -#include <opencv2/core.hpp> struct signature_config { @@ -20,6 +19,11 @@ struct signature_config double max_cropping; }; +namespace cv +{ + class Mat; +}; + class signature_priv; class signature { @@ -49,7 +53,7 @@ public: * Then it will be passed to from_preprocessed_matrix. * The matrix doesn't have to be continuous. */ - static signature from_cvmatrix(cv::Mat m, const signature_config &cfg); + static signature from_cvmatrix(cv::Mat *m, const signature_config &cfg); /* * Input must be a single channel, floating point matrix @@ -58,7 +62,7 @@ public: * STILL *Will* be cropped if config().crop == true * STILL *Will* be blurred if config().blur_window > 1 */ - static signature from_preprocessed_matrix(cv::Mat m, const signature_config &cfg); + static signature from_preprocessed_matrix(cv::Mat *m, const signature_config &cfg); static signature_config default_cfg(); |