mirror of
https://github.com/opencv/opencv.git
synced 2025-06-23 20:21:40 +08:00
fixed optional args processing in SVD::compute()
This commit is contained in:
parent
0a3a2df433
commit
cb52d249fe
@ -1560,18 +1560,18 @@ static void _SVDcompute( InputArray _aarr, OutputArray _w,
|
|||||||
JacobiSVD(temp_a.ptr<double>(), temp_u.step, temp_w.ptr<double>(),
|
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_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( compute_uv )
|
||||||
{
|
{
|
||||||
if( !at )
|
if( !at )
|
||||||
{
|
{
|
||||||
transpose(temp_u, _u);
|
if(_u.needed()) transpose(temp_u, _u);
|
||||||
temp_v.copyTo(_vt);
|
if(_vt.needed()) temp_v.copyTo(_vt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
transpose(temp_v, _u);
|
if(_u.needed()) transpose(temp_v, _u);
|
||||||
temp_u.copyTo(_vt);
|
if(_vt.needed()) temp_u.copyTo(_vt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user