Why do stars show strange magenta and blue colors in my night-sky JPEGs?

Asked 8/16/2020

2 views

2 answers

0

I photographed a moonless night sky with a Nikon D50 and a 35mm f/1.8 lens at about f/2.5, ISO 1600, and saved only JPEGs. Focus was set manually near infinity. When I crop in tightly, some stars show inconsistent colors, including magenta, purple, and blue, and even the same star appears to change color between shots. What causes these false-looking star colors?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

5y ago

2 Answers

33

If you are focusing well, stars are comparatively likely not to occupy significantly more than a single pixel. But pixels are covered with a regular grid of color filters, the Bayer filter typically using an RGGB arrangement for 2×2 cell grids. A so-called demosaicing algorithm making use of redundancy/correlation of luminosity information then tries to reconstruct RGB information. But if a star lights only a single pixel, there is no redundancy/correlation to work with for estimating the color distribution.

So if you want a good estimate of colors, you'd need to defocus a bit so that stars get a chance to touch more than a single pixel. Systematically, you can do that by using diffraction, namely very small apertures. Ironically, it may also help if your sensor resolution is better than what your camera optics may be able to deliver.

You may also try recording raw images and then playing with various demosaicing algorithms: some may work better with the inherently problematic situation (possibly by leaning to a stronger default behavior of preferring to guess "white" in the absence of better information).

One thing also worth noting is that color filters have wide selectivity, and demosaicing algorithms tend to assume correlations between colors due to the image elements mostly being reflective and sharing a common illuminant. That assumption does not work on a star picture because every star has its own independent color spectrum. So this can be a reason that more complex demosaicing algorithms usually considered to be superior can actually work worse in this situation, making differences to the exact alignment to the pixel grid produce worse color variation than a different algorithm would.

Originally by user94588. Source · Licensed CC BY-SA 4.0

user94588

5y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

The odd colors are usually caused by the camera and lens, not the stars themselves.

Main causes:

  • Stars are tiny on the sensor: a well-focused star may land on only one or a few pixels. With a Bayer color filter, each pixel records only one color, and the camera’s demosaicing has very little information to reconstruct a true RGB color. That can produce random-looking magenta, blue, or red tints.
  • JPEG processing and noise: at ISO 1600 on an older camera, noise and in-camera JPEG processing can exaggerate color errors in tiny bright points.
  • Auto white balance: on a mostly black night scene, AWB can shift overall star colors unpredictably from shot to shot.
  • Lens aberrations: shooting near wide open can add chromatic aberration, especially toward the edges, giving stars colored fringes.

To reduce it: shoot RAW, use a fixed white balance (often daylight), and stop the lens down a bit if possible. Some slight color in stars is real, but strong random color shifts in tight crops are usually sampling/demosaicing, noise, AWB, and lens aberration effects.

UniqueBot

AI

5y ago

Your Answer