Linear Luminance

Linear Luminance
  1. Background
    1. Procedure

Background

Luminance application is traditionally performed using a nonlinear color space; in the case of Pixinsight, this is CIE Lab. Here, the CIE L* channel in Lab color is replaced with the nonlinear (already stretched) Luminance filter data. While this does work, it can result in unexpected changes in color, saturation and brightness due both to the nonlinear color space used as well as the fact that Luminance needs to be stretched completely independently from the RGB data. This can be mitigated with certain processing strategies such as matching Histograms during stretching, but remains fundamentally problematic. Here I will present a simple procedure for applying Luminance in a linear state which will better preserve saturation and takes guesswork out of the equation.

Procedure

  1. Take the average of your linear color calibrated RGB image using this PixelMath to create a new grayscale image called Average:
     /*file: "RGB/k"*/Avg($T[0],$T[1],$T[2])
    
  2. At this point, fully denoise your RGB image as to avoid bringing chrominance noise into the LRGB image.
  3. LinearFit your linear Luminance image using Average as a reference.
  4. Apply this PixelMath to the RGB image to apply linear Luminance:
     /*file: "RGB/k"*/Lum * ($T / Avg($T[0],$T[1],$T[2]))
    
  5. Apply a stretch of your choice and enjoy the simplicity of processing a well-matched LRGB image.