Hi All!
I do not have much background knowledge about optimization in general, but ceres-solver has still "just worked" for me so far, and that's why I love it. So, thanks for that great piece of software.
However I now have a problem for which I cannot find any advice...
In particular, I am trying to fit a set of 3D points to a cube, or at least to the three visible faces of a cube. The size of the cube is known and an initial estimate of its position and orientation (pose), and now I want to optimize the pose parameters.
Naively I would compute the residual of a given point by finding the cube face/plane where it fits best, and computing the residual to that face/plane. This would involve computing the point-plane distance and some conditional statements.
Using an auto-diff cost function, I guess computing the point-plane distance already is not feasible, is it? And then I did not find anything about if-statements inside cost functions. I could imagine these would make the cost function non-differentiable. Is that correct?
Would the only option be to use numeric differentiation? Or is there another way?
I did not find anything related to cuboid fitting with ceres-solver, either. Maybe because a cube is also not differentiable at the edges?
Thanks for any comments, even if it is just you agreeing that ceres-solver is a great piece of software ;-).
Cheers,
Jarne