Commit cb52d249 authored by Rostislav Vasilikhin's avatar Rostislav Vasilikhin

fixed optional args processing in SVD::compute()

parent 0a3a2df4
......@@ -1560,18 +1560,18 @@ static void _SVDcompute( InputArray _aarr, OutputArray _w,
JacobiSVD(temp_a.ptr<double>(), temp_u.step, temp_w.ptr<double>(),
temp_v.ptr<double>(), temp_v.step, m, n, compute_uv ? urows : 0);
}
temp_w.copyTo(_w);
if(_w.needed()) temp_w.copyTo(_w);
if( compute_uv )
{
if( !at )
{
transpose(temp_u, _u);
temp_v.copyTo(_vt);
if(_u.needed()) transpose(temp_u, _u);
if(_vt.needed()) temp_v.copyTo(_vt);
}
else
{
transpose(temp_v, _u);
temp_u.copyTo(_vt);
if(_u.needed()) transpose(temp_v, _u);
if(_vt.needed()) temp_u.copyTo(_vt);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment