🎨 Stretching the Histogram

Stretching and Finishing · lesson 10 of 12 · 3 min

The stretch is the moment your image truly appears. It is also the step that requires the most judgment: too timid, and the object stays dull; too strong, and the noise explodes and the background turns washed-out gray or ink black.

What a stretch does

A stretch applies to each pixel a curve that strongly brightens low values (where the nebula's signal lies) and compresses high values (the cores of stars and galaxies). The histogram, initially packed to the left, widens toward the right. Once this step is done, the image is no longer linear.

Siril offers several tools. The three most useful are presented below.

The asinh stretch

It applies an inverse hyperbolic sine function, which brightens faint light while preserving the ratios between channels: star colors stay saturated instead of turning white. It is an excellent first stretch, especially for a color image. You adjust its strength and the black point.

Histogram transformation

This is the classic tool, with three sliders:

  • the black point: everything below it becomes black. Move it with great care, up to the foot of the sky background peak, never beyond;
  • the midtones: moving this slider brightens the whole image; it does most of the stretching;
  • the white point: rarely useful in astronomy, it is generally left at maximum.

Generalized hyperbolic stretch

More recent, this tool (often called GHS) lets you choose precisely the brightness range you stretch the most, and protect the highlights. It offers a lot of control, at the cost of a longer learning curve.

The right method: gradually

Rather than a single brutal stretch, proceed in several moderate passes, watching the histogram each time:

  1. A first stretch (asinh or histogram transformation) to bring out the object.
  2. One or two gentler passes to adjust the object's brightness.
  3. A final black point adjustment, leaving the background peak lifted off the left edge.

A useful benchmark: the sky background should remain very dark gray, not pure black. On the final histogram, its peak sits clearly to the right of the left edge, often around the first tenth or first fifth of the range. This margin preserves the object's faint extensions and avoids a "cut-out" look.

Preserving the cores of objects

The core of the Andromeda Galaxy or the Orion Nebula is hundreds of times brighter than their extensions. A strong stretch burns these cores into a white blob with no detail. To preserve them, use the highlight protection of the hyperbolic stretch, masks, or combine a lightly stretched version for the core with a heavily stretched version for the extensions. For M42, many astrophotographers also take short exposures specifically for the core.

Checking on another screen

Screens differ greatly in brightness and contrast. An image adjusted on a very bright screen will look murky elsewhere. Set your screen brightness to a moderate level, work in a dimly lit room, and check the result on another device, such as a phone.

Key points

  • The stretch brightens faint light and compresses bright light: the image becomes nonlinear.
  • Asinh preserves star colors; histogram transformation works on the black point and midtones.
  • Stretch in several moderate passes while watching the histogram.
  • The background should remain very dark gray, with its peak lifted off the left edge.
  • Protect the cores of bright objects with masks, highlight protection, or short exposures.

🧮 Exercise

Stretch your image in two ways: a single strong histogram transformation, then an asinh followed by two gentle passes. Compare the background, the noise, and the star colors.