rootba icon indicating copy to clipboard operation
rootba copied to clipboard

Modifying reprojection error

Open ShtainZ opened this issue 3 years ago • 1 comments

Hello, I would like to use your Bundle Adjustment solution with a different projection error based on another research in my field of study. The parameters of the camera pose do not change, only the projection mapping. Is there a way to add this kind of modification? Regards, Zachi

ShtainZ avatar Dec 08 '21 15:12 ShtainZ

Hi, thanks for your interest.

Depends a bit on what exactly the error formulation you had in mind looks like. If the parameterization stays the same, as you mentioned, and if also the "connectivity" is the same (every residual connects one camera and one landmark), then it should be doable with quite minimal changes.

For the custom solvers, your main entry would be to modify compute_error and linearize_point in https://github.com/NikolausDemmel/rootba/blob/master/src/rootba/bal/bal_bundle_adjustment_helper.cpp, and for the ceres solvers you'd go and adjust https://github.com/NikolausDemmel/rootba/blob/master/src/rootba/ceres/bal_residuals.hpp

Edit: compute_error can probably stay the same, since it just calls linearize_point.

NikolausDemmel avatar Dec 08 '21 15:12 NikolausDemmel