Removed emptiness check from cv::hconcat and cv::vconcat. Sometimes you want to concatenate with an empty matrix.

pull/2630/head
Istvan Sarandi 11 years ago
parent 80ef1f6753
commit e18224110c
  1. 4
      modules/core/src/matrix.cpp

@ -2665,7 +2665,7 @@ void cv::hconcat(const Mat* src, size_t nsrc, OutputArray _dst)
size_t i; size_t i;
for( i = 0; i < nsrc; 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].rows == src[0].rows &&
src[i].type() == src[0].type()); src[i].type() == src[0].type());
totalCols += src[i].cols; totalCols += src[i].cols;
@ -2705,7 +2705,7 @@ void cv::vconcat(const Mat* src, size_t nsrc, OutputArray _dst)
size_t i; size_t i;
for( i = 0; i < nsrc; 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].cols == src[0].cols &&
src[i].type() == src[0].type()); src[i].type() == src[0].type());
totalRows += src[i].rows; totalRows += src[i].rows;

Loading…
Cancel
Save