From e18224110c44af42deff84cbaf4c7cf6c5664c58 Mon Sep 17 00:00:00 2001 From: Istvan Sarandi Date: Thu, 17 Apr 2014 02:41:52 +0200 Subject: [PATCH] Removed emptiness check from cv::hconcat and cv::vconcat. Sometimes you want to concatenate with an empty matrix. --- modules/core/src/matrix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/src/matrix.cpp b/modules/core/src/matrix.cpp index f7aded7312..6458145a61 100644 --- a/modules/core/src/matrix.cpp +++ b/modules/core/src/matrix.cpp @@ -2665,7 +2665,7 @@ void cv::hconcat(const Mat* src, size_t nsrc, OutputArray _dst) size_t i; for( i = 0; i < nsrc; i++ ) { - CV_Assert( !src[i].empty() && src[i].dims <= 2 && + CV_Assert( src[i].dims <= 2 && src[i].rows == src[0].rows && src[i].type() == src[0].type()); totalCols += src[i].cols; @@ -2705,7 +2705,7 @@ void cv::vconcat(const Mat* src, size_t nsrc, OutputArray _dst) size_t i; for( i = 0; i < nsrc; i++ ) { - CV_Assert( !src[i].empty() && src[i].dims <= 2 && + CV_Assert(src[i].dims <= 2 && src[i].cols == src[0].cols && src[i].type() == src[0].type()); totalRows += src[i].rows;