Fundamentals · PixInsight 1.9.x

Matching luminance and colour image

Before a separate luminance is combined with a colour image, the brightness of both must match. The procedure measures at fixed spots, evaluates the pattern of deviations and adjusts the luminance with a curve.

Purpose

TaskProcedure
check whether luminance and colour image matchmeasuring at previews
correct deviations specificallycurve from the measured values
balance remaining differencesLightness and Saturation in

Principle

Whycompare?

LRGBCombination replaces the colour image’s L* with the luminance; a* and b* remain. If the luminance is brighter than the colour image’s L* at a spot, that area gets more brightness with the same colour information – it looks paler. If it is darker, it looks oversaturated and dark. Only when both brightnesses match is the image balanced.

The goal is for background, faint structures and bright areas to relate similarly in both images. The luminance is adjusted, not the colour image.

Whyadjust the luminance and not the colour image?

The colour image is colour-balanced (white balance, background). Any curve there also changes saturation and colour balance. The luminance is monochrome; a curve there changes only brightness.

Operation

Extracting the colour image’s luminance

Whynot measure directly on the colour image?

A readout on the colour image returns channel values or their median. In a red nebula R is high, G and B low; the median then lies near G or B and underestimates the brightness. Only L* is comparable, because exactly that is replaced in the combination.

  1. ChannelExtraction on the colour image.
  2. Color space CIE L*a*b*, enable only L.
  3. Apply → greyscale image, e.g. ColourImage_L.

Defining measuring spots

Measurements by mouse click are hard to reproduce. Previews have exact coordinates, can be transferred to the second image, are saved in the project and can be measured again after every change.

  1. Draw three small previews (e.g. 20×20 px) in the luminance – with Alt+N or via Preview → New Preview… with coordinates.
  2. Rename them (double-click the preview tab):
PreviewPosition
Darkstar-free background
Midfaint structure, e.g. outer nebula
Brightbright part of the object
optional further onesarea of a second structure colour, e.g. OIII
  1. Drag the preview tab onto the other image window’s tab bar → a preview with identical position and size is created there. Both images must have the same dimensions.

Do not place them on stars or star remnants – these distort the value.

Measuring

  • Recommended: Statistics – open the process, select the preview at the top, read the median. The median over an area is more stable than a single point.
  • Alternative: Readout – Edit → Readout Options: Probe size 9×9 or 15×15, Mean or Median, Apply Global; measure at the same coordinates in both images.
Measuring spotLuminanceColourImage_LDifference
Dark
Mid
Bright

Typical applications

Evaluating the pattern

PatternMeaningCorrection of the luminance
all values similar (a few hundredths)matchesnone
only Mid differsdifferent midtonescurve: fix Dark and Bright, move Mid
Dark and Mid higher, Bright lowerluminance with less contrastgentle S-curve
Dark and Mid lower, Bright higherluminance with more contrastinverse S-curve
only Dark clearly differentdifferent backgroundblack point or curve point
all uniformly higher or lowerdifferent global brightnesscurve or Lightness in LRGBCombination
only one structure colour differssynthetic luminance contains this structure too weakly or too stronglycheck the weighting of the synthetic luminance

Matching with a curve

Each measured value becomes a curve point in : Input = luminance value, Output = value from ColourImage_L. Remove any mask first, reset the curve, channel RGB/K.

GoalDarkMidBright
midtones onlyoutput = inputtargetoutput = input
match contrasttargettargettarget

Compromise with additional signal

If the luminance contains additional signal (e.g. Ha in a synthetic or HaL luminance), faint structures are deliberately brighter there. Then do not set the Mid point fully to the target but between luminance and target value: part of the additional detail remains without strongly washing out the colours of these areas.

Example

Example (HaLRGB): comparison after stretching.

Measuring spotLuminanceColourImage_L
Dark0.1270.13
Mid0.250.18
Bright0.6580.67

Pattern “only Mid differs” (Ha signal in the luminance) → midtones only, with compromise: Dark 0.13 → 0.13, Mid 0.25 → 0.21, Bright 0.66 → 0.66.

The same data set before combining, after processing the starless images: Dark 0.14 / 0.10, Mid 0.26 / 0.20, Bright 0.61 / 0.64. Pattern “less contrast” → gentle S-curve: 0.14 → 0.105, 0.26 → 0.21, 0.61 → 0.63.

What a good result looks like

Typical errors

ObservationCauseRemedy
Measured values fluctuatemeasuring by click, star in the areapreviews and Statistics (median)
Curve entirely below or above the diagonal although contrast should be matchedinput error, e.g. mistyped outputcheck values
Dark clouds black after the curveDark point lowered too muchlower it less
Ha detail lost after combiningMid point set fully to the targetcompromise between luminance and target
Structure weaker after combiningno measuring spot on this structureadditional spot,
Preview cannot be transferredimages of different sizeensure identical dimensions

When to use it – and when not

Good forBetter another tool
before every combination of a separate luminance and a colour image (LRGB, HaLRGB, synthetic luminance)colour image without a separate luminance → no matching needed
again, whenever one of the two images has been changed afterwards (curves, saturation, LHE)remaining differences after matching →
Used in

CurvesTransformation · HaLRGB workflow · LRGBCombination · Narrowband workflow (HOO/SHO) · OSC workflow with a quad band-pass filter · Synthetic luminance