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
5fa6d70a
Commit
5fa6d70a
authored
Oct 29, 2013
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Oct 29, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1695 from ilya-lavrenov:ocl_showDiff
parents
529f086b
eb2f8a29
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
utility.cpp
modules/ocl/test/utility.cpp
+12
-8
utility.hpp
modules/ocl/test/utility.hpp
+1
-1
No files found.
modules/ocl/test/utility.cpp
View file @
5fa6d70a
...
...
@@ -231,21 +231,25 @@ double checkRectSimilarity(Size sz, std::vector<Rect>& ob1, std::vector<Rect>& o
return
final_test_result
;
}
void
showDiff
(
const
Mat
&
gold
,
const
Mat
&
actual
,
double
eps
)
void
showDiff
(
const
Mat
&
gold
,
const
Mat
&
actual
,
double
eps
,
bool
alwaysShow
)
{
Mat
diff
;
absdiff
(
gold
,
actual
,
diff
);
diff
.
convertTo
(
diff
,
CV_32F
);
threshold
(
diff
,
diff
,
eps
,
255.0
,
cv
::
THRESH_BINARY
);
namedWindow
(
"gold"
,
WINDOW_NORMAL
);
namedWindow
(
"actual"
,
WINDOW_NORMAL
);
namedWindow
(
"diff"
,
WINDOW_NORMAL
);
if
(
alwaysShow
||
cv
::
countNonZero
(
diff
.
reshape
(
1
))
>
0
)
{
namedWindow
(
"gold"
,
WINDOW_NORMAL
);
namedWindow
(
"actual"
,
WINDOW_NORMAL
);
namedWindow
(
"diff"
,
WINDOW_NORMAL
);
imshow
(
"gold"
,
gold
);
imshow
(
"actual"
,
actual
);
imshow
(
"diff"
,
diff
);
imshow
(
"gold"
,
gold
);
imshow
(
"actual"
,
actual
);
imshow
(
"diff"
,
diff
);
waitKey
();
waitKey
();
}
}
}
// namespace cvtest
modules/ocl/test/utility.hpp
View file @
5fa6d70a
...
...
@@ -52,7 +52,7 @@ extern int LOOP_TIMES;
namespace
cvtest
{
void
showDiff
(
const
Mat
&
gold
,
const
Mat
&
actual
,
double
eps
);
void
showDiff
(
const
Mat
&
gold
,
const
Mat
&
actual
,
double
eps
,
bool
alwaysShow
=
false
);
cv
::
ocl
::
oclMat
createMat_ocl
(
cv
::
RNG
&
rng
,
Size
size
,
int
type
,
bool
useRoi
);
cv
::
ocl
::
oclMat
loadMat_ocl
(
cv
::
RNG
&
rng
,
const
Mat
&
m
,
bool
useRoi
);
...
...
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