Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Division model for distortion #33

Open
mapclyps opened this issue Feb 11, 2022 · 2 comments
Open

Division model for distortion #33

mapclyps opened this issue Feb 11, 2022 · 2 comments

Comments

@mapclyps
Copy link
Contributor

After #31 I realized that in my application I suddenly needed all distortion parameters K1 to K3 instead of only K1 to match the image distortion of the camera I was working with.
It seems like the previous approximation of inverse distortion is actually closer to the division model for lens distortion, which is often more accurate than the classical Brown-Conrady multiplication model with fewer parameters, especially for higher distortion.
I found this paper for the comparison and evaluation of the model.

It also seems like OpenCV includes both models in recent versions, while the normal K1 to K3 are defined as in this library and K4 to K6 then are the corresponding coefficients in the division model instead of higher-order terms for the multiplicative model.

What are your thoughts on adding similar K4 to K6 here as well? It would be three more floats in the Camera construct which default to zero, which would not affect the projection when not explicitly set.

@nlw0
Copy link
Collaborator

nlw0 commented Mar 29, 2023

I think the full OpenCV model is definitely something nice to have, I've used it in practice, but I would propose it should be considered as a separate model, not just having one complex one where we set parameters to zero, for the sake of enforcing that the code is simple, and it can be used for things like automatic differentiation and code optimization etc.

@peterkovesi
Copy link
Owner

Sorry to come in so late on this. A was away in Feb with minimal internet access.
I am inclined to go for a separate model rather than 'cluttering' the Brown model with extra parameters. I think in the longer term there may be a case for having an AbstractCamera under which one can have several camera models. The Division Model could be a separate one to the Brown Model, one could also have a Wide Angle Lens Model and a Rolling Shutter Model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants