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
c9b5d8cf
Commit
c9b5d8cf
authored
Aug 06, 2014
by
Elena Gvozdeva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tests for ocl_filter2d, ocl_matchTemplate, ocl_histogram.cpp
parent
d30729a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
test_filter2d.cpp
modules/imgproc/test/ocl/test_filter2d.cpp
+1
-1
test_histogram.cpp
modules/imgproc/test/ocl/test_histogram.cpp
+6
-2
test_match_template.cpp
modules/imgproc/test/ocl/test_match_template.cpp
+9
-2
No files found.
modules/imgproc/test/ocl/test_filter2d.cpp
View file @
c9b5d8cf
...
@@ -125,7 +125,7 @@ OCL_INSTANTIATE_TEST_CASE_P(ImageProc, Filter2D,
...
@@ -125,7 +125,7 @@ OCL_INSTANTIATE_TEST_CASE_P(ImageProc, Filter2D,
Combine
(
Combine
(
Values
(
CV_8U
,
CV_16U
,
CV_32F
),
Values
(
CV_8U
,
CV_16U
,
CV_32F
),
OCL_ALL_CHANNELS
,
OCL_ALL_CHANNELS
,
Values
(
3
,
5
,
9
),
// Kernel size
Values
(
3
,
5
,
7
),
// Kernel size
Values
(
1
,
4
,
8
),
// Width mutiple
Values
(
1
,
4
,
8
),
// Width mutiple
Values
((
BorderType
)
BORDER_CONSTANT
,
Values
((
BorderType
)
BORDER_CONSTANT
,
(
BorderType
)
BORDER_REPLICATE
,
(
BorderType
)
BORDER_REPLICATE
,
...
...
modules/imgproc/test/ocl/test_histogram.cpp
View file @
c9b5d8cf
...
@@ -99,6 +99,10 @@ PARAM_TEST_CASE(CalcBackProject, MatDepth, int, bool)
...
@@ -99,6 +99,10 @@ PARAM_TEST_CASE(CalcBackProject, MatDepth, int, bool)
Size
roiSize
=
randomSize
(
1
,
MAX_VALUE
);
Size
roiSize
=
randomSize
(
1
,
MAX_VALUE
);
int
totalChannels
=
0
;
int
totalChannels
=
0
;
ranges
.
clear
();
channels
.
clear
();
for
(
int
i
=
0
;
i
<
N
;
++
i
)
for
(
int
i
=
0
;
i
<
N
;
++
i
)
{
{
Border
srcBorder
=
randomBorder
(
0
,
useRoi
?
MAX_VALUE
:
0
);
Border
srcBorder
=
randomBorder
(
0
,
useRoi
?
MAX_VALUE
:
0
);
...
@@ -202,9 +206,9 @@ OCL_TEST_P(CalcBackProject, Mat)
...
@@ -202,9 +206,9 @@ OCL_TEST_P(CalcBackProject, Mat)
OCL_ON
(
cv
::
calcBackProject
(
uimages_roi
,
channels
,
uhist_roi
,
udst_roi
,
ranges
,
scale
));
OCL_ON
(
cv
::
calcBackProject
(
uimages_roi
,
channels
,
uhist_roi
,
udst_roi
,
ranges
,
scale
));
Size
dstSize
=
dst_roi
.
size
();
Size
dstSize
=
dst_roi
.
size
();
int
nDiffs
=
(
int
)(
0.0
3
f
*
dstSize
.
height
*
dstSize
.
width
);
int
nDiffs
=
(
int
)(
0.0
6
f
*
dstSize
.
area
()
+
1
);
//check if the dst mats are the same except
3
% difference
//check if the dst mats are the same except
6
% difference
EXPECT_MAT_N_DIFF
(
dst_roi
,
udst_roi
,
nDiffs
);
EXPECT_MAT_N_DIFF
(
dst_roi
,
udst_roi
,
nDiffs
);
}
}
}
}
...
...
modules/imgproc/test/ocl/test_match_template.cpp
View file @
c9b5d8cf
...
@@ -99,7 +99,7 @@ PARAM_TEST_CASE(MatchTemplate, MatDepth, Channels, MatchTemplType, bool)
...
@@ -99,7 +99,7 @@ PARAM_TEST_CASE(MatchTemplate, MatDepth, Channels, MatchTemplType, bool)
void
Near
(
double
threshold
=
0.0
)
void
Near
(
double
threshold
=
0.0
)
{
{
OCL_EXPECT_MATS_NEAR
_RELATIVE
(
result
,
threshold
);
OCL_EXPECT_MATS_NEAR
(
result
,
threshold
);
}
}
};
};
...
@@ -112,7 +112,14 @@ OCL_TEST_P(MatchTemplate, Mat)
...
@@ -112,7 +112,14 @@ OCL_TEST_P(MatchTemplate, Mat)
OCL_OFF
(
cv
::
matchTemplate
(
image_roi
,
templ_roi
,
result_roi
,
method
));
OCL_OFF
(
cv
::
matchTemplate
(
image_roi
,
templ_roi
,
result_roi
,
method
));
OCL_ON
(
cv
::
matchTemplate
(
uimage_roi
,
utempl_roi
,
uresult_roi
,
method
));
OCL_ON
(
cv
::
matchTemplate
(
uimage_roi
,
utempl_roi
,
uresult_roi
,
method
));
Near
(
1.5e-4
);
bool
isNormed
=
method
==
TM_CCORR_NORMED
||
method
==
TM_SQDIFF_NORMED
||
method
==
TM_CCOEFF_NORMED
;
double
eps
=
isNormed
?
3e-2
:
255.0
*
255.0
*
templ
.
total
()
*
2e-5
;
Near
(
eps
);
}
}
}
}
...
...
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