Tonemapping documentation update
This commit is contained in:
parent
cb999a231e
commit
4c0f7f9e59
@ -19,17 +19,11 @@ Tonemaps image
|
||||
:param src: source image - 32-bit 3-channel Mat
|
||||
:param dst: destination image - 32-bit 3-channel Mat with values in [0, 1] range
|
||||
|
||||
TonemapLinear
|
||||
--------
|
||||
.. ocv:class:: TonemapLinear : public Tonemap
|
||||
|
||||
Simple linear mapper with gamma correction.
|
||||
|
||||
createTonemapLinear
|
||||
createTonemap
|
||||
------------------
|
||||
Creates TonemapLinear object
|
||||
Creates simple linear mapper with gamma correction
|
||||
|
||||
.. ocv:function:: Ptr<TonemapLinear> createTonemapLinear(float gamma = 1.0f);
|
||||
.. ocv:function:: Ptr<Tonemap> createTonemap(float gamma = 1.0f);
|
||||
|
||||
:param gamma: gamma value for gamma correction
|
||||
|
||||
@ -47,6 +41,8 @@ Creates TonemapDrago object
|
||||
|
||||
:param gamma: gamma value for gamma correction
|
||||
|
||||
:param saturation: saturation enhancement value
|
||||
|
||||
:param bias: value for bias function in [0, 1] range
|
||||
|
||||
TonemapDurand
|
||||
@ -61,15 +57,17 @@ createTonemapDurand
|
||||
------------------
|
||||
Creates TonemapDurand object
|
||||
|
||||
.. ocv:function:: Ptr<TonemapDurand> createTonemapDurand(float gamma = 1.0f, float contrast = 4.0f, float sigma_space = 2.0f, float sigma_color = 2.0f);
|
||||
.. ocv:function:: Ptr<TonemapDurand> createTonemapDurand(float gamma = 1.0f, float contrast = 4.0f, float saturation = 1.0f, float sigma_space = 2.0f, float sigma_color = 2.0f);
|
||||
|
||||
:param gamma: gamma value for gamma correction
|
||||
|
||||
:param contrast: resulting contrast on logarithmic scale
|
||||
|
||||
:param sigma_space: filter sigma in the color space
|
||||
:param saturation: saturation enhancement value
|
||||
|
||||
:param sigma_color: filter sigma in the coordinate space
|
||||
:param sigma_space: filter sigma in color space
|
||||
|
||||
:param sigma_color: filter sigma in coordinate space
|
||||
|
||||
TonemapReinhardDevlin
|
||||
--------
|
||||
@ -91,6 +89,24 @@ Creates TonemapReinhardDevlin object
|
||||
|
||||
:param color_adapt: chromatic adaptation in [0, 1] range. If 1 channels are treated independently, if 0 adaptation level is the same for each channel
|
||||
|
||||
TonemapMantiuk
|
||||
--------
|
||||
.. ocv:class:: TonemapMantiuk : public Tonemap
|
||||
|
||||
"Perceptual Framework for Contrast Processing of High Dynamic Range Images", Mantiuk et al., 2006
|
||||
|
||||
createTonemapMantiuk
|
||||
------------------
|
||||
Creates TonemapMantiuk object
|
||||
|
||||
.. ocv:function:: CV_EXPORTS_W Ptr<TonemapMantiuk> createTonemapMantiuk(float gamma = 1.0f, float scale = 0.7f, float saturation = 1.0f);
|
||||
|
||||
:param gamma: gamma value for gamma correction
|
||||
|
||||
:param scale: contrast scale factor
|
||||
|
||||
:param saturation: saturation enhancement value
|
||||
|
||||
ExposureAlign
|
||||
-------------
|
||||
.. ocv:class:: ExposureAlign : public Algorithm
|
||||
|
@ -126,7 +126,7 @@ public:
|
||||
};
|
||||
|
||||
CV_EXPORTS_W Ptr<TonemapDurand>
|
||||
createTonemapDurand(float gamma = 1.0f, float saturation = 1.0f, float contrast = 4.0f, float sigma_space = 2.0f, float sigma_color = 2.0f);
|
||||
createTonemapDurand(float gamma = 1.0f, float contrast = 4.0f, float saturation = 1.0f, float sigma_space = 2.0f, float sigma_color = 2.0f);
|
||||
|
||||
// "Dynamic Range Reduction Inspired by Photoreceptor Physiology", Reinhard, Devlin, 2005
|
||||
|
||||
@ -146,6 +146,8 @@ public:
|
||||
CV_EXPORTS_W Ptr<TonemapReinhardDevlin>
|
||||
createTonemapReinhardDevlin(float gamma = 1.0f, float intensity = 0.0f, float light_adapt = 1.0f, float color_adapt = 0.0f);
|
||||
|
||||
// "Perceptual Framework for Contrast Processing of High Dynamic Range Images", Mantiuk et al., 2006
|
||||
|
||||
class CV_EXPORTS_W TonemapMantiuk : public Tonemap
|
||||
{
|
||||
public:
|
||||
@ -166,6 +168,8 @@ public:
|
||||
const std::vector<float>& times, InputArray response) = 0;
|
||||
};
|
||||
|
||||
// "Fast, Robust Image Registration for Compositing High Dynamic Range Photographs from Handheld Exposures", Ward, 2003
|
||||
|
||||
class CV_EXPORTS_W AlignMTB : public ExposureAlign
|
||||
{
|
||||
public:
|
||||
@ -184,8 +188,6 @@ public:
|
||||
CV_WRAP virtual void setExcludeRange(int exclude_range) = 0;
|
||||
};
|
||||
|
||||
// "Fast, Robust Image Registration for Compositing High Dynamic Range Photographs from Handheld Exposures", Ward, 2003
|
||||
|
||||
CV_EXPORTS_W Ptr<AlignMTB> createAlignMTB(int max_bits = 6, int exclude_range = 4);
|
||||
|
||||
class CV_EXPORTS_W ExposureCalibrate : public Algorithm
|
||||
|
@ -183,10 +183,10 @@ Ptr<TonemapDrago> createTonemapDrago(float gamma, float saturation, float bias)
|
||||
class TonemapDurandImpl : public TonemapDurand
|
||||
{
|
||||
public:
|
||||
TonemapDurandImpl(float gamma, float saturation, float contrast, float sigma_color, float sigma_space) :
|
||||
TonemapDurandImpl(float gamma, float contrast, float saturation, float sigma_color, float sigma_space) :
|
||||
gamma(gamma),
|
||||
contrast(contrast),
|
||||
saturation(saturation),
|
||||
contrast(contrast),
|
||||
sigma_color(sigma_color),
|
||||
sigma_space(sigma_space),
|
||||
name("TonemapDurand")
|
||||
@ -260,9 +260,9 @@ protected:
|
||||
float gamma, saturation, contrast, sigma_color, sigma_space;
|
||||
};
|
||||
|
||||
Ptr<TonemapDurand> createTonemapDurand(float gamma, float saturation, float contrast, float sigma_color, float sigma_space)
|
||||
Ptr<TonemapDurand> createTonemapDurand(float gamma, float contrast, float saturation, float sigma_color, float sigma_space)
|
||||
{
|
||||
return new TonemapDurandImpl(gamma, saturation, contrast, sigma_color, sigma_space);
|
||||
return new TonemapDurandImpl(gamma, contrast, saturation, sigma_color, sigma_space);
|
||||
}
|
||||
|
||||
class TonemapReinhardDevlinImpl : public TonemapReinhardDevlin
|
||||
|
@ -97,7 +97,7 @@ TEST(Photo_Tonemap, regression)
|
||||
loadImage(test_path + "image.hdr", img);
|
||||
float gamma = 2.2f;
|
||||
|
||||
Ptr<Tonemap> linear = createTonemapLinear(gamma);
|
||||
Ptr<Tonemap> linear = createTonemap(gamma);
|
||||
linear->process(img, result);
|
||||
loadImage(test_path + "linear.png", expected);
|
||||
result.convertTo(result, CV_8UC3, 255);
|
||||
|
Loading…
x
Reference in New Issue
Block a user