5
\$\begingroup\$

I wanted to capture this beautiful dawn. The colors came well but the gradient is banded, if you see closely.
I know we can post process the image to smooth it out, but I would like to directly capture smooth gradients.

enter image description here

Update: Added the original image, was captured as jpeg. The bands are more clear in here than the compressed one.
Settings on D5100:
Aperture: F3.5
Shutter speed: 1 sec
White balance: Direct Sunlight(preset)
ISO: 100 Original Image

Camera: Nikon D5100

\$\endgroup\$
6
  • 3
    \$\begingroup\$ Is this evident in the original image. Is camera set to best possible quality? We need the original image. What camera? What camera settings? What processing software? This may be a camera artefact, or a processing one. It may be due to compression. anywhere along the chain. This is apparently a dynamic range issue BUT where it is occurring is the question. As you get darker the lower intensity areas have less bits to convey intensity and banding will occur as of right BUT how badly it occurs depends on the factors above. Without knowing them it's hard to help. \$\endgroup\$ Commented Jul 8, 2012 at 22:18
  • 3
    \$\begingroup\$ This kind of posterization artifact is very consistent with too-high JPEG compression. \$\endgroup\$
    – mattdm
    Commented Jul 9, 2012 at 3:17
  • \$\begingroup\$ As @mattdm stated, this is an inherent issue with JPEG compression. As you increase the compression level, the first things to go are solid color areas and smooth gradients, simply due to the nature of how JPEG images are compressed. Use RAW capture, and save your images as 16-bit TIFF to preserve as much original detail as possible. If you must save as JPEG, use the highest quality setting you can, preferably 100%. \$\endgroup\$
    – jrista
    Commented Jul 9, 2012 at 3:24
  • \$\begingroup\$ @RussellMcMahon: Please keep that discussion to meta, as I asked before. We don't need to be dragging that through the public forum every time someone posts an image. \$\endgroup\$
    – jrista
    Commented Jul 9, 2012 at 3:56
  • \$\begingroup\$ @Jrista - I'm surprised that members interests are not of enough concern that bringing this to their attention where it is wholly relevant is not considered appropriate. \$\endgroup\$ Commented Jul 10, 2012 at 2:09

2 Answers 2

5
\$\begingroup\$

The banding looks like 8 bit quantization noise to me since it looks very much like synthetically generated images where I have seen the same thing and know that was what was going on. Generally 8 bits per color per pixel is good enough, but not always. With a slowly changing flat area with little noise you can see banding with 8 bits, which this certainly looks like.

No, this is not likely the fault of your camera. I didn't look up what the width of raw values from a Nikon D5100 are, but very likely more than 8 bits. Assuming you were using near the full dynamic range of the sensor, the raw image won't have this level of banding. The problem is that just about all display systems use 8 bits per color per pixel, so therefore any post processed image will be limited to that. Even with a higher depth post processed image, you'll still be back to 8 bits/color/pixel on most displays.

It may sound like you're screwed by the physics, but there is a way to fix this. The solution is dithering. A simple 2x2 dither pattern gives you effectively 10 bits/color/pixel, which is enough to make the banding dissappear. Dithering a 8 bit intensity with a fixed 2x2 pattern will be invisible for practicle purposes. Even if someone is pixel peeping, it will be very difficult to notice the change of 1 value between adjacent pixels. The funny thing about dithering is that it works better the less you need it.

There is one gotcha though. While dithering from the raw to the final 8 bit image will eliminate the bands for practical purposes, it will cause trouble with some compression schemes. JPG compression may decide that the adjacent values are close enough and "skip over" the dithering. Other schemes may not compress well. LZW compression as is common in TIF files will work well. If the end result is a JPG, select the highest possible "quality" level (usually 100) and check whether it flattened the dithering or not. You may have to stick to lossless compression schemes.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ The banding in the high res version is due to JPEG compression (specifically chroma subsampling) giving even fewer than 8 bits! 8 bits is usually enough for a noisy image where the noise gives you a dithering effect. \$\endgroup\$
    – Matt Grum
    Commented Jul 9, 2012 at 13:54
  • \$\begingroup\$ I captured the original image as jpeg and not RAW. And the bands are more visible in the original one. @Olin:When I do the dithering in Photoshop, the stars are lost. My way was, select the gradient part, Image > Adjustments > Posterize. Do you have a pointer for better dithering? \$\endgroup\$
    – Alexander
    Commented Jul 9, 2012 at 21:09
  • \$\begingroup\$ @Reddy: I use my own software for such things, so I don't know. A 2x2 dither pattern is a pretty simple algorithm to write, but you have to start with something better than a 8 bit image. Once the color channels have been quantized to 8 bits, the information has already been lost. I wouldn't trust some "dithering" knob in photoshop to do anything like what you want in this case. \$\endgroup\$ Commented Jul 10, 2012 at 23:47
-1
\$\begingroup\$

This is apparently a dynamic range issue BUT where it is occurring is the question.
As you get darker the lower intensity areas have less bits to convey intensity and banding will occur as of right BUT how badly it occurs depends on the factors mentioned below. Without knowing them it's hard to help.

Is this evident in the original image?
Is camera set to best possible quality?

What camera? What camera settings? What processing software? What compression applied?

This may be a camera artefact, or a processing one. It may be due to compression. anywhere along the chain. We need the original image as a starting point. Can you save the original image somewhere so we can view it.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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