Mantiuk's tonemapping

This commit is contained in:
Fedor Morozov
2013-08-05 19:22:42 +04:00
parent c51b50b44c
commit 17609b90c7
9 changed files with 835 additions and 630 deletions

View File

@@ -91,12 +91,11 @@ void loadResponseCSV(String path, Mat& response)
TEST(Photo_Tonemap, regression)
{
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/tonemap/";
Mat img, expected, result;
loadImage(test_path + "rle.hdr", img);
loadImage(test_path + "image.hdr", img);
float gamma = 2.2f;
test_path += "tonemap/";
Ptr<TonemapLinear> linear = createTonemapLinear(gamma);
linear->process(img, result);
@@ -121,6 +120,12 @@ TEST(Photo_Tonemap, regression)
loadImage(test_path + "reinharddevlin.png", expected);
result.convertTo(result, CV_8UC3, 255);
checkEqual(result, expected, 0);
Ptr<TonemapMantiuk> mantiuk = createTonemapMantiuk(gamma);
mantiuk->process(img, result);
loadImage(test_path + "mantiuk.png", expected);
result.convertTo(result, CV_8UC3, 255);
checkEqual(result, expected, 0);
}
TEST(Photo_AlignMTB, regression)