8

On the photos where the lens flare is present, my Nikon D7000 is drawing strange labyrinth-looking artifacts. Here's an example.

The first image is a screenshot of a little part of the original photo zoomed 2:1 in Lightroom.

The second image is the same photo with Lightroom's contrast, clarity and sharpening set to the maximum to make the labyrinth pattern more visible.

enter image description here

enter image description here

This affects only some of the photos presenting lens flare. Here, for instance, the lens flare is present and light conditions are very close to the first photo, but there is no labyrinth pattern, only usual noise (screenshot of a part of a photo at 1:1 with contrast, clarity and sharpening set to the maximum):

enter image description here

Notes:

  • I can see this pattern only on some of the photos when the sun is in the frame or nearly in the frame.

  • It is present with any lens I tested.

  • The actual photo was shot at f/8, ISO 200, 1/640 s. I've seen this pattern in photos shot at ISO 100 as well.

  • The photo is in RAW format, so this is not a JPEG artifact.

What is that? How do I avoid it?

  • 3
    The nature of the artifacts makes me think it's happening at the demosaicing step, but there's nothing unusual about the D7000's color filter array that would prompt anything like that. I don't suppose you could provide a sample RAW? – hobbs Oct 24 '17 at 0:03
  • 3
    I have to say that if you're looking at this level of zoom at an image and searching for problems you will find them. And you then exaggerate them by e.g. sharpening. But do you actually see these things in a print ? Do they really matter or are you just making your own life more difficult worrying about them ? What you're doing would be like taking a microscope to examine a film negative and complaining about grain being visible. – StephenG Oct 24 '17 at 2:58
  • @hobbs: here's a sample RAW: drive.google.com/file/d/0B3keqY_6PUhwTjRJSXJYdU1UQUE/…. It is not that exact picture I posted in my question (since I deleted the RAW since then), but the one taken a few seconds later and which presents the exact same pattern. – Arseni Mourzenko Oct 24 '17 at 19:23
  • @StephenG: I never said I was worrying about those patterns. I am just curious about their origin, given their unusual shape; luckily, I asked the question and learned something new from the great answers. – Arseni Mourzenko Oct 24 '17 at 19:25
5

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.

7

The maze artifacts are from the demosaicing alrgorithm.

See http://www.ruevski.com/rawhistogram/40D_Demosaicing/40D_DemosaicingArtifacts.html

And the discussion of DCB here: https://rawpedia.rawtherapee.com/Demosaicing

Related What are the pros and cons of different Bayer demosaicing algorithms?

  • Good catch, that "green channel crosstalk" issue looks exactly like it. My understanding is that (due to vagaries of sensor design) half of the green pixels end up more strongly correlated with red, and half end up more strongly correlated with blue, and when it all shakes out, some algorithms interpret that as high-frequency luma content, more or less. – hobbs Oct 24 '17 at 18:10
  • This is exactly why I asked for a raw — I was hoping to run OP's image through a few alternative algorithms :) – hobbs Oct 24 '17 at 18:11
4

To confirm ben rudgers' analysis, I took the NEF file you supplied and ran it through RawTherapee.

Here's an enlargement of a similar crop with no adjustments and the default "amaze" demosaicing algorithm:

amaze

Here's the same with "DCB" algorithm:

dcb

And here's the same with the "VNG4" algorithm, which is known to be resistant to green-crosstalk, but a little less sharp overall:

VNG4

The problem area is pretty much ideal for bringing out this issue: the values in the red and blue channels are very different (blue is nearly zero, red is similar to green), there are patches of low detail (the artifacts are more apparent without actual detail covering them up), and this part of the photo is near a corner, where the light is reaching the sensor at a lower angle, making the crosstalk more likely to occur.

I tried to make another image using the "none" demosaicing mode, to illustrate the difference in value between green pixels surrounded by red ones, and green pixels surrounded by blue, but couldn't quite manage it :)

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.