Monday, March 2, 2026

Stretching and HDR Processing

Although my previous post using M42, the Orion Nebula, was to demonstrate image stacking in astrophotography, the image based on the 80x8sec stack is quite good and so I decided to redo some of the post processing and make a few additional improvements.

First, the nebula suffers from the large dynamic range in brightness between the inner core and the subtle outer regions, i.e., the core tends to get 'blown out'. This is true of a number of objects that have bright interior regions, such as galaxy cores, and in this case, bright nebulae. M42 has the famous Trapezium Cluster, a young open star cluster with four equally bright stars in a tight orientation, located in the center of the nebula. But because the nebula itself is so bright the cluster is hard to make out.

Second, I did not properly account for the background when applying the Multiscale Adaptive Stretch (MAS) and so some of the fainter outer regions of the gases did not appear as I would like. 

But before showing the result of these improvements I need to explain the concept of stretching.

Stretching  

Both stacking and stretching are always necessary in astrophotography post processing. Whereas stacking helps increase the SNR of the image and gain the benefit of a long integration time without having to take extremely long exposures, stretching is necessary to make the image visible.

In astrophotography, stretching an image means remapping the brightness values in the photo so that very faint details become visible, without blowing out the bright parts. It’s a core processing step for deep‑sky images.

When you capture the night sky (especially galaxies, nebulae, or dust clouds), the camera records light in a linear way. If you have twice the light hitting the sensor, the pixel value where the light is recorded is twice as high. However, most of the signal from faint objects is packed very close to black. Only stars and bright cores of nebulae and galaxies stand out in the image. In fact, if you looked at the raw or stacked image, it usually appears almost totally black, maybe with a few bright stars. But there is a lot of data there; it just isn't spread across the range the human eye can perceive.

Stretching applies a non‑linear transformation that expands the dark tones, where most of the image data resides and compresses the bright tones. In other words, it separates faint structures from the background.

MAS is a form of stretching that has recently been introduced in PixInsight, my processing software of choice. Similar to the other tools in PixInsight I have used in the past, it stretches the image so that the faint data can be brought to light. However, MAS also provides some additional options to make the stretch even better and offers the user a lot of flexibility when it comes to contrast preservation, enhancement of faint details and removal of the background sky glow.

HDR Multiscale Transformation

Handling the large dynamic range in brightness of an object is accomplished with an application of a High Dynamic Range transformation process. Usually this is done by stacking subs with small exposures (to capture the bright areas) and large exposures (for the dimmer regions). The stacking process will then provide a more pleasing result preserving detail across extreme brightness differences. The HDR Multiscale transformation process allows one to do this without the need of exposing subs with different exposure times. You can apply it to the single final stacked image.

Applying the Processes

Here is the original image of M42 right out of the camera with minimal initial post processing. As expected, it is almost totally black. The bright inner core is visible as is the Trapezium cluster.


Applying the MAS stretch reveals the data lurking down in the image. This is the same image as the 80x8sec image in my previous post. The nebula now stands out (note the Trapezium is swamped by the bright emission gases in the core). 


However, the default settings on MAS use the complete image to determine the mean background intensity and so it was not handling the removal of the background as best as it could. By selecting an area of the image devoid of any real signal (I used a section in the lower left) and providing that as the background reference for MAS, the result is much better - the outer extent of the nebula can now be seen.


However, the core of the nebula is now even brighter, and the details of the gas structures is almost non-existent. This is the problem with M42 - the range of brightness between the lightest regions and darkest regions is very large. And this is where HDR comes in. Applying HDRMT with just the right settings (a trial and error manual process by the way) we get the following image.


A run through with Paint Shop Pro yields the final result, ready for printing and hanging on my office wall!. All the wonderful elements of this famous nebula are now clearly visible, from the inner core detail to the outer edges and even the Trapezium.






 

No comments:

Post a Comment

Stretching and HDR Processing

Although my previous post using M42, the Orion Nebula, was to demonstrate image stacking in astrophotography, the image based on the 80x8sec...