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 /tests | |
parent | 532ea00ea6ec0e20898ef009e432ea1f55dc8db1 (diff) | |
download | deduper-6c77ce2361d713fc13a4d21f8dec87084de45c9e.tar.xz |
Pass matrices as pointers so that headers no longer depend on opencv.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testdrive.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/testdrive.cpp b/tests/testdrive.cpp index 1896cc8..d5cd7b3 100644 --- a/tests/testdrive.cpp +++ b/tests/testdrive.cpp @@ -209,7 +209,7 @@ void build_file_list(fs::path path, bool recursive, std::vector<fs::path> &out) void job_func(int thid, size_t id) { cv::Mat img = image_util::imread_path(files[id], cv::IMREAD_UNCHANGED); - signature s = signature::from_cvmatrix(img, cfg_full); + signature s = signature::from_cvmatrix(&img, cfg_full); #if DEBUG > 1 s.dump(); #endif @@ -223,7 +223,8 @@ void job_func(int thid, size_t id) int r = (i == nsliceh) ? img.size().width : (i + 1) * ssw; int t = j * ssh; int b = (j == nslicev) ? img.size().height : (j + 1) * ssh; - subsigs.push_back(std::move(signature::from_cvmatrix(img(cv::Range(t, b), cv::Range(l, r)), cfg_subslice))); + cv::Mat slice = img(cv::Range(t, b), cv::Range(l, r)); + subsigs.push_back(std::move(signature::from_cvmatrix(&slice, cfg_subslice))); #if DEBUG > 0 printf("%ld, (%d, %d) %lu\n", id, i, j, signature_hash{}(subsigs.back())); #endif |