HDR: Automated Local Dynamic Range Optimization

A side-by-side comparison of an image without and with local dynamic range management applied.
The HDR module puts you in full, intuitive control of local dynamic range allocation, without introducing artifacts or making the image look unnatural. Data acquisition by Marc Aragnou.

The HDR (High Dynamic Range) module optimises local dynamic range, recovering small to medium detail from your image. The module intuitively and effortlessly lets you resolve detail in bright galaxy cores, faint detail in nebulas and works just as well on solar, lunar and planetary images.

The HDR (High Dynamic Range) module optimises local dynamic range, recovering small to medium detail from your image.

This third iteration of the HDR module (as of StarTools 1.8), makes it easy to achieve natural results with minimal (or no) visible artifacts or star bloat, while making full use of the signal evolution Tracking engine.

A HDR optimisation tool is a virtual necessity in - particularly - deep space astrophotography, owing to the huge brightness differences (aka 'dynamic range') innate to various objects that exist in deep space.


5 images of M63, demonstarting the HDR module's presets.
From left to right; Original, 'Reveal' preset, 'Tame' preset, 'Optimize' preset, 'Equalize' preset. Data acquisition by Jim Misti.

The HDR module optimises local dynamic range allocation for small to medium areas than the Contrast module. As such it ideally complements a prior application of the Contrast module.

At a glance

The HDR module combines multiple strategies/algorithms into one signal flow;

  1. Local gamma correction, solves for an "ideal" per-pixel gamma correction by evaluating histogram shape (such as Pearson mode "skewness" and other statistical properties) in the context of a pixel's immediate surroundings.
  2. Local histogram remapping, solves for the "ideal" luminance value per-pixel, based on its place in a local histogram, taking into account maximum spatial(!) contrast values.
  3. Signal evolution Tracking-driven noise grain rejection ensures that - normally - noise-prone local histogram equalization (LHE), yields more robust estimates for signal/detail vs noise grain.

The HDR module operates exclusively on the luminance component of your image, retaining any coloring from the input image.

Launching the HDR module

Depending on the size (X * Y resolution) of the dataset at hand, the once-off initial processing/analysis may take some time, particularly at high resolution datasets and high 'Context Size' settings. Note that this processing/analysis is repeated every time the 'Context Size' parameter is changed, or when a new preview area is specified. Processing times may be cut by opting for a lower precision local gamma correction solving stage via the 'Quality' parameter.

However, once this initial processing/analysis has completed any parameter modification that does not involve 'Context Size', will complete virtually in real-time.


As with most modules in StarTools, the HDR module comes with a number of universally applicable presets that demonstrate settings for various use case;

  • Reveal; corresponds to the default settings, and combines moderate local gamma correction for the highlights with moderate local detail enhancement in both the shadows and highlights. This preset (and default setting) tends to be a generally applicable example.
  • Tame; targets detail recovery in the highlights by applying aggressive local gamma correction in larger highlight areas. This presets demonstrates the HDR module's excellent ability to bring larger areas in the highlights under control and reveal any detail they might contain. This preset is, for example, useful to bring bright galaxy cores under control and reveal their detail.
  • Optimize; targets and accentuates smaller detail in both shadows and highlights equally.
  • Equalize; pulls both dim and bright larger contiguous areas into the midtones equally.

A 3-panel side-by-side image showing the same region, with the middle image being significantly noiser that the right image.
200% zoom image, showing the effects of signal evolution Tracking on image quality. Left: original, Middle: 'Optimize' preset detail recovery with 'Signal Flow' set to 'Visual As-Is', Right: 'Optimize' preset detail recovery with 'Signal Flow' set to 'Tracked'.


Evaluating the effect of the above presets, the intuitive nature of the parameters become clear;

The 'Highlights Detail Boost' and 'Shadows Detail Boost' parameters generally provide a means to accentuate existing detail without affecting the brightness of larger contiguous areas, preserving that context.

The 'Gamma Highlights' and 'Gamma Shadows' parameters generally provide a great dynamic range management solution for larger contiguous areas that are very bright (or dim), however contain smaller scale detail.

The 'Gamma Smoothen' parameter controls the smoothness of the transition between differently locally stretched areas. Thought the default value tends to be applicable to most situation, you can increase this value if any clear boundaries can be seen, or you decrease this value to get a clearer idea of which areas are modified (and how).

The 'Signal Flow' parameter specifies the signal sources for the algorithm stack.;

  • Tracked; uses a version of the signal that fully takes into account noise grain propagation in the signal. This allows the module to disregard recovered 'detail' in low-SNR areas that can be attributed to stretching the noise component of the signal, rather than the signal itself. Using this setting is highly recommended if you use HDR as part of a larger workflow, and plan on further detail recovery processing, particularly with algorithms like deconvolution.
  • Visual As-Is; uses the stretched image (exactly as visible before launching the HDR module), without further noise propagation compensation.

The 'Context Size' parameter controls the upper size of the detail/structures that may provide context for smaller detail. For example, reducing this parameter will see increasingly smaller detail being accentuated, with less and less concern for larger detail. A smaller 'Context Size' value may be appropriate in cases where resolving small detail is of higher priority and larger scale context is ideally ignored (for example globular clusters). The previously mentioned caveats for changing this parameter apply; high values tend to help preserving large scale context well, but may incur longer initial processing times. Processing times may be cut by opting for a lower precision local gamma correction solving stage via the 'Quality' parameter.


Results from the HDR module are generally artifact-free, unless using rather extreme values. This third iteration of the module was specifically engineered to further minimise the artifacts of alternative implementations (such as HDRWT and AHE/CLAHE). Star "bloat" or ringing artifacts should be negligible under normal operating conditions, while noise-induced "detail" development is suppressed through the incorporation of signal evolution Tracking statistics. Highlights vs Shadows manipulations are available independently, and applying just one or the other should not yield any detectable sharp transitions.

More caution should be exercised when using extreme values far outside of the defaults or presets.