added hconcat & vconcat functions for joining matrices; moved some inline functions out of the headers; fixed several bugs in documentation; removed MatND from docs

This commit is contained in:
Vadim Pisarevsky
2010-11-23 16:39:20 +00:00
parent dd3c62a4fe
commit f5e5b677c9
10 changed files with 162 additions and 56 deletions

View File

@@ -162,6 +162,13 @@ void split(const Mat& src, Mat* mv)
mixChannels( &src, 1, mv, cn, &pairs[0], cn );
}
}
void split(const Mat& m, vector<Mat>& mv)
{
mv.resize(!m.empty() ? m.channels() : 0);
if(!m.empty())
split(m, &mv[0]);
}
/****************************************************************************************\
* merge *
@@ -298,7 +305,10 @@ void merge(const Mat* mv, size_t _n, Mat& dst)
}
}
void merge(const vector<Mat>& mv, Mat& dst)
{
merge(!mv.empty() ? &mv[0] : 0, mv.size(), dst);
}
/****************************************************************************************\
* Generalized split/merge: mixing channels *
@@ -437,6 +447,13 @@ void mixChannels( const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts, const in
}
void mixChannels(const vector<Mat>& src, vector<Mat>& dst,
const int* fromTo, int npairs)
{
mixChannels(!src.empty() ? &src[0] : 0, src.size(),
!dst.empty() ? &dst[0] : 0, dst.size(), fromTo, npairs);
}
/****************************************************************************************\
* convertScale[Abs] *
\****************************************************************************************/