Tuesday, 5 February 2019

optics - What model does Lightroom use for lens correction?


I use Adobe Lightroom to remove the barrel distortion from GoPro images. Does anyone know if this software uses the Brown-Conrady model to achieve the lens correction? If not which model does it use? From an extensive Google search I have done, I didn't come up with an answer.



Answer




Does anyone know if this software uses the Brown-Conrady model to achieve the lens correction?



Yes they do use those very common camera calibration coefficients. I added some copyable text versions of the formulas to the following quote:





Geometric Distortion Model for Rectilinear Lenses


rectilinear distortion model


xd = (1 + k1*r^2 + k2*r^4 + k3*r^6)*x + 2*(k4*y + k5*x)*x + k5*r^2
yd = (1 + k1*r^2 + k2*r^4 + k3*r^6)*y + 2*(k4*y + k5*x)*y + k5*r^2

Geometric Distortion Model for Fisheye Lenses


fisheye distortion model


rd = f*(θ + k1*θ^3 + k2*θ^5)


While the formulas look a bit different from those that can be found on the Wikipedia page on distortion at first glance:


x wikipedia y wikipedia


they are actually equivalent if you do the math: k4 = P1 and k5 = P2.


The model also includes lateral chromatic aberration and vignetting, which can be found in the linked pdf file.




I'd like to add the breadcrumbs that lead me to the findings above, because



extensive Google search




didn't cut it for me either and getting to the goal was not as straight forward as I would have hoped. This is mostly anecdotal



  1. The Adobe Lens Profile Creator User Guide Version 1.0 Wednesday, April 14, 2010 does what its name implies and guides users through the profile creator software. Procedure Preferences and Other Options in the Adobe Lens Profile Creator, step 4:

    This is a feature made available to lens manufacturers for converting their lens design data into LCP files. For details, check out the companion document titled “Adobe Camera Model Lens Design Data Conversion Guide” on the lens design data interchange format and conversion steps. If there is a document on how to convert to/from LCP files, they should have an open specification of that file format somewhere. Knowing what the profile looks like is half the deal.




  2. I could not find the Adobe Camera Model Lens Design Data Conversion Guide.

  3. In a mailing list archive of darktable-users from 2015-05-13, the support for LCP files is by the lens correction library lensfun is announced:


    The Lensfun repository now contains a branch "acm" which implements the Adobe Camera Model for distortion (including fisheye) It looks like the conversion mentioned above is happening in real life.





  4. The mailing list links to a part of the lensfun documentation 0.3.2.0 named Converting Adobe LCP files to Lensfun: lensfun‑convert‑lcp (Generated on Tue Dec 22 2015):



    The LCP file format is defined by Adobe (see the specification1) and used in their Lightroom and Photoshop products.



    but the specification is blocked by a Spectral Wolf





  5. The Spectral Wolf fears only fire. I can no longer help you, but if you master the wolf, he will undistort your images. Godspeed.




1 that points to macromedia.com. It looks like Adobe keeps old links alive.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...