dkogan / mrcal

Next-generation camera-modeling toolkit
http://mrcal.secretsauce.net
Apache License 2.0
179 stars 14 forks source link

5-parameter deformation model #19

Closed Mr-ZhuJun closed 1 week ago

Mr-ZhuJun commented 2 months ago

Board deformation The calibration object is assumed to be nominally planar. However, large calibration boards used for calibration of wide lenses are never flat: temperature and humidity effects deform the board strongly-enough to affect the calibration. mrcal currently supports a simple 2-parameter deformation model. This model uses two axis-aligned parabolic factors. Let the chessboard grid span along the and axes. Then I define the non-planar deformation as with and being the two deformation factors being optimized by the solver. If the board were flat, and would be 0, and thus we would have everywhere. The deflection at the edges is 0, and is strongest at the center.Empirically, this appears to work well: I get better-fitting solves, and less systematic error. And the optimal deformation factors , are consistent between different calibrations.Clearly, this does not work for especially strong or asymmetric deflections. There's a richer 5-parameter deformation model in a not-yet-released branch that appears to work even for asymmetric deflections. This needs more testing, and has not yet been released. Talk to Dima if you want to play with it.

dkogan commented 2 months ago

Oh; that's what you're asking about. Here's the branch: https://github.com/dkogan/mrcal/tree/richer-board-shape It is very out-of-date, and very experimental. It has somewhat worked to process a dataset captured with an asymmetrically-bent board. But the results still weren't perfect, and manufacturing a more precise chessboard was the solution to get reliable results.

You can play with that branch. But don't expect it to "just work". This would be a researchy experimental work. I'm focused on other improvements currently, and I'm unlikely to come back to THIS anytime soon. Let me know if you play with this, and if you end up with any success from it.

dkogan commented 1 week ago

Closing this. Feel free to reopen, if you want to talk about this some more