Page 1 of 1

Using PI to Repair Magenta Stars while Protecting Nebula

Posted: Sat Jul 04, 2020 7:41 pm
by STEVE333
PI has a script named CorrectMagentaStars which does a nice job of repairing the Magenta stars that often occur when doing SHO image processing. One side effect of this script is that it will also remove Magenta from other parts of the image. The side by side images below show an image before (Left) and after (Right) the application of the CorrectMagentaStars script. While the stars are well corrected, the colors of the nebula have also been altered leaving the nebula with a bit of a "greenish" cast.

Image


The Magenta stars can be corrected while leaving the nebula untouched by doing the following:

1) Create two copies of the original image; name one R (for Repaired) and the other CMS (for CorrectedMagentaStars).

2) Apply the CorrectMagentaStars script to the CMS image.

3) Apply the StarMask process to the original image. The settings shown below may be a good starting point.

Image


4a) Open the Binarize process. Expand the star_mask image and, after positioning the cursor over one of the dimmer stars, left click on the dim star. This will set the Threshold for the Binarize process. All stars as bright or brighter than the selected star will get corrected.
4b) Apply the Binarize process to the star_mask image.

5) Apply the binarized star _mask image as a mask to the R image.

6) Open PixelMath and enter the information shown below making sure all the checkboxes are the same.

Image


7) Drag and drop the PixelMath Apply icon (triangle) onto image R. This will repair image R. The side by side images below show the results of applying this technique. The image on the Left is the original image and the image on the Right is the "Repaired" R image. Notice that the stars have all been corrected, but, the nebula has been left UNTOUCHED.

Image


A set of Process Icons to perform this procedure can be downloaded at the link below:

https://www.dropbox.com/s/lmi5cv3obube7 ... .xpsm?dl=0

Hope you find this helpful.

Steve