From 96c99c716a6ed796af5b07dc660c03775f4b2ca1 Mon Sep 17 00:00:00 2001 From: berak Date: Sat, 17 Nov 2018 11:19:42 +0100 Subject: [PATCH] Merge pull request #13193 from berak:core_copyMakeBorder --- modules/core/src/copy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/src/copy.cpp b/modules/core/src/copy.cpp index 6d6aaff112..487d6f51da 100644 --- a/modules/core/src/copy.cpp +++ b/modules/core/src/copy.cpp @@ -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();