Merge pull request #392 from vpisarev:python_fixes2

This commit is contained in:
Andrey Kamaev
2013-02-01 10:20:51 +04:00
committed by OpenCV Buildbot
6 changed files with 84 additions and 14 deletions

View File

@@ -1927,6 +1927,14 @@ void cv::transpose( InputArray _src, OutputArray _dst )
_dst.create(src.cols, src.rows, src.type());
Mat dst = _dst.getMat();
// handle the case of single-column/single-row matrices, stored in STL vectors.
if( src.rows != dst.cols || src.cols != dst.rows )
{
CV_Assert( src.size() == dst.size() && (src.cols == 1 || src.rows == 1) );
src.copyTo(dst);
return;
}
if( dst.data == src.data )
{
TransposeInplaceFunc func = transposeInplaceTab[esz];