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
cb6ea8bf
Commit
cb6ea8bf
authored
Oct 26, 2013
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocl: update filter tests
parent
766a3511
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
test_filters.cpp
modules/ocl/test/test_filters.cpp
+0
-0
utility.hpp
modules/ocl/test/utility.hpp
+14
-0
No files found.
modules/ocl/test/test_filters.cpp
View file @
cb6ea8bf
This diff is collapsed.
Click to expand it.
modules/ocl/test/utility.hpp
View file @
cb6ea8bf
...
@@ -72,6 +72,13 @@ double checkNorm(const cv::Mat &m);
...
@@ -72,6 +72,13 @@ double checkNorm(const cv::Mat &m);
double
checkNorm
(
const
cv
::
Mat
&
m1
,
const
cv
::
Mat
&
m2
);
double
checkNorm
(
const
cv
::
Mat
&
m1
,
const
cv
::
Mat
&
m2
);
double
checkSimilarity
(
const
cv
::
Mat
&
m1
,
const
cv
::
Mat
&
m2
);
double
checkSimilarity
(
const
cv
::
Mat
&
m1
,
const
cv
::
Mat
&
m2
);
inline
double
checkNormRelative
(
const
Mat
&
m1
,
const
Mat
&
m2
)
{
return
cv
::
norm
(
m1
,
m2
,
cv
::
NORM_INF
)
/
std
::
max
((
double
)
std
::
numeric_limits
<
float
>::
epsilon
(),
(
double
)
std
::
max
(
cv
::
norm
(
m1
,
cv
::
NORM_INF
),
norm
(
m2
,
cv
::
NORM_INF
)));
}
#define EXPECT_MAT_NORM(mat, eps) \
#define EXPECT_MAT_NORM(mat, eps) \
{ \
{ \
EXPECT_LE(checkNorm(cv::Mat(mat)), eps) \
EXPECT_LE(checkNorm(cv::Mat(mat)), eps) \
...
@@ -84,6 +91,13 @@ double checkSimilarity(const cv::Mat &m1, const cv::Mat &m2);
...
@@ -84,6 +91,13 @@ double checkSimilarity(const cv::Mat &m1, const cv::Mat &m2);
EXPECT_LE(checkNorm(cv::Mat(mat1), cv::Mat(mat2)), eps); \
EXPECT_LE(checkNorm(cv::Mat(mat1), cv::Mat(mat2)), eps); \
}
}
#define EXPECT_MAT_NEAR_RELATIVE(mat1, mat2, eps) \
{ \
ASSERT_EQ(mat1.type(), mat2.type()); \
ASSERT_EQ(mat1.size(), mat2.size()); \
EXPECT_LE(checkNormRelative(cv::Mat(mat1), cv::Mat(mat2)), eps); \
}
#define EXPECT_MAT_SIMILAR(mat1, mat2, eps) \
#define EXPECT_MAT_SIMILAR(mat1, mat2, eps) \
{ \
{ \
ASSERT_EQ(mat1.type(), mat2.type()); \
ASSERT_EQ(mat1.type(), mat2.type()); \
...
...
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