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
ed0eb139
Commit
ed0eb139
authored
Sep 26, 2014
by
Adrien BAK
Committed by
Adrien BAK
Oct 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve decolor tests
parent
0a3aab28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
test_decolor.cpp
modules/photo/test/test_decolor.cpp
+7
-2
No files found.
modules/photo/test/test_decolor.cpp
View file @
ed0eb139
...
...
@@ -47,6 +47,7 @@
using
namespace
cv
;
using
namespace
std
;
static
const
double
numerical_precision
=
1.
;
TEST
(
Photo_Decolor
,
regression
)
{
...
...
@@ -61,7 +62,11 @@ TEST(Photo_Decolor, regression)
Mat
grayscale
,
color_boost
;
decolor
(
original
,
grayscale
,
color_boost
);
imwrite
(
folder
+
"grayscale.png"
,
grayscale
);
imwrite
(
folder
+
"color_boost.png"
,
color_boost
);
Mat
reference_grayscale
=
imread
(
folder
+
"grayscale_reference.png"
,
0
/* == grayscale image*/
);
double
error_grayscale
=
norm
(
reference_grayscale
,
grayscale
,
NORM_L1
);
EXPECT_LE
(
error_grayscale
,
numerical_precision
);
Mat
reference_boost
=
imread
(
folder
+
"boost_reference.png"
);
double
error_boost
=
norm
(
reference_boost
,
color_boost
,
NORM_L1
);
EXPECT_LE
(
error_boost
,
numerical_precision
);
}
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