Before we start improving the details within the luminance image, we need to stretch it to non-linear. The stretch on the luminance is different than the stretch for the color image. There are two approaches I often use for stretching: Masked Stretch or Histogram Transformation. For color images, I find Masked Stretch works better. For luminance, Histogram Transformation seems to provide me with better results.
Option 1: Histogram Transformation
For histogram transformation, you want to use an iterative process. Don’t try to do a complete stretch on the first try.
As you can see, with each step, we gradually brighten our object without overexposing the background.
Option 2a: Masked Stretch
I used masked stretch for my color image and I will sometimes use it for my luminance image as the first part of the luminance stretch. Once modification I make is that the target background value for the luminance is lower than the one selected for the color image. I want my luminance background to be darker.
Option 2b: Exponential Transformation
The second part of the luminance stretch is to use the Exponential Transformation process. The exponential transformation with the Power of Inverted Pixels function allows us to brighten the image without brightening the background or overpowering the brightest regions. You can think of it like creating a slight S-curve in curves transformation. It adds contrast without impacting the background brightness.