Thursday, 31 August 2017

nikon - Why is my camera drawing labyrinths on my photos?


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?



Answer



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.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...