Can I add or remove a Residual block between optimization iterations? I am trying to use auto differentiation.
I am using Ceres-Solver for a camera tracking problem. I want to find the best relative pose by minimizing the photometric errors of feature points. However every iteration as I update the pose, some reprojection points fall outside the camera view and therefore cannot be used in the optimization. So far each feature point is a residual block.