mirror of
https://github.com/opencv/opencv.git
synced 2026-12-02 21:22:43 -06:00
Photo_MergeRobertson.regression compared radiance values from 0.014 to 688 with one absolute limit of 6 (raised from 5 for AArch64 in 2017, then for all platforms). The result measured 5.84 on Linux and macOS ARM64 and 3.92 on Linux and Windows x64, while an error in dark pixels could not fail the test at all. Radiance (.hdr) files store each pixel with one shared exponent, so each channel is only as precise as the pixel's brightest channel allows. The new check scales the error by that channel. The result measures 0.91% on ARM64 and 0.78% on x64; the limit is 1.5%. Non-finite values fail the check before it reduces the differences with minMaxLoc(). Checked against modified results on macOS ARM64: dark pixels doubled (102%) and the brightest exposure dropped (288%) passed the old check and fail now; all exposure times 2% off still fails (1.96%). Prepared with AI assistance (Claude Code); I reviewed the change and the verification results. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
517 lines
18 KiB
C++
517 lines
18 KiB
C++
/*M///////////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
|
//
|
|
// By downloading, copying, installing or using the software you agree to this license.
|
|
// If you do not agree to this license, do not download, install,
|
|
// copy or use the software.
|
|
//
|
|
//
|
|
// License Agreement
|
|
// For Open Source Computer Vision Library
|
|
//
|
|
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
|
|
// Third party copyrights are property of their respective owners.
|
|
//
|
|
// Redistribution and use in source and binary forms, with or without modification,
|
|
// are permitted provided that the following conditions are met:
|
|
//
|
|
// * Redistribution's of source code must retain the above copyright notice,
|
|
// this list of conditions and the following disclaimer.
|
|
//
|
|
// * Redistribution's in binary form must reproduce the above copyright notice,
|
|
// this list of conditions and the following disclaimer in the documentation
|
|
// and/or other materials provided with the distribution.
|
|
//
|
|
// * The name of the copyright holders may not be used to endorse or promote products
|
|
// derived from this software without specific prior written permission.
|
|
//
|
|
// This software is provided by the copyright holders and contributors "as is" and
|
|
// any express or implied warranties, including, but not limited to, the implied
|
|
// warranties of merchantability and fitness for a particular purpose are disclaimed.
|
|
// In no event shall the Intel Corporation or contributors be liable for any direct,
|
|
// indirect, incidental, special, exemplary, or consequential damages
|
|
// (including, but not limited to, procurement of substitute goods or services;
|
|
// loss of use, data, or profits; or business interruption) however caused
|
|
// and on any theory of liability, whether in contract, strict liability,
|
|
// or tort (including negligence or otherwise) arising in any way out of
|
|
// the use of this software, even if advised of the possibility of such damage.
|
|
//
|
|
//M*/
|
|
|
|
#include "test_precomp.hpp"
|
|
|
|
namespace opencv_test { namespace {
|
|
|
|
void loadImage(string path, Mat &img)
|
|
{
|
|
img = imread(path, -1);
|
|
ASSERT_FALSE(img.empty()) << "Could not load input image " << path;
|
|
}
|
|
|
|
void checkEqual(Mat img0, Mat img1, double threshold, const string& name)
|
|
{
|
|
double max = 1.0;
|
|
minMaxLoc(abs(img0 - img1), NULL, &max);
|
|
ASSERT_FALSE(max > threshold) << "max=" << max << " threshold=" << threshold << " method=" << name;
|
|
}
|
|
|
|
// Radiance .hdr files store three mantissas with one shared exponent, so each
|
|
// channel is stored to a precision proportional to the pixel's brightest channel.
|
|
// Compare against that scale instead of one absolute threshold for the whole image.
|
|
void checkEqualRelativeToPixelMax(const Mat& expected, const Mat& actual, double threshold, const string& name)
|
|
{
|
|
ASSERT_EQ(CV_32FC3, expected.type());
|
|
ASSERT_EQ(expected.type(), actual.type());
|
|
ASSERT_EQ(expected.size(), actual.size());
|
|
// minMaxLoc() below may skip NaN, so reject non-finite values first.
|
|
ASSERT_TRUE(cv::checkRange(expected)) << "non-finite values in the expected image, method=" << name;
|
|
ASSERT_TRUE(cv::checkRange(actual)) << "non-finite values in the actual image, method=" << name;
|
|
std::vector<Mat> channels;
|
|
cv::split(expected, channels);
|
|
Mat scale;
|
|
cv::max(channels[0], channels[1], scale);
|
|
cv::max(scale, channels[2], scale);
|
|
double min_scale = 0;
|
|
cv::minMaxLoc(scale, &min_scale);
|
|
ASSERT_GT(min_scale, 0) << "method=" << name;
|
|
std::vector<Mat> diff;
|
|
cv::split(abs(expected - actual), diff);
|
|
Mat worst;
|
|
cv::max(diff[0], diff[1], worst);
|
|
cv::max(worst, diff[2], worst);
|
|
cv::divide(worst, scale, worst);
|
|
double max_rel = 0;
|
|
Point where;
|
|
cv::minMaxLoc(worst, NULL, &max_rel, NULL, &where);
|
|
ASSERT_LE(max_rel, threshold) << "method=" << name << " at " << where
|
|
<< " expected=" << expected.at<Vec3f>(where) << " actual=" << actual.at<Vec3f>(where);
|
|
}
|
|
|
|
static vector<float> DEFAULT_VECTOR;
|
|
void loadExposureSeq(String path, vector<Mat>& images, vector<float>& times = DEFAULT_VECTOR)
|
|
{
|
|
std::ifstream list_file((path + "list.txt").c_str());
|
|
ASSERT_TRUE(list_file.is_open());
|
|
string name;
|
|
float val;
|
|
while(list_file >> name >> val) {
|
|
Mat img = imread(path + name);
|
|
ASSERT_FALSE(img.empty()) << "Could not load input image " << path + name;
|
|
images.push_back(img);
|
|
times.push_back(1 / val);
|
|
}
|
|
list_file.close();
|
|
}
|
|
|
|
void loadResponseCSV(String path, Mat& response)
|
|
{
|
|
response = Mat(256, 1, CV_32FC3);
|
|
std::ifstream resp_file(path.c_str());
|
|
for(int i = 0; i < 256; i++) {
|
|
for(int c = 0; c < 3; c++) {
|
|
resp_file >> response.at<Vec3f>(i)[c];
|
|
resp_file.ignore(1);
|
|
}
|
|
}
|
|
resp_file.close();
|
|
}
|
|
|
|
TEST(Photo_Tonemap, regression)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/tonemap/";
|
|
|
|
Mat img, expected, result;
|
|
loadImage(test_path + "image.hdr", img);
|
|
float gamma = 2.2f;
|
|
|
|
Ptr<Tonemap> linear = createTonemap(gamma);
|
|
linear->process(img, result);
|
|
loadImage(test_path + "linear.png", expected);
|
|
result.convertTo(result, CV_8UC3, 255);
|
|
checkEqual(result, expected, 3, "Simple");
|
|
|
|
Ptr<TonemapDrago> drago = createTonemapDrago(gamma);
|
|
drago->process(img, result);
|
|
loadImage(test_path + "drago.png", expected);
|
|
result.convertTo(result, CV_8UC3, 255);
|
|
checkEqual(result, expected, 3, "Drago");
|
|
|
|
Ptr<TonemapReinhard> reinhard = createTonemapReinhard(gamma);
|
|
reinhard->process(img, result);
|
|
loadImage(test_path + "reinhard.png", expected);
|
|
result.convertTo(result, CV_8UC3, 255);
|
|
checkEqual(result, expected, 3, "Reinhard");
|
|
|
|
Ptr<TonemapMantiuk> mantiuk = createTonemapMantiuk(gamma);
|
|
mantiuk->process(img, result);
|
|
loadImage(test_path + "mantiuk.png", expected);
|
|
result.convertTo(result, CV_8UC3, 255);
|
|
checkEqual(result, expected, 3, "Mantiuk");
|
|
}
|
|
|
|
TEST(Photo_Tonemap, reinhard_preserves_intensity)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/tonemap/";
|
|
|
|
Mat img, first, second;
|
|
loadImage(test_path + "image.hdr", img);
|
|
Mat original = img.clone();
|
|
|
|
Ptr<TonemapReinhard> tonemap = createTonemapReinhard(1.0f, 0.0f, 1.0f, 0.0f);
|
|
EXPECT_FLOAT_EQ(0.0f, tonemap->getIntensity());
|
|
|
|
tonemap->process(img, first);
|
|
EXPECT_FLOAT_EQ(0.0f, tonemap->getIntensity());
|
|
|
|
tonemap->process(img, second);
|
|
EXPECT_FLOAT_EQ(0.0f, tonemap->getIntensity());
|
|
|
|
checkEqual(first, second, 0, "Reinhard repeated process");
|
|
checkEqual(img, original, 0, "Reinhard input preservation");
|
|
}
|
|
|
|
TEST(Photo_AlignMTB, regression)
|
|
{
|
|
const int TESTS_COUNT = 100;
|
|
string folder = string(cvtest::TS::ptr()->get_data_path()) + "shared/";
|
|
|
|
string file_name = folder + "lena.png";
|
|
Mat img;
|
|
loadImage(file_name, img);
|
|
cvtColor(img, img, COLOR_RGB2GRAY);
|
|
|
|
int max_bits = 5;
|
|
int max_shift = 32;
|
|
srand(static_cast<unsigned>(time(0)));
|
|
int errors = 0;
|
|
|
|
Ptr<AlignMTB> align = createAlignMTB(max_bits);
|
|
RNG rng = theRNG();
|
|
|
|
for(int i = 0; i < TESTS_COUNT; i++) {
|
|
Point shift(rng.uniform(0, max_shift), rng.uniform(0, max_shift));
|
|
Mat res;
|
|
align->shiftMat(img, res, shift);
|
|
Point calc = align->calculateShift(img, res);
|
|
errors += (calc != -shift);
|
|
}
|
|
ASSERT_TRUE(errors < 5) << errors << " errors";
|
|
}
|
|
|
|
TEST(Photo_MergeMertens, regression)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
|
|
|
|
vector<Mat> images;
|
|
loadExposureSeq((test_path + "exposures/").c_str() , images);
|
|
|
|
Ptr<MergeMertens> merge = createMergeMertens();
|
|
|
|
Mat result, expected;
|
|
loadImage(test_path + "merge/mertens.png", expected);
|
|
merge->process(images, result);
|
|
result.convertTo(result, CV_8UC3, 255);
|
|
checkEqual(expected, result, 3, "Mertens");
|
|
|
|
Mat uniform(100, 100, CV_8UC3);
|
|
uniform = Scalar(0, 255, 0);
|
|
|
|
images.clear();
|
|
images.push_back(uniform);
|
|
|
|
merge->process(images, result);
|
|
result.convertTo(result, CV_8UC3, 255);
|
|
checkEqual(uniform, result, 1e-2f, "Mertens");
|
|
}
|
|
|
|
TEST(Photo_MergeDebevec, regression)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
|
|
|
|
vector<Mat> images;
|
|
vector<float> times;
|
|
Mat response;
|
|
loadExposureSeq(test_path + "exposures/", images, times);
|
|
loadResponseCSV(test_path + "exposures/response.csv", response);
|
|
|
|
Ptr<MergeDebevec> merge = createMergeDebevec();
|
|
|
|
Mat result, expected;
|
|
loadImage(test_path + "merge/debevec.hdr", expected);
|
|
merge->process(images, result, times, response);
|
|
Ptr<Tonemap> map = createTonemap();
|
|
map->process(result, result);
|
|
map->process(expected, expected);
|
|
checkEqual(expected, result, 1e-2f, "Debevec");
|
|
}
|
|
|
|
TEST(Photo_MergeRobertson, regression)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
|
|
|
|
vector<Mat> images;
|
|
vector<float> times;
|
|
loadExposureSeq(test_path + "exposures/", images, times);
|
|
Ptr<MergeRobertson> merge = createMergeRobertson();
|
|
Mat result, expected;
|
|
loadImage(test_path + "merge/robertson.hdr", expected);
|
|
merge->process(images, result, times);
|
|
|
|
checkEqualRelativeToPixelMax(expected, result, 0.015, "MergeRobertson");
|
|
}
|
|
|
|
TEST(Photo_MergeDebevec, regression_depth_consistency)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
|
|
|
|
vector<Mat> images8;
|
|
vector<float> times;
|
|
loadExposureSeq(test_path + "exposures/", images8, times);
|
|
|
|
vector<Mat> images16(images8.size()), images32(images8.size());
|
|
for (size_t i = 0; i < images8.size(); ++i)
|
|
{
|
|
images8[i].convertTo(images16[i], CV_16UC3, 257.0);
|
|
images8[i].convertTo(images32[i], CV_32FC3, 1.0 / 255.0);
|
|
}
|
|
|
|
Ptr<MergeDebevec> merge = createMergeDebevec();
|
|
Ptr<Tonemap> map = createTonemap();
|
|
|
|
Mat hdr8, hdr16, hdr32;
|
|
merge->process(images8, hdr8, times);
|
|
merge->process(images16, hdr16, times);
|
|
merge->process(images32, hdr32, times);
|
|
|
|
map->process(hdr8, hdr8);
|
|
map->process(hdr16, hdr16);
|
|
map->process(hdr32, hdr32);
|
|
|
|
checkEqual(hdr8, hdr16, 2e-2f, "Debevec realdata 16U vs 8U");
|
|
checkEqual(hdr8, hdr32, 2e-2f, "Debevec realdata 32F vs 8U");
|
|
}
|
|
|
|
static void toGraySeq(const vector<Mat>& bgr, vector<Mat>& gray)
|
|
{
|
|
gray.resize(bgr.size());
|
|
for (size_t i = 0; i < bgr.size(); ++i)
|
|
cvtColor(bgr[i], gray[i], COLOR_BGR2GRAY);
|
|
}
|
|
|
|
static Mat linearResponseC1(int length)
|
|
{
|
|
Mat response(length, 1, CV_32FC1);
|
|
for (int i = 0; i < length; i++)
|
|
response.at<float>(i) = static_cast<float>(i);
|
|
response.at<float>(0) = response.at<float>(1);
|
|
return response;
|
|
}
|
|
|
|
TEST(Photo_MergeDebevec, regression_1channel)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
|
|
|
|
vector<Mat> images_bgr;
|
|
vector<float> times;
|
|
loadExposureSeq(test_path + "exposures/", images_bgr, times);
|
|
|
|
vector<Mat> images;
|
|
toGraySeq(images_bgr, images);
|
|
|
|
Ptr<MergeDebevec> merge = createMergeDebevec();
|
|
|
|
Mat result_default;
|
|
merge->process(images, result_default, times);
|
|
ASSERT_EQ(result_default.type(), CV_32FC1);
|
|
ASSERT_EQ(result_default.size(), images[0].size());
|
|
ASSERT_TRUE(cv::checkRange(result_default)) << "Debevec 1ch default produced non-finite values";
|
|
|
|
Mat result_linear;
|
|
merge->process(images, result_linear, times, linearResponseC1(256));
|
|
checkEqual(result_default, result_linear, 1e-5f, "Debevec 1ch default vs linear CRF");
|
|
|
|
Mat response3;
|
|
loadResponseCSV(test_path + "exposures/response.csv", response3);
|
|
Mat response1(256, 1, CV_32FC1);
|
|
for (int i = 0; i < 256; i++)
|
|
response1.at<float>(i) = response3.at<Vec3f>(i)[0];
|
|
Mat result_custom;
|
|
merge->process(images, result_custom, times, response1);
|
|
ASSERT_EQ(result_custom.type(), CV_32FC1);
|
|
ASSERT_TRUE(cv::checkRange(result_custom)) << "Debevec 1ch custom CRF produced non-finite values";
|
|
}
|
|
|
|
TEST(Photo_MergeDebevec, regression_1channel_depth_consistency)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
|
|
|
|
vector<Mat> images_bgr;
|
|
vector<float> times;
|
|
loadExposureSeq(test_path + "exposures/", images_bgr, times);
|
|
|
|
vector<Mat> images8;
|
|
toGraySeq(images_bgr, images8);
|
|
|
|
vector<Mat> images16(images8.size()), images32(images8.size());
|
|
for (size_t i = 0; i < images8.size(); ++i)
|
|
{
|
|
images8[i].convertTo(images16[i], CV_16UC1, 257.0);
|
|
images8[i].convertTo(images32[i], CV_32FC1, 1.0 / 255.0);
|
|
}
|
|
|
|
Ptr<MergeDebevec> debevec = createMergeDebevec();
|
|
Ptr<Tonemap> map = createTonemap();
|
|
|
|
Mat hdr8, hdr16, hdr32;
|
|
debevec->process(images8, hdr8, times);
|
|
debevec->process(images16, hdr16, times);
|
|
debevec->process(images32, hdr32, times);
|
|
ASSERT_TRUE(cv::checkRange(hdr8) && cv::checkRange(hdr16) && cv::checkRange(hdr32));
|
|
|
|
auto to3 = [](const Mat& c1) {
|
|
Mat c3;
|
|
std::vector<Mat> ch{c1, c1, c1};
|
|
cv::merge(ch, c3);
|
|
return c3;
|
|
};
|
|
Mat t8, t16, t32;
|
|
map->process(to3(hdr8), t8);
|
|
map->process(to3(hdr16), t16);
|
|
map->process(to3(hdr32), t32);
|
|
|
|
checkEqual(t8, t16, 2e-2f, "Debevec 1ch realdata 16U vs 8U");
|
|
checkEqual(t8, t32, 2e-2f, "Debevec 1ch realdata 32F vs 8U");
|
|
|
|
Mat hdr16_linear;
|
|
debevec->process(images16, hdr16_linear, times, linearResponseC1(65536));
|
|
checkEqual(hdr16, hdr16_linear, 1e-5f, "Debevec 1ch 16U default vs linear CRF");
|
|
}
|
|
|
|
TEST(Photo_MergeRobertson, regression_depth_consistency)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
|
|
|
|
vector<Mat> images8;
|
|
vector<float> times;
|
|
loadExposureSeq(test_path + "exposures/", images8, times);
|
|
|
|
vector<Mat> images16(images8.size()), images32(images8.size());
|
|
for (size_t i = 0; i < images8.size(); ++i)
|
|
{
|
|
images8[i].convertTo(images16[i], CV_16UC3, 257.0);
|
|
images8[i].convertTo(images32[i], CV_32FC3, 1.0 / 255.0);
|
|
}
|
|
|
|
Ptr<MergeRobertson> merge = createMergeRobertson();
|
|
Ptr<Tonemap> map = createTonemap();
|
|
|
|
Mat hdr8, hdr16, hdr32;
|
|
merge->process(images8, hdr8, times);
|
|
merge->process(images16, hdr16, times);
|
|
merge->process(images32, hdr32, times);
|
|
|
|
map->process(hdr8, hdr8);
|
|
map->process(hdr16, hdr16);
|
|
map->process(hdr32, hdr32);
|
|
|
|
checkEqual(hdr8, hdr16, 3e-2f, "Robertson realdata 16U vs 8U");
|
|
checkEqual(hdr8, hdr32, 3e-2f, "Robertson realdata 32F vs 8U");
|
|
}
|
|
|
|
TEST(Photo_CalibrateDebevec, regression)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
|
|
|
|
vector<Mat> images;
|
|
vector<float> times;
|
|
Mat response, expected;
|
|
loadExposureSeq(test_path + "exposures/", images, times);
|
|
loadResponseCSV(test_path + "calibrate/debevec.csv", expected);
|
|
Ptr<CalibrateDebevec> calibrate = createCalibrateDebevec();
|
|
calibrate->process(images, response, times);
|
|
Mat diff = abs(response - expected);
|
|
diff = diff.mul(1.0f / response);
|
|
double max;
|
|
minMaxLoc(diff, NULL, &max);
|
|
ASSERT_LT(max, 0.15);
|
|
}
|
|
|
|
TEST(Photo_CalibrateDebevec, middle_value_is_fixed)
|
|
{
|
|
// the response is normalized by g(LDR_SIZE / 2) = 0, i.e. response(128) == 1
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
|
|
|
|
vector<Mat> images;
|
|
vector<float> times;
|
|
Mat response;
|
|
loadExposureSeq(test_path + "exposures/", images, times);
|
|
Ptr<CalibrateDebevec> calibrate = createCalibrateDebevec();
|
|
calibrate->process(images, response, times);
|
|
Vec3f middle = response.at<Vec3f>(128);
|
|
for(int c = 0; c < 3; c++) {
|
|
EXPECT_NEAR(1.0f, middle[c], 1e-3f) << "channel=" << c;
|
|
}
|
|
}
|
|
|
|
TEST(Photo_CalibrateRobertson, regression)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
|
|
|
|
vector<Mat> images;
|
|
vector<float> times;
|
|
Mat response, expected;
|
|
loadExposureSeq(test_path + "exposures/", images, times);
|
|
loadResponseCSV(test_path + "calibrate/robertson.csv", expected);
|
|
|
|
Ptr<CalibrateRobertson> calibrate = createCalibrateRobertson();
|
|
calibrate->process(images, response, times);
|
|
checkEqual(expected, response, 1e-1f, "CalibrateRobertson");
|
|
}
|
|
|
|
TEST(Photo_CalibrateRobertson, bug_18180)
|
|
{
|
|
vector<Mat> images;
|
|
vector<cv::String> fn;
|
|
string test_path = cvtest::TS::ptr()->get_data_path() + "hdr/exposures/bug_18180/";
|
|
for(int i = 1; i <= 4; ++i)
|
|
images.push_back(imread(test_path + std::to_string(i) + ".jpg"));
|
|
vector<float> times {15.0f, 2.5f, 0.25f, 0.33f};
|
|
Mat response, expected;
|
|
Ptr<CalibrateRobertson> calibrate = createCalibrateRobertson(2, 0.01f);
|
|
calibrate->process(images, response, times);
|
|
Mat response_no_nans = response.clone();
|
|
patchNaNs(response_no_nans);
|
|
// since there should be no NaNs, original response vs. response with NaNs patched should be identical
|
|
EXPECT_EQ(0.0, cv::norm(response, response_no_nans, NORM_L2));
|
|
}
|
|
|
|
TEST(Photo_CalibrateDebevec, bug_24966)
|
|
{
|
|
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
|
|
vector<Mat> all_images;
|
|
vector<float> all_times;
|
|
loadExposureSeq(test_path + "exposures/", all_images, all_times);
|
|
vector<Mat> images;
|
|
vector<float> times;
|
|
for (int idx : {1, 2, 3, 4, 5}) {
|
|
images.push_back(all_images[idx]);
|
|
times.push_back(all_times[idx]);
|
|
}
|
|
Ptr<CalibrateDebevec> calibrate = createCalibrateDebevec();
|
|
Mat response, response_ext;
|
|
calibrate->process(images, response, times);
|
|
|
|
// #24966: pixels at 0 and 255 get (almost) zero weight, so a fully saturated and a fully black
|
|
// exposure only add zero-weight equations and must not change the response.
|
|
images.push_back(Mat(images[0].size(), images[0].type(), Scalar::all(255)));
|
|
times.push_back(times.front() * 2);
|
|
images.push_back(Mat(images[0].size(), images[0].type(), Scalar::all(0)));
|
|
times.push_back(times[4] / 2);
|
|
calibrate->process(images, response_ext, times);
|
|
|
|
double max_diff = cvtest::norm(response.rowRange(15, 240), response_ext.rowRange(15, 240), NORM_INF);
|
|
EXPECT_LT(max_diff, 0.5);
|
|
}
|
|
}} // namespace
|