From 6c77ce2361d713fc13a4d21f8dec87084de45c9e Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Wed, 7 Sep 2022 13:04:17 -0400 Subject: Pass matrices as pointers so that headers no longer depend on opencv. --- tests/testdrive.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') 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 &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 -- cgit v1.2.3