Deep dive into Z lens corrections (including impact on acuity)

Started 10 months ago | Discussions thread
ForumParentFirstPrevious
Flat view
Horshack Veteran Member • Posts: 8,017
Deep dive into Z lens corrections (including impact on acuity)
30

I've been curious to learn more about the built-in lens corrections the Z bodies embed into raws. When loading raws into ACR/LR these corrections are compulsory - they can't be disabled, at least not without stripping the correction info from the raws. You can tell these corrections have been applied from the "Builtin lens profile applied" message in the lens correction tab, which presents this dialog when clicked:

I'll be focusing on the Nikon 24-70 f/4Z lens on the Z7.

Visual Demonstration of 24-70 f/4Z lens corrections

First, here is an animated graphic showing the 24-70 with and without corrections. The non-corrected images were obtained by striping the correction info from the raw prior to processing, which can be done by converting the NEF to a DNG and then running "exiftool -OpCodeList3= <DNG_filename>", with a space after the equal sign.

Click "original size" to animate:

Nikon 24-70 f/4Z on Z7, with and without built-in lens collections. Click "original size" to animate

Technical dive into lens correction data

The correction profile is embedded in the raw, which is more more easily viewed by converting the raw to a DNG. The profile of the converted DNG is contained inside the OpcodeList3, which is a list of transformations to be applied just after demosaicing (described on page 67 of DNG spec). Here's that list in hex @ f24mm f/4, which is obtained via "exiftool -b -OpcodeList3 myfile.dng > out.bin"

Embedded lens profile for the 24-70 f/4Z @ 24mm f/4 on the Z7

The interpretation of this data is described starting on page 87 of the DNG spec. Here is the above profile as interpreted by dng_validate.exe, which is an executable that can be built from the DNG SDK:

Parsing OpcodeList3: 1 opcode

Opcode: WarpRectilinear, minVersion = 1.3.0.0, flags = 0
Planes: 3
Optical center:
h = 0.501393
v = 0.504918
Plane 0:
Radial params: 1.025404, -0.124185, 0.058328, -0.003717
Tangential params: 0.000000, 0.000000
Plane 1:
Radial params: 1.025181, -0.124368, 0.058438, -0.003759
Tangential params: 0.000000, 0.000000
Plane 2:
Radial params: 1.025359, -0.124566, 0.058607, -0.003809
Tangential params: 0.000000, 0.000000

These parameters describe a warp transformation to be applied to the demosaiced data. This transformation accomplishes two things - corrects the lens geometric distortion (pincushion, barrel distortion, etc..) and chromatic aberration. The CA correction is achieved by slightly skewing the warping across the three RGB color planes. This is described in the research paper Correcting Chromatic Aberations Using Image Warping.

Naturally the embedded correction profile values for the 24-70 vary depending on what focal length an image was shot at, since the distortion characteristics vary across the focal range. But they also vary by aperture even at the same focal length, since CA characteristics are affected by aperture effects. For example here's the profile at 24mm again but this time at f/5.6 instead of the f/4 listed above:

Opcode: WarpRectilinear, minVersion = 1.3.0.0, flags = 0
Planes: 3
Optical center:
h = 0.501405
v = 0.504913
Plane 0:
Radial params: 1.025498, -0.124349, 0.058447, -0.003755
Tangential params: 0.000000, 0.000000
Plane 1:
Radial params: 1.025181, -0.124368, 0.058438, -0.003759
Tangential params: 0.000000, 0.000000
Plane 2:
Radial params: 1.025277, -0.124355, 0.058413, -0.003751
Tangential params: 0.000000, 0.000000

Acuity penalty from lens correction

Digital lens corrections are not without cost. Because their transformations shift pixels around they can reduce the effective resolution of the image. Roger Cicala has a great piece about this including MTF measurements here. The amount of acuity lost depends on the magnitude of the correction and the portion of the image you evaluate, since the transformation varies across the image. Here is a visual demonstration showing the loss on a real-world 24-70Z image on the Z7 @ 24mm. This is taken from the extreme edge of the image, where the acuity impact is higher:

Sample of acuity lost on 24-70Z @ 24mm due to lens corrections

Nikon Z7
If you believe there are incorrect tags, please send us this post using our feedback form.
ForumParentFirstPrevious
Flat view
Post (hide subjects) Posted by
FKS
ForumParentFirstPrevious
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow