removed tonemap_algorithms due to wrapping problems
authorAlexander Shishkov <alexander.shishkov@itseez.com>
Wed, 17 Jul 2013 20:55:39 +0000 (00:55 +0400)
committerAlexander Shishkov <alexander.shishkov@itseez.com>
Wed, 17 Jul 2013 20:55:39 +0000 (00:55 +0400)
modules/photo/include/opencv2/photo.hpp
modules/photo/src/tonemap.cpp
modules/photo/test/test_hdr.cpp

index 1d85a87..b3d3aaf 100644 (file)
@@ -60,7 +60,7 @@ enum
 };
 
 //! the tonemapping algorithm
-enum tonemap_algorithms
+enum
 {
        TONEMAP_LINEAR,
 
@@ -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 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);
index d3ab246..1f05586 100644 (file)
@@ -155,7 +155,7 @@ static void DurandMap(Mat& src_img, Mat& dst_img, const std::vector<float>& para
     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>&);
@@ -188,4 +188,4 @@ void tonemap(InputArray _src, OutputArray _dst, tonemap_algorithms algorithm,
     float gamma = getParam(params, 0, 1.0f);           
     pow(dst, 1.0f / gamma, dst);                       
 }
-}
\ No newline at end of file
+}
index 5ea77eb..1db6171 100644 (file)
@@ -111,7 +111,7 @@ TEST(Photo_Tonemap, regression)
        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);
@@ -140,4 +140,4 @@ TEST(Photo_Align, regression)
                Point calc = getExpShift(img, res, max_bits);
                ASSERT_TRUE(calc == -shift);
        }
-}
\ No newline at end of file
+}