Fundamentals · PixInsight 1.9.x

CurvesTransformation

CurvesTransformation maps every input value to an output value along a curve. This allows contrast, saturation and hue to be changed in specific tonal ranges while other ranges stay untouched.

Purpose

TaskCurve shape
Build contrastS-curve on RGB/K
Raise saturation without boosting background and colour noiseCurve on channel S with a protection point
Shift huesCurve on channel H
Match individual tonal ranges to measured valuesCurve with fixed points

Principle

The x-axis is the existing value, the y-axis the new one. The diagonal leaves the image unchanged.

Curve in a rangeEffect
above the diagonalbrighter or more (saturation)
below the diagonaldarker or less
steeper than the diagonalmore contrast in this tonal range
flatter than the diagonalless contrast in this tonal range

Channels

ChannelActs onNote
RGB/Kall colour channels equally, or a greyscale imagedoes not change the colour balance; the only effective channel for greyscale images
R, G, Bindividual colour channelsshifts the colour balance – unsuitable for contrast
Ssaturation (x = existing, y = new)colour images only
Hhue (x = existing, y = new)shifts hue only; brightness and saturation stay

Operation

  1. Check beforehand that no mask is active (Mask → Remove Mask), unless you are deliberately working with one.
  2. Reset the curve (reset icon) and choose the channel. Otherwise a channel from an earlier application stays selected.
  3. Create a point by clicking on the curve; keep it selected and enter Input and Output numerically below.
  4. The end points at 0 and 1 are fixed horizontally; with an end point selected, Input is greyed out. The display on the right (e.g. “3 / 5”) shows the selected point and the total.
  5. For precise work in the dark range, enlarge the graph with the zoom field. In a stretched astro image almost all pixels lie near the background: background at the histogram peak, faint structures on its right flank, bright areas far to the right. One grid line equals 0.25.
  6. Judge the effect in the Real-Time Preview, then apply.

Typical curves

S-curve – contrast

Whyan S-curve?

It lowers the shadows and lifts the highlights slightly; in between, the curve is steeper than the diagonal – exactly where structures lie, contrast increases. On RGB/K it acts on all channels equally and does not change the colour balance.

RangePositionEffect
Shadowsjust left of the histogram peaklowering → dark areas darker
Midtonesapprox. peak to 0.5steeper than the diagonal → structural contrast
Highlightsupper rangeslight lift, flattening towards the end → bright areas more three-dimensional
  • Rule of thumb for a moderate curve: points deviate from the diagonal by no more than about 15–25 %.
  • Example, moderate: shadow point 0.08 → 0.06, highlight point raised slightly.
  • Example, too strong: shadow point 0.082 → 0.037 – structures very three-dimensional, but dark areas nearly black without fine structure.

Saturation via channel S

Whychannel S rather than ColorSaturation?

Channel S is a curve over the existing saturation. It lets you leave weakly saturated pixels (background, colour noise) unchanged and amplify only pixels that already carry colour. ColorSaturation works by hue and is a useful addition when one particular colour should be raised.

A single raised point lifts the curve along its whole length – including at low saturation. Set a protection point:

PointInputOutputPurpose
Protection point0.10–0.15equal to inputbackground and colour noise unchanged
Structure pointapprox. 0.45–0.5input + approx. 0.05raise existing colours moderately
optional, uppere.g. 0.75e.g. 0.85additionally strengthen strongly saturated areas

Shifting hue with channel H

A point in the relevant hue range is moved up or down; the hue shifts accordingly. Brightness and saturation stay.

  • Only small shifts – large ones create hard colour transitions.
  • Hold neighbouring ranges in place with extra points on the diagonal.
  • Hue-dependent saturation is not possible with channel H; use ColorSaturation.

Matching tonal ranges to measured values

Whya curve and not a black point?

A black point shifts all tonal values and also moves ranges that already match. A curve with fixed points changes only the range between them.

Measured values become curve points directly: Input = measured value, Output = target value. The curve interpolates smoothly between the points.

GoalPoints
shift midtones onlyfix dark and bright with output = input, move the mid point to its target
match contrastall measuring points to their targets

The complete procedure: .

Darkening the background

Whya curve rather than a black point?

The curve lowers the background without clipping values; dark structures fade softly into darkness. A true black point clips everything below it hard. The curve is therefore the gentlest option when the background is only slightly too bright.

PointInputOutputPurpose
1background peakslightly lower (e.g. −0.03)darken the background
2approx. 0.40equal to inputfix the midtones
  • Point 1 on the peak, not at the left foot: the darkest structures lie at the foot; a point there mainly darkens them while the background at the peak stays grey.
  • Without a midtone point the curve lies entirely below the diagonal and darkens the structure too.
  • If the background is clearly too bright, a true black point is appropriate: or HistogramTransformation with the clipping display (below about 0.01–0.05 %).

With a mask

If only part of the image should be affected – for example nebula brighter than the background – a mask limits the effect (e.g. ). White = full effect, black = none.

What a good result looks like

Typical errors

ObservationCauseRemedy
Curve has no effectchannel S or H active on a greyscale imagereset the curve, channel RGB/K
Effect only in parts of the imagemask still activeMask → Remove Mask
Colour cast after a contrast curvecurve on R, G or B instead of RGB/Krepeat on RGB/K
Dark areas featureless blackshadow point lowered too muchlower it less
Background coloured after saturationprotection point missingprotection point at 0.10–0.15
Posterisation, wavespoints too close or too steepfewer points, gentler course
Curve entirely above or below the diagonal although contrast should be matchedinput error, e.g. mistyped outputcheck values

When to use it – and when not

Good forBetter another tool
shaping global contrast in specific tonal rangesemphasising local contrast →
raising saturation depending on existing saturationraising one specific colour → ColorSaturation
slightly shifting hueswhite balance, colour calibration →
matching tonal ranges to measured valuesinitial stretch of linear data →
Used in

GeneralizedHyperbolicStretch (GHS) · HaLRGB workflow · LocalHistogramEqualization (LHE) · LRGBCombination · Matching luminance and colour image · Narrowband workflow (HOO/SHO) · OSC workflow with a quad band-pass filter · RangeSelection (Range Mask) · SCNR