From: Jin Ma Date: Thu, 4 Jul 2013 08:14:55 +0000 (+0800) Subject: Fix oclMat constructor when roi is provided. X-Git-Tag: accepted/tizen/ivi/20140515.103456~1^2~670^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97e620b8f3ead7e2843fbd3b8f6d7b9c34bad1cd;p=profile%2Fivi%2Fopencv.git Fix oclMat constructor when roi is provided. --- diff --git a/modules/ocl/include/opencv2/ocl/matrix_operations.hpp b/modules/ocl/include/opencv2/ocl/matrix_operations.hpp index fcd847c..55f2fc9 100644 --- a/modules/ocl/include/opencv2/ocl/matrix_operations.hpp +++ b/modules/ocl/include/opencv2/ocl/matrix_operations.hpp @@ -211,8 +211,8 @@ namespace cv { flags &= roi.width < m.cols ? ~Mat::CONTINUOUS_FLAG : -1; offset += roi.y * step + roi.x * elemSize(); - CV_Assert( 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && - 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows ); + CV_Assert( 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.wholecols && + 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.wholerows ); if( refcount ) CV_XADD(refcount, 1); if( rows <= 0 || cols <= 0 )