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
4eda8efd
Commit
4eda8efd
authored
May 23, 2017
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolves
https://github.com/opencv/opencv/issues/7792
parent
b59df667
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
arithm.cpp
modules/core/src/arithm.cpp
+1
-1
test_arithm.cpp
modules/core/test/test_arithm.cpp
+10
-0
No files found.
modules/core/src/arithm.cpp
View file @
4eda8efd
...
...
@@ -1276,7 +1276,7 @@ void cv::compare(InputArray _src1, InputArray _src2, OutputArray _dst, int op)
src1
=
src1
.
reshape
(
1
);
src2
=
src2
.
reshape
(
1
);
Mat
dst
=
_dst
.
getMat
().
reshape
(
1
);
size_t
esz
=
s
rc1
.
elemSize
(
);
size_t
esz
=
s
td
::
max
(
src1
.
elemSize
(),
(
size_t
)
1
);
size_t
blocksize0
=
(
size_t
)(
BLOCK_SIZE
+
esz
-
1
)
/
esz
;
BinaryFuncC
func
=
getCmpFunc
(
depth1
);
...
...
modules/core/test/test_arithm.cpp
View file @
4eda8efd
...
...
@@ -1912,3 +1912,13 @@ TEST(Subtract, scalarc4_matc4)
ASSERT_EQ
(
0
,
cv
::
norm
(
cv
::
Mat
(
5
,
5
,
CV_8UC4
,
cv
::
Scalar
::
all
(
250
)),
destImage
,
cv
::
NORM_INF
));
}
TEST
(
Compare
,
empty
)
{
cv
::
Mat
temp
,
dst1
,
dst2
;
cv
::
compare
(
temp
,
temp
,
dst1
,
cv
::
CMP_EQ
);
dst2
=
temp
>
5
;
EXPECT_TRUE
(
dst1
.
empty
());
EXPECT_TRUE
(
dst2
.
empty
());
}
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