};
//! the tonemapping algorithm
-enum tonemap_algorithms
+enum
{
TONEMAP_LINEAR,
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>());
CV_EXPORTS_W void exposureFusion(InputArrayOfArrays srcImgs, OutputArray dst, bool align = false, float wc = 1, float ws = 1, float we = 0);
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)
{
typedef void (*tonemap_func)(Mat&, Mat&, const std::vector<float>&);
float gamma = getParam(params, 0, 1.0f);
pow(dst, 1.0f / gamma, dst);
}
-}
\ No newline at end of file
+}
for(int i = TONEMAP_DURAND; i < TONEMAP_COUNT; i++) {
Mat result;
- tonemap(img, result, static_cast<tonemap_algorithms>(i), param);
+ tonemap(img, result, i, param);
result.convertTo(result, CV_8UC3, 255);
double max = 1.0;
minMaxLoc(abs(result - images[i]), NULL, &max);
Point calc = getExpShift(img, res, max_bits);
ASSERT_TRUE(calc == -shift);
}
-}
\ No newline at end of file
+}