New Script: iHDR -- Advanced Multiscale HDR Stretching!

Uri Darom

New member
After many few weeks of refinement and testing, I am happy to present a script I have been working on for a while!

1709677888258.png


iHDR allows you to stretch the image in a way that preserves the bright areas while revealing its fainter regions.
An example use case for this script would be revealing the faint extensions of a galaxy, while not blowing out the bright center.
Below I have attached the image before iHDR, the image after two executions of iHDR, and the image stretched using HistogramTransformation instead (data courtesy of Prashant Ranganath):

Example 1: Galaxy

M101iHDR_Demonstration.png
M101iHDR_Demonstration.png


Note how the bright core of the galaxy is preserved while its outer arms are revealed, all while preserving the contrast of the image.
Galaxies are not the only use case; below is an example with the Orion Nebula:

Example 2: Nebula

OrioniHDR_Demonstration.png
OrioniHDR_Demonstration.png


Installation and Use:

To use the script, simply stretch the image (using HistogramTransformation) such that the bright areas (i.e., nebula / galaxy core) are at the brightness you want them to be in the final image. Then, select the appropriate preset and click Execute.
  • Often, you will find you need to run the script multiple times. In the above example, it was run three times.
  • If you want to increase how much the bright areas are preserved, increase the Mask Strength parameter.
  • If you want to decrease how much the image is stretched, reduce the Stretch Intensity parameter.
To install the script, use the following repository: https://astrouri.com/pixinsight/scripts/iHDR/
  • Note: since my developer certificate has not been approved yet, PixInsight will warn you about the script being unverified.


I would love to know people's thoughts or feedback!
 
Last edited:
Hello there! I tried to access the repository but I got the following message:

404​

File not found

The site configured at this address does not contain the requested file.

If this is your site, make sure that the filename case matches the URL as well as any file permissions.
For root URLs (like http://example.com/) you must provide an index.html file.

Read the full documentation for more information about using GitHub Pages.

GitHub Status@githubstatus
1710714026399.png

Was the repository changed to another link?
 
Hello there! I tried to access the repository but I got the following message:

404​

File not found

The site configured at this address does not contain the requested file.

If this is your site, make sure that the filename case matches the URL as well as any file permissions.
For root URLs (like http://example.com/) you must provide an index.html file.

Read the full documentation for more information about using GitHub Pages.

GitHub Status@githubstatus
View attachment 22429

Was the repository changed to another link?

Hey! The repository should be used in PixInsight; accessing it in a web browser will not work. Here are instructions for installing the script:

1. In PixInsight, go to Resources--> Updates --> Manage Repositories
2. Click the "Add" button on the bottom left of the popup
3. Enter the repository https://astrouri.com/pixinsight/scripts/iHDR/ and click "OK"
4. Close the window and click on Resources --> Updates --> Check For Updates
5. Click "Apply" on the bottom right of the popup and restart PixInsight
6. The script should appear under Scripts --> Sketchpad --> iHDR
 
Back
Top