Why do maze-like artifacts appear in lens flare areas of my RAW photos?

Asked 10/23/2017

1 views

2 answers

0

On some RAW files from my Nikon D7000, I see strange maze- or labyrinth-like patterns in bright flare areas when the sun is in or near the frame. It happens with multiple lenses, so it doesn’t seem lens-specific. Example exposure was f/8, ISO 200, 1/640 s, and I’ve also seen it at ISO 100. The pattern becomes much more obvious when contrast, clarity, and sharpening are pushed in Lightroom. Other flare shots under similar conditions may show only normal noise and no maze pattern. What causes this, and how can I reduce or avoid it?

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

Photography Stack Exchange contributor

8y ago

2 Answers

8

Anything you are viewing on the screen is not raw data. Raw image data are linear monochrome luminance values and nothing else. Anything that shows more than one color is the result of the application you are using to view the image translating the raw luminance values into gamma corrected light curves and demosaicing applied to create interpolated colors and reducing it to 8-bits to be sent to your 8-bit monitor.

If you view the same raw data using an application that uses different demosaicing and gamma correction algorithms you will see different patterns which may be more or less regular than those you got with whatever application you were using to view them above.

The patterns you see in the first image are also present in the second. They're just not as widespread or as uniform. Look carefully at the transition area between the very light and very dark area near the upper left. They're there. Your first image just has much more area where there are medium tonal values that are all the same hue and are being pushed up (brighter pixels) or down (the darker pixels) by the processing algorithm.

4X crop
A 4x magnified crop of your second image

8X crop
An 8X magnified crop of an area near the top center of the above crop. Notice the 'stairstep' patterns along the diagonal area of contrast?

When you increase contrast you make the light response curve steeper and minor differences in brightness in the midtones are amplified. In effect you are forcing all pixels to be very dark or very light with not much in between.

It's just a guess, but my hunch is the dark lines in the first image are those pixels most influenced by blue filtered pixels and the lighter lines are those pixels most influenced by red and green filtered pixels. Keep in mind that all three color values for each pixel are usually interpolated during demosaicing. This is because some of the entire visible spectrum gets through all three different colored filters of a Bayer mask.¹ Some of the green filtered pixels between two blue colored pixels are being pulled darker. Most of the green pixels are being pulled with the reds towards lighter. That would explain why the lighter colored lines are usually two pixels wide and the darker lines are single pixel width.

When almost all of the light in a given area is near the same color (in terms of chroma) the only thing the demosaicing algorithm has to differentiate one pixel from the next is brightness. The veiling flare caused by the sun makes the brightness from one pixel to the next more uniform than would otherwise be the case. This might explain the phenomenon of longer straight lines of darker and lighter pixels rather than a more random distribution as seen on most of the second photo.

¹ Not only that, but also because the "red", "green", and "blue" filters we use in our Bayer masks are not the same colors as the 'Red', 'Green', and 'Blue' colors emitted by our RGB displays. Red, in particular, is nowhere near the same. Our Bayer masks tend to be centered on about 590-600nm (an orange-yellow color) that is closer to what our retinas' "red" L-cones are most sensitive to (around 565nm that is a yellow-lime-green color) than the 640-645nm our displays emit for the red channel.

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

user15871

8y ago

0

AI Answer

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

This is most likely a RAW conversion artifact, not something literally recorded as colored “mazes” by the sensor. In flare-heavy, low-detail areas, the demosaicing process used to turn Bayer sensor data into color can create maze-like patterns. Different RAW converters and different demosaicing algorithms can produce different results, so the same file may look better or worse depending on software/settings.

The issue is more likely in extreme flare regions because channel values can be very uneven there, and near-frame edges the light may hit the sensor at a steeper angle, increasing crosstalk and making demosaicing artifacts easier to reveal. Heavy clarity, contrast, and sharpening also exaggerate it.

To reduce it:

  • Try a different RAW converter or demosaicing method.
  • Reduce aggressive clarity/sharpening in affected areas.
  • Minimize strong flare when shooting: recompose slightly, shade the lens, or use a hood.
  • If possible, avoid putting the sun very near the frame edge when you need clean tonal areas.

So: the main cause is demosaicing/interpolation in difficult flare conditions, not JPEG compression or a defective specific lens.

UniqueBot

AI

8y ago

Your Answer