pixloc icon indicating copy to clipboard operation
pixloc copied to clipboard

Support for Colmap camera model FULL_OPENCV

Open jackokaiser opened this issue 2 years ago • 2 comments

Dear pixloc authors and developers,

Many thanks for providing such a high-quality package! Well done.

For our application, we are using a FULL_OPENCV camera model, which isn't supported by pixloc at the moment.

The FULL_OPENCV model is registered in utils/colmap.py, but it's missing from pixlib/geometry/wrappers.py, as well as from the actual undistortion in pixlib/geometry/utils.py and its jacobian. The FULL_OPENCV calibration model is an extension to the OPENCV model, with an higher-order polynomial: k3, k4, k5 and k6 follow p1 and p2.

It seems that adding support for higher degree polynomials in the undistortion code would be simple, but I'm not sure about the boundary condition - what would this become?

jackokaiser avatar Apr 21 '22 19:04 jackokaiser

Hi, thank you for your interest! I just found out about this recent WACV2022 paper that derives the maximum radius for more complex camera models. The solution is not trivial but they provide a Python implementation and needs to be computed only once per camera, thus can be cached (e.g. adding a Camera.maximum_radius method with @cached_property).

sarlinpe avatar Apr 23 '22 06:04 sarlinpe

nice, I'll check it out, thanks!

jackokaiser avatar Apr 25 '22 09:04 jackokaiser