Commit 707048f6 authored by Alexander Shishkov's avatar Alexander Shishkov

removed tonemap_algorithms due to wrapping problems

parent 8ccca90d
...@@ -60,7 +60,7 @@ enum ...@@ -60,7 +60,7 @@ enum
}; };
//! the tonemapping algorithm //! the tonemapping algorithm
enum tonemap_algorithms enum
{ {
TONEMAP_LINEAR, TONEMAP_LINEAR,
...@@ -96,7 +96,7 @@ CV_EXPORTS_W void fastNlMeansDenoisingColoredMulti( InputArrayOfArrays srcImgs, ...@@ -96,7 +96,7 @@ CV_EXPORTS_W void fastNlMeansDenoisingColoredMulti( InputArrayOfArrays srcImgs,
CV_EXPORTS_W void makeHDR(InputArrayOfArrays srcImgs, const std::vector<float>& exp_times, OutputArray dst, bool align = false); CV_EXPORTS_W void makeHDR(InputArrayOfArrays srcImgs, const std::vector<float>& exp_times, OutputArray dst, bool align = false);
CV_EXPORTS_W void tonemap(InputArray src, OutputArray dst, tonemap_algorithms algorithm, CV_EXPORTS_W void tonemap(InputArray src, OutputArray dst, int algorithm,
const std::vector<float>& params = std::vector<float>()); const std::vector<float>& params = std::vector<float>());
CV_EXPORTS_W void exposureFusion(InputArrayOfArrays srcImgs, OutputArray dst, bool align = false, float wc = 1, float ws = 1, float we = 0); CV_EXPORTS_W void exposureFusion(InputArrayOfArrays srcImgs, OutputArray dst, bool align = false, float wc = 1, float ws = 1, float we = 0);
......
...@@ -155,7 +155,7 @@ static void DurandMap(Mat& src_img, Mat& dst_img, const std::vector<float>& para ...@@ -155,7 +155,7 @@ static void DurandMap(Mat& src_img, Mat& dst_img, const std::vector<float>& para
merge(channels, dst_img); merge(channels, dst_img);
} }
void tonemap(InputArray _src, OutputArray _dst, tonemap_algorithms algorithm, void tonemap(InputArray _src, OutputArray _dst, int algorithm,
const std::vector<float>& params) const std::vector<float>& params)
{ {
typedef void (*tonemap_func)(Mat&, Mat&, const std::vector<float>&); typedef void (*tonemap_func)(Mat&, Mat&, const std::vector<float>&);
...@@ -188,4 +188,4 @@ void tonemap(InputArray _src, OutputArray _dst, tonemap_algorithms algorithm, ...@@ -188,4 +188,4 @@ void tonemap(InputArray _src, OutputArray _dst, tonemap_algorithms algorithm,
float gamma = getParam(params, 0, 1.0f); float gamma = getParam(params, 0, 1.0f);
pow(dst, 1.0f / gamma, dst); pow(dst, 1.0f / gamma, dst);
} }
} }
\ No newline at end of file
...@@ -111,7 +111,7 @@ TEST(Photo_Tonemap, regression) ...@@ -111,7 +111,7 @@ TEST(Photo_Tonemap, regression)
for(int i = TONEMAP_DURAND; i < TONEMAP_COUNT; i++) { for(int i = TONEMAP_DURAND; i < TONEMAP_COUNT; i++) {
Mat result; Mat result;
tonemap(img, result, static_cast<tonemap_algorithms>(i), param); tonemap(img, result, i, param);
result.convertTo(result, CV_8UC3, 255); result.convertTo(result, CV_8UC3, 255);
double max = 1.0; double max = 1.0;
minMaxLoc(abs(result - images[i]), NULL, &max); minMaxLoc(abs(result - images[i]), NULL, &max);
...@@ -140,4 +140,4 @@ TEST(Photo_Align, regression) ...@@ -140,4 +140,4 @@ TEST(Photo_Align, regression)
Point calc = getExpShift(img, res, max_bits); Point calc = getExpShift(img, res, max_bits);
ASSERT_TRUE(calc == -shift); ASSERT_TRUE(calc == -shift);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment