Lens Distortion Models In Layman's Terms

I want to confirm and expand on my understanding of lens distortion models. The wiki covers barrel, pin cushion, and mustache distortions, but not how it relates to division, brown 3, brown 4, ect… I feel like I have good grasp on what the names and variables mean and will try to explain them as I understand them and just correct me where necessary.

 

Divison- Just one curve calculated either positive or negative to correct barrel or pincushion distortion. I imagine this is the most common correction and good enough for the human eye unless your taking a picture of a checker board and holding a straight edge up to your monitor. Barrel

Pincushion

Division curve side view

 

Brown 3- A more accurate estimate of distortion as it can compensate for 3 variables such that if the distortion curve changes moving from the center to the outer edge of the image. With mustache distortion you would need to use this model as the distortion is by definition a combination of barrel and pincushion.

Mustache Distortion

Side view of the multiple distortion curves ( the best I could draw )

Brown 4 - Same just with 4 variables.

Brown 3 and 4 with Tangents - Same thing as before just with the correction now off center to correct for glass misalignment within the lens. Stabilization might introduce these “tangent” shifts as the lens or sensor wiggles around in the camera to correct motion blur from camera movement. Also cheaper/older camera (think camera phones, drones, ect) might benefit the most here. Think of how a CD player lens is focused. Its free floating and is moved by a magnetic field. 

Tangent - The mustache distortion is off center either because of misaligned lens glass or camera stabilization 

It is important to note that most lens correction software is only is only an estimate. Camera and lens manufactures have a range of acceptable values in variance. Reality Capture can in most cases (with enough pictures) create a more accurate distortion model for each individual picture. I imagine this is a multi-variable equation. You have many variables and the more equations you have the more certain about the variables values you can be. 

Please correct. I’m positive I’m wrong I’m many places, as I can only assume (through context clues and such) what these values mean. 

Hi Steven,

another valuable contribution, thank you!

I’ve asked about the different models before but got not much reply.

I find it is not very well covered out there, so you know more than I on the subject.

If what you say on tangiental is true, it should be the standard setting, at least for, like you say, cheap but also zoom lenses.

Do you have any idea what K means?

To be honest, I tried around a bit with the different models but the differences seemed to be marginal, at least judging by the numbers of median and mean errors…

I forgot about K. I believe it is keystone, perspective, or skew

and I believe this one can not be calculated. If no value is supplied then Reality Capture will use a default value of one. This is the least common distortion.

Hey Steven,

thanks, but already way over my head!

Do you mean least or most?

Anyway, why would RC not be able to calculate it and what does 1 mean???

Plus, what kind of scenario are we talking about here? Optical axis not 100% perpendicular to the sensor?

I want to do a series of posts like these. The idea is to word the explanations at a 5th grader level with illustrations. It should help people with English as a second language and non-professionals alike have a better grasp on what these values and settings mean. 

I do hope the mods participate, I’m positive my assumptions are either completely wrong or at least flawed in some respect. I do not want misinformation being spread. The goal is to get the correct understanding and make Users and DEVs lives a little easier. 

In depth Youtube videos was a consideration as well, but they are a lot of work. Maybe in the future depending on the community participation. 

Gotz, 

I believe I read that K must be specified by user other wise a default value of 1 (no K distortion) will be applied. 

“Plus, what kind of scenario are we talking about here? Optical axis not 100% perpendicular to the sensor?”

I do believe this is how it would happen.

As for the least common, I don’t think it would be an issue unless you build your own home made camera or used a tilt shift lens or something. Otherwise this distortion would be at a sub pixel level that doesn’t matter in calculations. 

Ok, now I can follow it, too!  :slight_smile:

But I do think that it can be calculated, otherwise it would not make any sense at all to offer it as an option. And sub pixel do count for RC, and the errors tend to accumulate…

I think you might be right Gotz. After re-reading, I think it is saying if using Brown 3 as opposed to k+brown 3, then K is defaulted to 1. 

If you select K +…, then RC will try to calculate the K value.

I don’t even think RC will let you specify a K value, now that I’m trying to find it.

Now I have even more questions. What are the principal points? I see Skew and Aspect ratio now. 

What is the difference in setting distortion model under the camera priors vs alignment settings?

 

So great to have such old puzzles explained “at a 5th grader level with illustrations” - on top of someone having actually worked it out!

Don’t take as gospel. I’m not sure what parts are correct. I wish the Mods would confirm or correct whats wrong…

Quite. But until then …

Seriously though… why aren’t the Devs more active in these forums?

I’d really like some hard answers about the finer / complex settings in RC without having to spend days of trial and error.

This is a great topic for starters.

I’ve givin up on help from Reality Capture support really. I don’t think they care. They have a figure it out for your self kinda of attitude.