[hugin-ptx] Re: Distortion parameters "a,b,c" to "k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]" (OpenCV)

2016-06-30 Thread Erik Krause
Am 29.06.2016 um 14:22 schrieb Finfa811: How do I convert my a,b,c parameters to OpenCV style "k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]"? The a,b,c parameters define a polynomial curve which describes the distortion of the image. See http://wiki.panotools.org/Lens_correction_model for deta

[hugin-ptx] Re: Distortion parameters "a,b,c" to "k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]" (OpenCV)

2016-06-30 Thread Finfa811
I've found a solution in the following link: *http://www.panotools.org/dersch/barrel/barrel.html* - a = k2 * (width/2)3 - b = 0 - c = k1* (width/2) - d = 1 The minimum input that OpenCV uses for its polynomial is k1k2p1p2 (4 parameters). In my case, just the parameter c was not zero

[hugin-ptx] Re: Distortion parameters "a, b, c" to "k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]" (OpenCV)

2016-07-01 Thread Torsten Bronger
Hallöchen! Finfa811 writes: > I've found a solution in the following link: > > *http://www.panotools.org/dersch/barrel/barrel.html* > >- a = k2 * (width/2)3 >- b = 0 >- c = k1* (width/2) >- d = 1 > > The minimum input that OpenCV uses for its polynomial is k1k2p1p2 > (4 parameters

[hugin-ptx] Re: Distortion parameters "a, b, c" to "k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]" (OpenCV)

2016-07-01 Thread Finfa811
In my case it is working, maybe it's just coincidence because I've checked the polynomials and you are right. Probably the ccd width value is the correct one that returns a valid solution in my case. In any case it would be nice to try with different lenses. El viernes, 1 de julio de 2016, 9

[hugin-ptx] Re: Distortion parameters "a, b, c" to "k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]" (OpenCV)

2016-07-01 Thread Torsten Bronger
Hallöchen! 'Bruno Postle' via hugin and other free panoramic software writes: > Yes, there is no direct conversion possible unless you limit the > parameters. However given the two formulas, this is a curve fitting > problem - it ought to be possible to get a very good approximation > with a spre

Re: [hugin-ptx] Re: Distortion parameters "a, b, c" to "k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]" (OpenCV)

2016-07-01 Thread 'Bruno Postle' via hugin and other free panoramic software
Yes, there is no direct conversion possible unless you limit the parameters. However given the two formulas, this is a curve fitting problem - it ought to be possible to get a very good approximation with a spreadsheet solver. -- Bruno On 1 July 2016 at 08:25, Torsten Bronger wrote: > Hallöchen!

Re: [hugin-ptx] Re: Distortion parameters "a, b, c" to "k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]" (OpenCV)

2016-07-01 Thread bugbear
'Bruno Postle' via hugin and other free panoramic software wrote: Yes, there is no direct conversion possible unless you limit the parameters. However given the two formulas, this is a curve fitting problem - it ought to be possible to get a very good approximation with a spreadsheet solver. I