View Single Post
  #1  
Old 05-08-2014, 10:47 PM
troypiggo's Avatar
troypiggo (Troy)
Bust Duster

troypiggo is offline
 
Join Date: Nov 2008
Location: Brisbane, Australia
Posts: 4,846
using PixelMath to get rid of magenta stars in SHO/Hubble palette narrowband

Update: See post #8 below. I've tweaked the formula specifically for magenta now, and updated the zip file with process icon below. Just download the zip file, unzip somewhere safe and memorable (My Documents/PixInsight or something like that). In PixInsight, choose "Load process icons" and browse to that xpsm file you unzipped. The magenta_reduction PixelMath process icon should appear on the PI desktop, and you can just drag and drop that on your image.

R: $T[0]
G: iif(min($T[0],$T[2])>$T[1],min($T[0],$T[2]),$T[1])
B: $T[2]

-----------------------
Not sure if this has been done before, but I had this idea recently on how to get rid of the magenta stars in SHO narrowband images due to the red SII and blue OIII channels needing to be stretched so much to balance strong G Ha. A common Photoshop method I've seen is to do a selection based on colour (magenta), and desaturate it.

It occurred to me that with PixelMath we may be able to achieve something like this. We could detect if a pixel is magenta by checking if it's R and B channels were of similar value (within some acceptable range), and if they both were significantly brighter than the G channel.

With this in mind, I came up with the following formulae. I found some stars needed a luminance rule in there too.

R: $T[0]
G: iif((CIEL($T)>MIN_BRIGHTNESS)||((mi n($T[0],$T[2])/(max($T[0],$T[2])>MAGENTA_DEFN))&&(mean($T[0],$T[2])>$T[1])),mean($T[0],$T[2]),$T[1])
B: $T[2]
Symbols: MAGENTA_DEFN = 0.9, MIN_BRIGHTNESS = 0.9

Attached are some sample before and after images (not my images, but have sought the approval of the image owners where possible. Some were from a Google image search). Seems to work ok to me. Thoughts? Any improvements or suggestions on the above?

I'm just hoping it is a quick and simple solution to what seems to be a common issue with narrowband images. Just drag and drop the attached process icon on your final narrowband image with magenta stars and they're gone.
Attached Thumbnails
Click for full-size image (Eta before after.jpg)
134.2 KB134 views
Click for full-size image (NGC7822 before after.jpg)
145.5 KB105 views
Click for full-size image (Bob Frank before after.jpg)
68.0 KB106 views
Attached Files
File Type: zip Magenta_Star_Reduction.zip (890 Bytes, 79 views)

Last edited by troypiggo; 10-08-2014 at 06:23 PM.
Reply With Quote