do you know a written Pixinsight workflow to do a [LRGB]-RGB as stated by Mischa?
In general, the unweighted average of individual RGB components does not lead to an optimal result in signal-to-noise ratio terms. An optimal synthetic luminance must assign different weights to each color component, based on scaled noise estimates.
This process can be done very easily with the ImageIntegration tool, as I'll describe below. However, for the sake of understanding how things work, I'll describe the algorithm first. Let L, R, G, B be the luminance image and the three color components of the color image, respectively, and let's take L as the reference image for normalization. First we compute the scaling factors:
k
R = s
L/s
Rk
G = s
L/s
Gk
B = s
L/s
Bwhere s
L, s
R, s
G and s
B are scale estimates (or estimates of statistical variability or dispersion) for the luminance, red, green and blue components, respectively. Robust and efficient scale estimators play an important role here.
Now we need noise estimates, which we can compute easily with the NoiseEvaluation script. Call the unscaled noise estimates n
L, n
R, n
G and n
B, respectively. Now we can compute the optimal combination weights:
w
L = 1/(n
L)
2w
R = 1/(k
R * n
R)
2w
G = 1/(k
G * n
G)
2w
B = 1/(k
B * n
B)
2We can convert the set of weights into the components of a unit vector:
W = w
L + w
R + w
G + w
Br
L = w
L/W
r
R = w
R/W
r
G = w
G/W
r
B = w
B/W
Define zero offsets:
d
R = p
L - p
Rd
G = p
L - p
Gd
B = p
L - p
Bwhere p
i are robust estimates of location (typically, the median of all pixel samples in each image).
The SNR-optimized synthetic luminance is given by:
L
opt = r
L*L + r
R*(R + d
R) + r
G*(G + d
G) + r
B*(B + d
B)
This process can be done with PixelMath and the JavaScript runtime, but it is tedious. However, it is very easy to implement with the ImageIntegration tool. If you work with an OSC camera you have to split your color image first with the ChannelExtraction tool, and save the individual R, G and B images as FITS files. Open ImageIntegration and select the four files. Then leave all tool parameters by default (you can click the Reset button to make sure) and click the Apply Global button. The relevant parameters are as follows:
- Combination = Average
- Normalization = additive with scaling
- Weights = Noise evaluation
- Scale estimator = iterative k-sigma
- Generate integrated image = enabled
- Evaluate noise = enabled
- Pixel rejection = No rejection
- Clip low range = disabled
- Clip high range = disabled
You can make several tests with different scale estimators and select the one that yields the highest noise reduction. The integration result is the optimal luminance image that you can treat in the usual way (deconvolve it if appropriate, stretch it to match the implicit RGB luminance, combine with LRGBCombination, etc).
Note that the same procedure can be used to compute an optimal luminance for an RGB image, that is without an additional L image. In this case just use one of the RGB channels as the reference for integration.
[Edited to fix an error in the equation for combination weights (missed the squares in the denominators - necessary since we are minimizing mean square error)]
[Edited to include zero offset normalization]