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
ee4b78fc
Commit
ee4b78fc
authored
Oct 19, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: change condition in Photo_Decolor
parent
4439ba09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
test_decolor.cpp
modules/photo/test/test_decolor.cpp
+5
-7
No files found.
modules/photo/test/test_decolor.cpp
View file @
ee4b78fc
...
...
@@ -47,8 +47,6 @@
using
namespace
cv
;
using
namespace
std
;
static
const
double
numerical_precision
=
10.
;
TEST
(
Photo_Decolor
,
regression
)
{
string
folder
=
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"decolor/"
;
...
...
@@ -57,16 +55,16 @@ TEST(Photo_Decolor, regression)
Mat
original
=
imread
(
original_path
,
IMREAD_COLOR
);
ASSERT_FALSE
(
original
.
empty
())
<<
"Could not load input image "
<<
original_path
;
ASSERT_
FALSE
(
original
.
channels
()
!=
3
)
<<
"Load color input image "
<<
original_path
;
ASSERT_
EQ
(
3
,
original
.
channels
()
)
<<
"Load color input image "
<<
original_path
;
Mat
grayscale
,
color_boost
;
decolor
(
original
,
grayscale
,
color_boost
);
Mat
reference_grayscale
=
imread
(
folder
+
"grayscale_reference.png"
,
0
/* == grayscale image*/
);
double
error_grayscale
=
cvtest
::
norm
(
reference_grayscale
,
grayscale
,
NORM_L1
);
EXPECT_
LE
(
error_grayscale
,
numerical_precision
);
double
gray_psnr
=
cvtest
::
PSNR
(
reference_grayscale
,
grayscale
);
EXPECT_
GT
(
gray_psnr
,
60.0
);
Mat
reference_boost
=
imread
(
folder
+
"boost_reference.png"
);
double
error_boost
=
cvtest
::
norm
(
reference_boost
,
color_boost
,
NORM_L1
);
EXPECT_
LE
(
error_boost
,
numerical_precision
);
double
boost_psnr
=
cvtest
::
PSNR
(
reference_boost
,
color_boost
);
EXPECT_
GT
(
boost_psnr
,
60.0
);
}
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