fixed #2108 (thanks to Vincent for the report and proposed solution)

This commit is contained in:
Vadim Pisarevsky
2012-06-28 15:52:34 +00:00
parent 6a13c9efc0
commit fd901d8323
2 changed files with 29 additions and 1 deletions

View File

@@ -759,7 +759,8 @@ inline SVD::SVD() {}
inline SVD::SVD( InputArray m, int flags ) { operator ()(m, flags); }
inline void SVD::solveZ( InputArray m, OutputArray _dst )
{
SVD svd(m);
Mat mtx = m.getMat();
SVD svd(mtx, (mtx.rows >= mtx.cols ? 0 : SVD::FULL_UV));
_dst.create(svd.vt.cols, 1, svd.vt.type());
Mat dst = _dst.getMat();
svd.vt.row(svd.vt.rows-1).reshape(1,svd.vt.cols).copyTo(dst);