mirror of
https://github.com/opencv/opencv.git
synced 2025-07-24 14:06:27 +08:00
core: add a check for empty input in inRange()
This commit is contained in:
parent
7b36e57551
commit
d89fb163c6
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user