I am trying to reduce the impact of sodium vapour lighting on starscape-type images. This type of street lighting exhibits a very narrow orange spectral line, and it is common amongst astrophotographers to suppress that line using didymium filters. Now, I'd like to know how to get that effect by using digital post processing (aka "how to photoshop the ugly glare out").

An example image is below. The mill is lit by a single sodium streetlight behind my back, and the mist in the sky is lit by far-away streetlights. The wooden parts on top of the mill are painted white, so they can be used as a colour reference. Since there was no other light source around when the image was taken, removing the sodium spectral line should render the mill rather dark and those parts a relatively neutral grey.

enter image description here

For the sake of generality, and to be independent of any concrete software product, let me ask this way: How can a spectral line of a given wavelength be removed from a digital image in postprocessing?

  • I would guess that you'd take a colour sample from a white object lit by the "offending" light source. Say this gives you RGB 20,20,5. Now you'd go and create a brightness map of your image, multiply the values by the colour vector gathered earlier and subtract the result from the input image... but if I do that, I get very unusable results.
    – jstarek
    Sep 7 '16 at 20:11
  • If you post a picture I can most likely tell you how to fix it. Without a picture, this sounds like gibberish to me. Sep 7 '16 at 20:21
  • @RyanFromGDSE: Sample added. But I'd like to keep the answer applicable to any monochromatic light source.
    – jstarek
    Sep 7 '16 at 20:27
  • That's fine and thanks for the image but I still have no idea what "Narrow Spectral Lines" means. Do you just mean the overall color cast? Sep 7 '16 at 20:29
  • Well, sort of. If you look at the spectrum of most light sources, you'll see rather wide mixes of red, green, yellow and blue components. But sodium vapour lamps emit only one wavelength of light (see en.wikipedia.org/wiki/Sodium-vapor_lamp#/media/File:SOX.png) and can thus easily be filtered out by filters like hoyafilter.com/hoya/products/coloredfilters/… with matching filter curves.
    – jstarek
    Sep 7 '16 at 20:32

Short answer: you can't. Your camera's filters don't know the difference between the Na line and the wavelengths around 590 nm -- which is to say 570 to 640 or so. Once information is merged (i.e. photons of all wavelengths which pass thru a given color filter), there's no reverse algorithm possible. Further, as your source notes, even a good low pressure lamp has two lines output.

The only way to remove this light is with a narrowband filter in front of the lens. Those can be had, although not cheaply so far as I know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.