Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
a1cece73
Commit
a1cece73
authored
Dec 29, 2019
by
shimat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swap sigma_color and sigma_space
Update test_hdr.cpp Update test_hdr.cpp
parent
91b39aa0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
3 deletions
+31
-3
tonemap.hpp
modules/xphoto/include/opencv2/xphoto/tonemap.hpp
+3
-3
test_hdr.cpp
modules/xphoto/test/test_hdr.cpp
+28
-0
No files found.
modules/xphoto/include/opencv2/xphoto/tonemap.hpp
View file @
a1cece73
...
...
@@ -46,11 +46,11 @@ You need to set the OPENCV_ENABLE_NONFREE option in cmake to use those. Use them
@param contrast resulting contrast on logarithmic scale, i. e. log(max / min), where max and min
are maximum and minimum luminance values of the resulting image.
@param saturation saturation enhancement value. See createTonemapDrago
@param sigma_
space
bilateral filter sigma in color space
@param sigma_
color
bilateral filter sigma in coordinate space
@param sigma_
color
bilateral filter sigma in color space
@param sigma_
space
bilateral filter sigma in coordinate space
*/
CV_EXPORTS_W
Ptr
<
TonemapDurand
>
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
);
createTonemapDurand
(
float
gamma
=
1.0
f
,
float
contrast
=
4.0
f
,
float
saturation
=
1.0
f
,
float
sigma_
color
=
2.0
f
,
float
sigma_space
=
2.0
f
);
}}
// namespace
#endif // OPENCV_XPHOTO_TONEMAP_HPP
modules/xphoto/test/test_hdr.cpp
View file @
a1cece73
...
...
@@ -38,6 +38,34 @@ TEST(Photo_Tonemap, Durand_regression)
checkEqual
(
result
,
expected
,
3
,
"Durand"
);
}
TEST
(
Photo_Tonemap
,
Durand_property_regression
)
{
const
float
gamma
=
1.0
f
;
const
float
contrast
=
2.0
f
;
const
float
saturation
=
3.0
f
;
const
float
sigma_color
=
4.0
f
;
const
float
sigma_space
=
5.0
f
;
const
Ptr
<
TonemapDurand
>
durand1
=
createTonemapDurand
(
gamma
,
contrast
,
saturation
,
sigma_color
,
sigma_space
);
ASSERT_EQ
(
gamma
,
durand1
->
getGamma
());
ASSERT_EQ
(
contrast
,
durand1
->
getContrast
());
ASSERT_EQ
(
saturation
,
durand1
->
getSaturation
());
ASSERT_EQ
(
sigma_space
,
durand1
->
getSigmaSpace
());
ASSERT_EQ
(
sigma_color
,
durand1
->
getSigmaColor
());
const
Ptr
<
TonemapDurand
>
durand2
=
createTonemapDurand
();
durand2
->
setGamma
(
gamma
);
durand2
->
setContrast
(
contrast
);
durand2
->
setSaturation
(
saturation
);
durand2
->
setSigmaColor
(
sigma_color
);
durand2
->
setSigmaSpace
(
sigma_space
);
ASSERT_EQ
(
gamma
,
durand2
->
getGamma
());
ASSERT_EQ
(
contrast
,
durand2
->
getContrast
());
ASSERT_EQ
(
saturation
,
durand2
->
getSaturation
());
ASSERT_EQ
(
sigma_color
,
durand2
->
getSigmaColor
());
ASSERT_EQ
(
sigma_space
,
durand2
->
getSigmaSpace
());
}
#endif // OPENCV_ENABLE_NONFREE
}}
// namespace
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