Merge pull request #13193 from berak:core_copyMakeBorder
authorberak <px1704@web.de>
Sat, 17 Nov 2018 10:19:42 +0000 (11:19 +0100)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Sat, 17 Nov 2018 10:19:42 +0000 (13:19 +0300)
modules/core/src/copy.cpp

index 6d6aaff..487d6f5 100644 (file)
@@ -1183,9 +1183,9 @@ void cv::copyMakeBorder( InputArray _src, OutputArray _dst, int top, int bottom,
 {
     CV_INSTRUMENT_REGION();
 
-    CV_Assert( top >= 0 && bottom >= 0 && left >= 0 && right >= 0 );
+    CV_Assert( top >= 0 && bottom >= 0 && left >= 0 && right >= 0 && _src.dims() <= 2);
 
-    CV_OCL_RUN(_dst.isUMat() && _src.dims() <= 2,
+    CV_OCL_RUN(_dst.isUMat(),
                ocl_copyMakeBorder(_src, _dst, top, bottom, left, right, borderType, value))
 
     Mat src = _src.getMat();