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
280ecb68
Commit
280ecb68
authored
Oct 08, 2012
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed file path
parent
2759f026
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
test_color.cpp
modules/imgproc/test/test_color.cpp
+15
-8
No files found.
modules/imgproc/test/test_color.cpp
View file @
280ecb68
...
...
@@ -1697,21 +1697,27 @@ TEST(Imgproc_ColorBayerVNG, regression)
cvtest
::
TS
&
ts
=
*
cvtest
::
TS
::
ptr
();
Mat
given
=
imread
(
string
(
ts
.
get_data_path
())
+
"/cvtcolor/bayer_input.png"
,
CV_LOAD_IMAGE_GRAYSCALE
);
Mat
gold
=
imread
(
string
(
ts
.
get_data_path
())
+
"/cvtcolor/bayerVNG_gold.png"
,
CV_LOAD_IMAGE_UNCHANGED
);
string
goldfname
=
string
(
ts
.
get_data_path
())
+
"/cvtcolor/bayerVNG_gold.png"
;
Mat
gold
=
imread
(
goldfname
,
CV_LOAD_IMAGE_UNCHANGED
);
Mat
result
;
CV_Assert
(
given
.
data
!=
NULL
);
cvtColor
(
given
,
result
,
CV_BayerBG2BGR_VNG
,
3
);
EXPECT_EQ
(
gold
.
type
(),
result
.
type
());
EXPECT_EQ
(
gold
.
cols
,
result
.
cols
);
EXPECT_EQ
(
gold
.
rows
,
result
.
rows
);
if
(
gold
.
empty
())
imwrite
(
goldfname
,
result
);
else
{
EXPECT_EQ
(
gold
.
type
(),
result
.
type
());
EXPECT_EQ
(
gold
.
cols
,
result
.
cols
);
EXPECT_EQ
(
gold
.
rows
,
result
.
rows
);
Mat
diff
;
absdiff
(
gold
,
result
,
diff
);
Mat
diff
;
absdiff
(
gold
,
result
,
diff
);
EXPECT_EQ
(
0
,
countNonZero
(
diff
.
reshape
(
1
)
>
1
));
EXPECT_EQ
(
0
,
countNonZero
(
diff
.
reshape
(
1
)
>
1
));
}
}
TEST
(
Imgproc_ColorBayerVNG_Strict
,
regression
)
...
...
@@ -1719,7 +1725,7 @@ TEST(Imgproc_ColorBayerVNG_Strict, regression)
cvtest
::
TS
&
ts
=
*
cvtest
::
TS
::
ptr
();
const
char
pattern
[][
3
]
=
{
"bg"
,
"gb"
,
"rg"
,
"gr"
};
const
std
::
string
image_name
=
"lena.png"
;
const
std
::
string
parent_path
=
string
(
ts
.
get_data_path
())
+
"
.
/cvtcolor_strict/"
;
const
std
::
string
parent_path
=
string
(
ts
.
get_data_path
())
+
"/cvtcolor_strict/"
;
Mat
src
,
dst
,
bayer
,
reference
;
std
::
string
full_path
=
parent_path
+
image_name
;
...
...
@@ -1730,6 +1736,7 @@ TEST(Imgproc_ColorBayerVNG_Strict, regression)
{
ts
.
set_failed_test_info
(
cvtest
::
TS
::
FAIL_MISSING_TEST_DATA
);
ts
.
printf
(
cvtest
::
TS
::
SUMMARY
,
"No input image
\n
"
);
ts
.
set_gtest_status
();
return
;
}
...
...
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