baidu / ICE-BA

Apache License 2.0
705 stars 232 forks source link

numerical stability #7

Closed ghost closed 6 years ago

ghost commented 6 years ago

hi, i want to ask for the numerical stability in optimization when constructing the sparse structure Sx = d

liuhaomin commented 6 years ago

Do you mean the precision of S and d, or the precision of solving Sx = d?

ghost commented 6 years ago

in general

local BA, marginalize will generate Sx = d which S is dense matrix.

your solution

give sub-track to construct sparse Sx = d, the method reduce constraints. so i want to know whether the tips make optimization(LM or GN) non convergence sometimes?

liuhaomin commented 6 years ago

Indeed that is a problem for those points with too small parallax. Marginalizing such points will results in numerical instability and sub-track will make it worse. We do not marginalize such sub-tracks. If the information garthered on a sub-track is too small (less than the threshold epsdST), it will be treated as a fixed point and not be marginalized for Schur complement construction. https://github.com/baidu/ICE-BA/blob/7fe5fcf0d33396d2f775d45aaa9d85c1ebda363b/Backend/BundleAdjustment/LocalBundleAdjustorGN.cpp#L927

And for back substitution performed on the original tracks, we also check the information garthered on the original track using another threshold espd, and do not update the ill-conditioned points.https://github.com/baidu/ICE-BA/blob/7fe5fcf0d33396d2f775d45aaa9d85c1ebda363b/Backend/BundleAdjustment/LocalBundleAdjustorGN.cpp#L914

ghost commented 6 years ago

Got it, thank you

wangjio commented 6 years ago

The question has been solved.