# 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.

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

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

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:

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.

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.

• Basically you saved me about 3 weeks worth of time and work. I began searching for another software that does the same thing but the methods it uses are known, since this lens correction is used for an academic paper and everything must be explained (including which model is used for the distortion removal). I cannot thank you enough! Kudos! Jan 13, 2016 at 22:15

I can't speak specifically about LR, but many raw processing applications don't use one of several generic mathematical models (such as Brown-Conrady) that are based on an assumption of rotational symmetry at all if the lens used is a fairly popular one. Instead they use a calibrated correction profile to correct for the measured distortion of the lens at various focus distances. This is especially true of fixed focal length lenses. The Digital Lens Optimizer module of Canon's Digital Photo Professional is one such application that uses calibrated correction profiles to correct lens aberrations with remarkable results that can even counteract the effects of diffraction due to narrow apertures.

The overwhelmingly popular GoPro cameras should have calibrated correction profiles available for Adobe to use. Whether Adobe uses and applies them I know not. (Null's answer indicates they don't.)

If a calibrated profile for a particular lens is not available or the EXIF information embedded in the photo does not properly specify the specific lens used then those applications that would otherwise use calibrated profiles will instead apply generic models such as Brown-Conrady to do geometric distortion correction.

• It takes the data from a test chart of straight line grids shot through the lens. Then it applies the necessary "stretching" to make the lines in the image straight. This allows for much more accurately correcting lenses with aspherical elements used to correct other aberrations such as CA. It's not that there is no mathematical modeling involved, it's just that the specific shape of the lens' distortion is used, rather than a generic assumption about the distortion a lens of a particular focal length, diameter, etc. will produce. Jan 13, 2016 at 18:32
• Brown-Conrady and other models that I refer to as generic all operate on the assumption of rotational symmetry. Adobe products and most other raw converters use calibrated correction that does not depend on that assumption. Jan 13, 2016 at 19:10
• OK, so it turns out Adobe does not use calibrated correction profiles. At least not for the GoPro lenses. Jan 14, 2016 at 11:12