Tuesday, July 16, 2019

GoPro Virtual Lens




Grab the image with your mouse to reframe the image.
Within the shader code above is the math to simulate GoPro lens look within 360° source.  The same math is very useful for "correcting" lens distortion.  The shader code is licensed under MIT or Apache 2.0. 
I would love someone in the comments to convert the lens radial distortion equation phi = 85.6r - 10.91r² to a OpenCV lens model. GoPro uses n-order radial distortion polynomial in the form: angle° = Ar + Br² + Cr³ where 'r' is the normalized sensor radius. OpenCV uses something more common, but I'm too lazy to learn, so I seek your help. To get OpenCV model started, here is the lens model in odd powers phi = 83.90432r - 18.26919r3 + 15.51541r5 - 6.51824r.

4 comments:

David Newman said...

And for the inverse of:
ϕ = 85.6r - 10.91r²
I use:
r = (-10.0*(sqrt(183184.0 - 1091.0 * ϕ) - 428.0))/1091.0

Clipping Path Provider said...





Outstanding Stuff Dear, Keep it Up. Peoples Need To Visit this Blog.

Unknown said...

Hi David. Sorry for this odd approach. I am making an in depth history/research video about early wavelet based video CODECs and read a lot about CineForm as well as your comments on reduser and I have some questions and I love to speak to you. Is there any way for me to contact you directly?
Looking forward to hearing from you at your earliest convenient.
Thank you
Bruce

David said...

Hi Bruce, my twitter is linked on the blog.