Skip to content

Histogram Stretch ​

Step: Stretch

Brightens a linear astro image so that faint nebulosity becomes visible, while keeping bright stars from burning out.

Parameters ​

ParameterRangeDefaultEffect
Shadows0 … 10Everything at or below this value becomes black. Raise it to darken the sky background.
Midtones0.001 … 0.9990.5Bends the curve. Below 0.5 brightens, above 0.5 darkens. Astro images typically need very small values.
Highlights0 … 11Everything at or above this value becomes white. Must be greater than Shadows.

Histogram ​

While Histogram Stretch is open, the image histogram sits above the parameters. It shows one curve per channel (a single orange curve for mono images, red, green and blue for color images). Vertical lines mark the parameters: Shadows and Highlights as solid lines, Midtones as a dashed line at the input level that the curve maps to 50 % brightness. The lines move while you drag the sliders.

Below the curves, Med and MAD give the median and the median absolute deviation of each channel. The LOG / LIN button in the corner switches between a logarithmic and a linear y-axis. It changes the Logarithmic scale setting, see Settings.

How it works ​

  1. Values are clipped to the range from Shadows to Highlights and rescaled to 0…1.
  2. The result is bent with the midtones curve, a rational function also known as Schlick's bias function (Graphics Gems IV, 1994). It maps 0 to 0, the midtones value to 0.5, and 1 to 1:
f(m, x) = (m − 1) · x / ((2m − 1) · x − m)

Tips ​

  • Stretch in several small steps rather than one large one. Every step is in the history and can be undone.
  • Keep Shadows just left of where the histogram starts to rise. Clipping too much destroys faint signal for good.