Chromatic aberration, distortion and lens vignetting
Optics makes the lens corrections we can make from the image itself: the chromatic aberration, the distortion and the lens vignetting, the Optics section of Dark Room (All) in a panel of its own.
The process is the Optics section of Dark Room (All) on its own: it runs the same engine with every other control at no change, so its result is exactly what Dark Room (All) gives with the same settings and the rest at their defaults. With every control at its default the image comes out exactly as it went in.
The chromatic aberration fit is measured once on the whole image, so the live preview of a part shows the same correction as Apply.
Figure: the Optics panel, with the histogram and the controls.
The histogram of the image as the controls would make it is at the top, in red, green, blue and the luminance, and the controls follow it.
The lens corrections here are the ones we can make from the image itself. There is no lens database in the program, so there is no Enable Lens Corrections that looks the lens up: Distortion and Vignetting are set by hand.
Remove Chromatic Aberration: Off by default. Fits the color fringes of a lens across the whole image: the red and the blue channel are each a little larger or smaller than the green one, more toward the corners, and the fit finds by how much from the edges of the image (the correlation of the edges of the channels over the outer part of the image, to a few hundredths of a percent). It then resamples the red and the blue channel onto the green one. When the image has no such fringes the fit finds none and the image is not touched.
Distortion: From -100 to 100. Positive bulges the image outward (barrel), negative pulls it in (pincushion); at 100 the corners move by 15 percent of the distance from the center to a corner. The corners may then show the edge pixels stretched, which a crop takes away.
Vignetting: From -100 to 100. Positive lightens the corners, to correct a lens's vignetting; negative darkens them.
Midpoint: From 0 to 100, 50 by default. How far from the center the vignetting correction starts. It is off while Vignetting is 0.
The live preview (the eye at the end of the Applies to row) shows the result on the part of the image in view, as
Dark Room (All) does. What the whole image decides is measured once on the whole image, so the preview of a part is what
Apply gives there. Apply makes one history step that Undo takes back. Instance shows the process as text, a
DSPX process (.dsproc), to copy or save; the settings have the ids they have in Dark Room (All), so their
values mean the same in both. The process is our own and has no PixInsight icon.
Stretch first. The controls are made for the values of a stretched image.
Crop after Distortion. The corners may show stretched edge pixels after a strong correction.
Dark Room (All): every section in one panel.
Vignette: a vignette added for the look.
Crop: takes away the edges.