projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b36e57
)
core: add a check for empty input in inRange()
author
berak
<px1704@web.de>
Sat, 21 Apr 2018 09:43:05 +0000
(11:43 +0200)
committer
berak
<px1704@web.de>
Sat, 21 Apr 2018 10:54:52 +0000
(12:54 +0200)
modules/core/src/arithm.cpp
patch
|
blob
|
history
diff --git
a/modules/core/src/arithm.cpp
b/modules/core/src/arithm.cpp
index 45721538bb9ff89762479db9043b484d13db2fbc..10f739c0c107dfc9ee0b6722c52ba8c234063e29 100644
(file)
--- a/
modules/core/src/arithm.cpp
+++ b/
modules/core/src/arithm.cpp
@@
-1752,6
+1752,8
@@
void cv::inRange(InputArray _src, InputArray _lowerb,
{
CV_INSTRUMENT_REGION()
+ CV_Assert(! _src.empty());
+
CV_OCL_RUN(_src.dims() <= 2 && _lowerb.dims() <= 2 &&
_upperb.dims() <= 2 && OCL_PERFORMANCE_CHECK(_dst.isUMat()),
ocl_inRange(_src, _lowerb, _upperb, _dst))