|
|
@ -208,17 +208,12 @@ TEST(Photo_MergeRobertson, regression) |
|
|
|
vector<Mat> images; |
|
|
|
vector<Mat> images; |
|
|
|
vector<float> times; |
|
|
|
vector<float> times; |
|
|
|
loadExposureSeq(test_path + "exposures/", images, times); |
|
|
|
loadExposureSeq(test_path + "exposures/", images, times); |
|
|
|
|
|
|
|
|
|
|
|
Ptr<MergeRobertson> merge = createMergeRobertson(); |
|
|
|
Ptr<MergeRobertson> merge = createMergeRobertson(); |
|
|
|
|
|
|
|
|
|
|
|
Mat result, expected; |
|
|
|
Mat result, expected; |
|
|
|
loadImage(test_path + "merge/robertson.hdr", expected); |
|
|
|
loadImage(test_path + "merge/robertson.hdr", expected); |
|
|
|
merge->process(images, result, times); |
|
|
|
merge->process(images, result, times); |
|
|
|
Ptr<Tonemap> map = createTonemap(); |
|
|
|
|
|
|
|
map->process(result, result); |
|
|
|
|
|
|
|
map->process(expected, expected); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
checkEqual(expected, result, 1e-2f, "MergeRobertson"); |
|
|
|
checkEqual(expected, result, 5.f, "MergeRobertson"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TEST(Photo_CalibrateDebevec, regression) |
|
|
|
TEST(Photo_CalibrateDebevec, regression) |
|
|
@ -252,5 +247,5 @@ TEST(Photo_CalibrateRobertson, regression) |
|
|
|
|
|
|
|
|
|
|
|
Ptr<CalibrateRobertson> calibrate = createCalibrateRobertson(); |
|
|
|
Ptr<CalibrateRobertson> calibrate = createCalibrateRobertson(); |
|
|
|
calibrate->process(images, response, times); |
|
|
|
calibrate->process(images, response, times); |
|
|
|
checkEqual(expected, response, 1e-3f, "CalibrateRobertson"); |
|
|
|
checkEqual(expected, response, 1e-1f, "CalibrateRobertson"); |
|
|
|
} |
|
|
|
} |
|
|
|