INPAINT_TELEA = 1 // A. Telea algorithm
};
-CV_EXPORTS_W bool initModule_photo();
-
//! restores the damaged image areas using one of the available intpainting algorithms
CV_EXPORTS_W void inpaint( InputArray src, InputArray inpaintMask,
OutputArray dst, double inpaintRadius, int flags );
CV_WRAP virtual void setGamma(float gamma) = 0;
};
-class CV_EXPORTS_W TonemapLinear : public Tonemap
-{
-};
-
-CV_EXPORTS_W Ptr<TonemapLinear> createTonemapLinear(float gamma = 1.0f);
+CV_EXPORTS_W Ptr<Tonemap> createTonemapLinear(float gamma = 1.0f);
// "Adaptive Logarithmic Mapping For Displaying HighContrast Scenes", Drago et al., 2003
class CV_EXPORTS_W AlignMTB : public ExposureAlign
{
public:
- CV_WRAP virtual void process(InputArrayOfArrays src, OutputArrayOfArrays dst,
- const std::vector<float>& times, InputArray response) = 0;
+ CV_WRAP virtual void process(InputArrayOfArrays src, OutputArrayOfArrays dst,
+ const std::vector<float>& times, InputArray response) = 0;
- CV_WRAP virtual void process(InputArrayOfArrays src, OutputArrayOfArrays dst) = 0;
+ CV_WRAP virtual void process(InputArrayOfArrays src, OutputArrayOfArrays dst) = 0;
CV_WRAP virtual void calculateShift(InputArray img0, InputArray img1, Point& shift) = 0;
CV_WRAP virtual void shiftMat(InputArray src, OutputArray dst, const Point shift) = 0;
{
public:
CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst,
- const std::vector<float>& times, InputArray response) = 0;
+ const std::vector<float>& times, InputArray response) = 0;
};
// "Recovering High Dynamic Range Radiance Maps from Photographs", Debevec, Malik, 1997
class CV_EXPORTS_W MergeDebevec : public ExposureMerge
{
public:
- CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst,
- const std::vector<float>& times, InputArray response) = 0;
+ CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst,
+ const std::vector<float>& times, InputArray response) = 0;
CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst, const std::vector<float>& times) = 0;
};
class CV_EXPORTS_W MergeMertens : public ExposureMerge
{
public:
- CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst,
- const std::vector<float>& times, InputArray response) = 0;
+ CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst,
+ const std::vector<float>& times, InputArray response) = 0;
CV_WRAP virtual void process(InputArrayOfArrays src, OutputArray dst) = 0;
CV_WRAP virtual float getContrastWeight() const = 0;
// License Agreement
// For Open Source Computer Vision Library
//
-// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
-// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
return new AlignMTBImpl(max_bits, exclude_range);
}
-}
\ No newline at end of file
+}
// License Agreement
// For Open Source Computer Vision Library
//
-// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
-// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
return w;
}
-};
\ No newline at end of file
+};
// License Agreement
// For Open Source Computer Vision Library
//
-// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
-// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
};
-#endif
\ No newline at end of file
+#endif
// License Agreement
// For Open Source Computer Vision Library
//
-// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
-// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
return new MergeMertensImpl(wcon, wsat, wexp);
}
-}
\ No newline at end of file
+}
// License Agreement
// For Open Source Computer Vision Library
//
-// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
-// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
namespace cv
{
-class TonemapLinearImpl : public TonemapLinear
+class TonemapLinearImpl : public Tonemap
{
public:
TonemapLinearImpl(float gamma) : gamma(gamma), name("TonemapLinear")
float gamma;
};
-Ptr<TonemapLinear> createTonemapLinear(float gamma)
+Ptr<Tonemap> createTonemapLinear(float gamma)
{
return new TonemapLinearImpl(gamma);
}
_dst.create(src.size(), CV_32FC3);
Mat img = _dst.getMat();
- Ptr<TonemapLinear> linear = createTonemapLinear(1.0f);
+ Ptr<Tonemap> linear = createTonemapLinear(1.0f);
linear->process(src, img);
Mat gray_img;
_dst.create(src.size(), CV_32FC3);
Mat img = _dst.getMat();
- Ptr<TonemapLinear> linear = createTonemapLinear(1.0f);
+ Ptr<Tonemap> linear = createTonemapLinear(1.0f);
linear->process(src, img);
Mat gray_img;
return new TonemapReinhardDevlinImpl(gamma, contrast, sigma_color, sigma_space);
}
-}
\ No newline at end of file
+}
// License Agreement
// For Open Source Computer Vision Library
//
-// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
-// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
+// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
ASSERT_FALSE(max > threshold) << max;
}
-void loadExposureSeq(String path, vector<Mat>& images, vector<float>& times = vector<float>())
+static vector<float> DEFAULT_VECTOR;
+void loadExposureSeq(String path, vector<Mat>& images, vector<float>& times = DEFAULT_VECTOR)
{
- ifstream list_file(path + "list.txt");
+ ifstream list_file((path + "list.txt").c_str());
ASSERT_TRUE(list_file.is_open());
string name;
float val;
void loadResponseCSV(String path, Mat& response)
{
response = Mat(256, 3, CV_32F);
- ifstream resp_file(path);
+ ifstream resp_file(path.c_str());
for(int i = 0; i < 256; i++) {
for(int channel = 0; channel < 3; channel++) {
resp_file >> response.at<float>(i, channel);
float gamma = 2.2f;
test_path += "tonemap/";
- Ptr<TonemapLinear> linear = createTonemapLinear(gamma);
+ Ptr<Tonemap> linear = createTonemapLinear(gamma);
linear->process(img, result);
loadImage(test_path + "linear.png", expected);
result.convertTo(result, CV_8UC3, 255);
string test_path = string(cvtest::TS::ptr()->get_data_path()) + "hdr/";
vector<Mat> images;
- loadExposureSeq(test_path + "exposures/", images);
+ loadExposureSeq((test_path + "exposures/").c_str() , images);
Ptr<MergeMertens> merge = createMergeMertens();
typedef Ptr<StereoBM> Ptr_StereoBM;
typedef Ptr<StereoSGBM> Ptr_StereoSGBM;
+typedef Ptr<Tonemap> Ptr_Tonemap;
+typedef Ptr<TonemapDrago> Ptr_TonemapDrago;
+typedef Ptr<TonemapReinhardDevlin> Ptr_TonemapReinhardDevlin;
+typedef Ptr<TonemapDurand> Ptr_TonemapDurand;
+typedef Ptr<AlignMTB> Ptr_AlignMTB;
+typedef Ptr<CalibrateDebevec> Ptr_CalibrateDebevec;
+typedef Ptr<MergeDebevec> Ptr_MergeDebevec;
+typedef Ptr<MergeMertens> Ptr_MergeMertens;
+
typedef Ptr<cv::softcascade::ChannelFeatureBuilder> Ptr_ChannelFeatureBuilder;
typedef SimpleBlobDetector::Params SimpleBlobDetector_Params;