Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
4c0f7f9e
Commit
4c0f7f9e
authored
Aug 05, 2013
by
Fedor Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tonemapping documentation update
parent
cb999a23
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
20 deletions
+38
-20
hdr_imaging.rst
modules/photo/doc/hdr_imaging.rst
+28
-12
photo.hpp
modules/photo/include/opencv2/photo.hpp
+5
-3
tonemap.cpp
modules/photo/src/tonemap.cpp
+4
-4
test_hdr.cpp
modules/photo/test/test_hdr.cpp
+1
-1
No files found.
modules/photo/doc/hdr_imaging.rst
View file @
4c0f7f9e
...
...
@@ -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<Tonemap
Linear> 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 s
aturation = 1.0f, float s
igma_space = 2.0f, float sigma_color = 2.0f);
:param gamma: gamma value for gamma correction
:param contrast: resulting contrast on logarithmic scale
:param s
igma_space: filter sigma in the color spac
e
:param s
aturation: saturation enhancement valu
e
: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
...
...
modules/photo/include/opencv2/photo.hpp
View file @
4c0f7f9e
...
...
@@ -126,7 +126,7 @@ public:
};
CV_EXPORTS_W
Ptr
<
TonemapDurand
>
createTonemapDurand
(
float
gamma
=
1.0
f
,
float
saturation
=
1.0
f
,
float
contrast
=
4
.0
f
,
float
sigma_space
=
2.0
f
,
float
sigma_color
=
2.0
f
);
createTonemapDurand
(
float
gamma
=
1.0
f
,
float
contrast
=
4.0
f
,
float
saturation
=
1
.0
f
,
float
sigma_space
=
2.0
f
,
float
sigma_color
=
2.0
f
);
// "Dynamic Range Reduction Inspired by Photoreceptor Physiology", Reinhard, Devlin, 2005
...
...
@@ -146,6 +146,8 @@ public:
CV_EXPORTS_W
Ptr
<
TonemapReinhardDevlin
>
createTonemapReinhardDevlin
(
float
gamma
=
1.0
f
,
float
intensity
=
0.0
f
,
float
light_adapt
=
1.0
f
,
float
color_adapt
=
0.0
f
);
// "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
...
...
modules/photo/src/tonemap.cpp
View file @
4c0f7f9e
...
...
@@ -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
),
saturation
(
saturation
),
contrast
(
contrast
),
saturation
(
saturation
),
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
...
...
modules/photo/test/test_hdr.cpp
View file @
4c0f7f9e
...
...
@@ -97,7 +97,7 @@ TEST(Photo_Tonemap, regression)
loadImage
(
test_path
+
"image.hdr"
,
img
);
float
gamma
=
2.2
f
;
Ptr
<
Tonemap
>
linear
=
createTonemap
Linear
(
gamma
);
Ptr
<
Tonemap
>
linear
=
createTonemap
(
gamma
);
linear
->
process
(
img
,
result
);
loadImage
(
test_path
+
"linear.png"
,
expected
);
result
.
convertTo
(
result
,
CV_8UC3
,
255
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment