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
3a1a3da7
Commit
3a1a3da7
authored
Apr 11, 2014
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tests
parent
f104d5be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
test_color.cpp
modules/imgproc/test/ocl/test_color.cpp
+1
-1
test_histogram.cpp
modules/imgproc/test/ocl/test_histogram.cpp
+18
-3
No files found.
modules/imgproc/test/ocl/test_color.cpp
View file @
3a1a3da7
...
...
@@ -158,7 +158,7 @@ OCL_TEST_P(CvtColor, YCrCb2BGRA) { performTest(3, 4, CVTCODE(YCrCb2BGR)); }
#if IPP_VERSION_X100 > 0
#define IPP_EPS depth <= CV_32S ? 1 : 4e-5
#else
#define IPP_EPS
0
#define IPP_EPS
1e-3
#endif
OCL_TEST_P
(
CvtColor
,
RGB2XYZ
)
{
performTest
(
3
,
3
,
CVTCODE
(
RGB2XYZ
),
IPP_EPS
);
}
...
...
modules/imgproc/test/ocl/test_histogram.cpp
View file @
3a1a3da7
...
...
@@ -146,7 +146,7 @@ PARAM_TEST_CASE(CalcBackProject, MatDepth, int, bool)
scale
=
randomDouble
(
0.1
,
1
);
}
v
irtual
v
oid
test_by_pict
()
void
test_by_pict
()
{
Mat
frame1
=
readImage
(
"optflow/RubberWhale1.png"
,
IMREAD_GRAYSCALE
);
...
...
@@ -174,8 +174,20 @@ PARAM_TEST_CASE(CalcBackProject, MatDepth, int, bool)
OCL_OFF
(
calcBackProject
(
&
frame1
,
1
,
0
,
hist1
,
dst1
,
&
ranges1
,
1
,
true
));
OCL_ON
(
calcBackProject
(
uims
,
chs
,
uhist1
,
udst1
,
urngs
,
1.0
));
if
(
cv
::
ocl
::
useOpenCL
()
&&
cv
::
ocl
::
Device
::
getDefault
().
isAMD
())
{
Size
dstSize
=
dst1
.
size
();
int
nDiffs
=
(
int
)(
0.03
f
*
dstSize
.
height
*
dstSize
.
width
);
//check if the dst mats are the same except 3% difference
EXPECT_MAT_N_DIFF
(
dst1
,
udst1
,
nDiffs
);
}
else
{
EXPECT_MAT_NEAR
(
dst1
,
udst1
,
0.0
);
}
}
};
//////////////////////////////// CalcBackProject //////////////////////////////////////////////
...
...
@@ -194,10 +206,13 @@ OCL_TEST_P(CalcBackProject, Mat)
//check if the dst mats are the same except 3% difference
EXPECT_MAT_N_DIFF
(
dst_roi
,
udst_roi
,
nDiffs
);
}
}
//check in addition on given image
OCL_TEST_P
(
CalcBackProject
,
Mat_RealImage
)
{
//check on given image
test_by_pict
();
}
}
//////////////////////////////// CalcHist //////////////////////////////////////////////
...
...
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