Page 1 of 1

### What is the exact formula for the distortion?

Posted: Sat Nov 18, 2017 11:52 pm
There are some lens parameters
- focal length (in mm)
- k1, k2, k3
- xoffset, yoffset

1. Are offsets in pixels, mm or other measure?

2. For the distortion formula, is the radius (x distance from center) measured in pixel, mm or other?

3. What formula do you use?
a. r' = r (1 + k1*r + k2*r^2 + k3*r^3)
b. r' = r(1 + k1*r^2 + k2*r^4 + k3*r^6)
c. other

4. How do you treat fish eye lenses? NOTE: They cannot really use k1,k2,k3.

### Re: What is the exact formula for the distortion?

Posted: Sat Nov 25, 2017 9:02 pm
Hmmmm ... I really want to know.

### Re: What is the exact formula for the distortion?

Posted: Mon Nov 27, 2017 4:04 pm
Hello,

Sorry, but as you might expect, we cannot communicate on that stuff.

Best regards,
Olivier

### Re: What is the exact formula for the distortion?

Posted: Mon Nov 27, 2017 4:36 pm
I do not agree. I really need it. I do not think your program is finding good parameters for my lens. And I want to generate them myself and insert them. It is not like the k1, k2 and k3 .. parameters are all that secret .. is it? There are a limited bunch of guesses what they could mean. With some tedious work I could find it out.

An alternative for me would be to use Hugin or PTGui that both uses Panorma Tools, that is open source. Then the lens formula would be totally known. Unfortunately they use formula 3a above, which is wrong. So ... than I have to convince the Panorama Tool community to switch to formula 3b, which is right. I hope you are not using 3a?

### Re: What is the exact formula for the distortion?

Posted: Mon Nov 27, 2017 4:40 pm
Hello,

I'm really sorry. There's a NDA that do not allow us to communicate on that stuff.

Kind regards,
Olivier

### Re: What is the exact formula for the distortion?

Posted: Mon Nov 27, 2017 4:55 pm
Then I think you need to add a tool that can make a better lens analysis. That would improve the alignment of images.

I have such a tool, and my plan was to use it and input the parameters into autopano.

An alternative for me would be to convert all input pictures to corrected pictures before adding them to the project. That is tedious and time consuming and also lose some quality.

Or - as I said - maybe switch to Hugin. Unfortunately they have the wrong lens formula, otherwise I would be using that instead already.

### Re: What is the exact formula for the distortion?

Posted: Mon Nov 27, 2017 5:01 pm
Hello,

Have you tried our Lens correction plugin using Adobe's lcp profiles? Is that something that can help you?

Best,
Olivier

### Re: What is the exact formula for the distortion?

Posted: Mon Nov 27, 2017 5:15 pm
Thanks for that info. Ill take a look. My lenses have lcp profiles.

### Re: What is the exact formula for the distortion?

Posted: Wed Dec 06, 2017 8:47 pm
There's even been talk about needing 4th degree lens correction in some cases.

http://paulbourke.net/dome/fisheyecorrect/

### Re: What is the exact formula for the distortion?

Posted: Wed Dec 06, 2017 9:32 pm
I think it is better to correct for a fish eye for a fish eye, using a correct model for fish eyes. Then you can make a full correction, even out to the very edge of the image circle. You would need an infinite polynomial to do that otherwise.

I am one of the authors of this tool:

http://proxel.se/lens.html

And that is the main reason I want to know the exact formula. Then I can make a program that can convert to the Kolor Autopano parameters. Look at the documentation so can you find how we do the correction for fish eyes.

Now - there are also stereoscopic fish eyes
This is something that would be a good idea to add to our tool.
The fantastic Samyang 12 mm fish eye is stereoscopic.