This script uses the method of de-emphasizing stars suggested by Adam Block (https://adamblockstudios.com/). The basic idea is that we need to create a so-called "halos" mask in order to fill the space around each star with the data from the starless image.
The recommended way to obtain a starless image is by using Starnet++ process. But there are other ways too.
I highly recommend watching Adam Block's presentation on his method https://www.youtube.com/watch?v=3DdSDoJfjM4
The script can be downloaded on the Releases page
The method consists of the following steps:
- Get starful image's luminance
- Apply MultiscaleLinearTransform to it in order to extract structures(stars) of a certain size
- Apply Binarize process to that
- Apply MorphologicalTransformation(Dilation) in order to make binarized stars uniform and round
- Apply Convolution to smooth dilated stars' edges
- Subtract the luminance image from the convolved image. This way we get a halos mask
- Apply the starless image to the starful image through the halos mask
- Enjoy the result or adjust the parameters and retry :)
The interface of the script allows you to see how each stage of the process modifies the image.
- Choose the target image and its corresponding starless image
- Select a preview area on the main preview image by clicking the mouse and scrolling to zoom in.
- Press the "Process Preview" button
- You can press the mouse on the "Result" area to compare the result with the original
- Adjust parameters and press "Process Preview" again to see the changes in some of the stages previews and the resulting image
- When you're ready, press the "Apply" button to start the process on the target image
- Close the script
If you have any suggestions or feedback on how to improve this script please open an issue in this repository 😉