LRGB combination

Juan Conejero said:
On a side note, combining linear L and RGB is possible in PixInsight. However you must perform a YRGB combination instead of LRGB.

In this case, instead of the CIE L*a*b* space, the CIE XYZ space must be used. CIE XYZ is a linear color space; however, the underlying RGB working space must also be linear in order to preserve linearity in the combined image. The basic procedure would be as follows:

- Define a linear RGB working space. With the RGBWorkingSpace tool, set gamma = 1.0 (disable sRGB gamma function). In addition, I would define a uniform RGB working space in the same operation. So the steps with RGBWorkingSpace are:

* Set the three luminance coefficients = 1.
* Define a uniform energy illuminant by setting the six chromaticity coordinates = 0.333333.
* Disable the sRGB gamma function and set gamma = 1.
* Apply to both the RGB and L images.

- Use the ChannelCombination tool to perform a YRGB combination. Select the CIE XYZ space, disable the X and Z components, and select the L image for the Y slot. Apply to the RGB image and you're done.

- To process the linear luminance of the combined YRGB image, you must select "Linear luminance" in the applied tools, when applicable (for example, Deconvolution and ATrousWaveletTransform allow you to select it).

- After the initial nonlinear stretch with HistogramTransformation, you may want to apply the default RGBWorkingSpace parameters, as a linear uniform space no longer will describe the image appropriately.

This should work :)

Hi Juan,
I've tried this method just for curiosity, but when I try to use RGBWorkingSpace with all six chromaticity set to 0.333333 I get the error:

Instance Validation Failed
Reason: Singular Matrix in RGB working color space inizialization

any Idea?
 
astroedo said:
Hi Juan,
I've tried this method just for curiosity, but when I try to use RGBWorkingSpace with all six chromaticity set to 0.333333 I get the error:

Instance Validation Failed
Reason: Singular Matrix in RGB working color space inizialization

any Idea?
I also tried it a while ago with the same result.
Geoff
 
Very interesting thread.  In my workflow I go from crop and DBE of the stacked images to linear fit of all RGB and L images before I go to the LRGB Procedures to make the RGB image.  I then stretch with the script for masked stretch to get to 0.25 median.  The histograms of the RGB and L images (of Ha) seem to overlap.  This seems reasonable, right?  If I do not do the linear fit, colors are definitely screwed up. 

Is there any reason to use the AIP script for the combination of L or Ha with the RGB?  I seem to like if better than just using the LRGB Procedure.  I believe they said they do the process in several stages, masking. 
 
Back
Top