This is Selden's method of Star Removal for Celestia Textures


Contents


0.0 Introduction.

When creating a Deep Space Nebula for Celestia, one of the problems is that there usually are many foreground and background stars in the astronomical picture. Those stars probably shouldn't be included in a model of the nebula.

This method of removing stars works best for red nebulosities associated with bright, blue stars. It replaces the stars by a blurred image of the surrounding nebula.

1.0 Procedure.

  1. From the original, sharp, colored image, filter out the bright spots, producing a blurred, colored image.
  2. From the original, sharp, colored image, extract the blue channel. Assume that it contains only stars, since this is a red nebula.
  3. Using the blue channel image as a mask, replace those masked locations in the original (sharp) image by those same locations from the blurred, colored image.

2.0 Worked Example.

This example nebula, N70, is an intermediate result taken from a larger project which is not yet completed.

For my personal convenience, this method uses both NetPBM and ImageMagick utilities. I'm sure an equivalent method could be devised using just ImageMagick or some other utilities.

Start with a high resolution, colored image. For convenience, this script scales the original, high resolution image down to 512x512.

jpegtopnm  phot-40d-99-hires.jpg >tmp1.ppm
pnmcut -height 1993 tmp1.ppm >tmp2.ppm
pnmpad -black -right 25 -left 26 -top 27 -bottom 28 tmp2.ppm >tmp1.ppm
pnmscale -width 512 tmp1.ppm >tmp2.ppm
convert tmp2.ppm n70.jpg

This image of N70, a nebula associated with the Large Magellenic Cloud, was derived from a photograph taken by the ESO's Very Large Telescope. For more information, see the ESO press release at http://www.eso.org/outreach/press-rel/pr-1999/pr-17-99.html

[N70]

Filter out the bright spots, producing a blurred, colored image. The value for noise has to be determined by trial and error, depending on how well the stars have been removed from the resulting blurred image.

convert -noise 9 tmp2.ppm tmp3.ppm
convert tmp3.ppm n70-blurred.jpg
[N70 blurred]

From the original, sharp, colored image, extract the blue channel. Assume that it contains only stars, since this is a red nebula. Create a mask by "normalizing" the image: force dark regions to be black and brighter regions to be white. The values chosen for bvalue and wvalue have to be determined by trial and error. You have to judge how well the stars have been removed from the final image.

ppmtorgb3 tmp2.ppm
cp tmp2.blu tmp2.pgm
pnmnorm -bvalue 63 -wvalue 66 tmp2.pgm >tmp3.pgm
convert tmp3.pgm n70-bluemask.jpg
[N70 Blue Mask]
Using the blue channel image as a mask, replace those masked locations in the original (sharp) image by those same locations from the blurred, colored image.
pnmcomp  -alpha tmp3.pgm tmp3.ppm tmp2.ppm >tmp4.ppm
convert tmp4.ppm n70-nostars.jpg
One of the stars was too large and bright to remove entirely. A little artistic touchup might be appropriate.
[N70 with no stars]
Here's a DSC file to place this Nebula image appropriately. I'll leave it to you to provide a "billboard" mesh for the Nebula.
Nebula "N70" { Mesh "phot-40d.3ds" Axis [0.9993 0.0141 0.0334] Angle 178.724 # 5h 43m 22s, Dec.: -67 50' 09" RA 5.7213 Dec -67.844 Distance 179000 Radius 180 }

Contents


[back to Contents]

A.0 Appendices.