Pentax K20D Banding Revisited

By now, quite a few people helped me out with some test shots. Thank you guys!

Here are the results so far. Please let me first say a few quick words about the analysis. All photos were taken at ISO 200 with the D-Range function turned on and exposure compensation set to minus 2, mimicking dark parts of an image. The camera pointed towards the sky and was unfocused. Please note that depending on the light source used, different channels are differently amplified, resulting in the artifact showing up in different color channels more or less. Candle light scenes, which have been proven especially cumbersome might show the artifact primarily in the blue channel because there is almost no blue light, resulting in a higher amplification of the blue channel. The analysis was done by reading in the images and calculating an average over rows of the image. This average is then filtered with a 5 pixel sliding average filter to reduce random noise. A divisive white balance ensures equal values for all color channels. Then the static part of the trace is subtracted, leaving only fluctuations comprised of noise and the artifact (if present). Therefore all numbers given for the artifact here are the absolute brightness difference in an 8 bit (256 brightness steps) image. I chose this method because the artifact seems to be mainly present in dark parts of the image and does not scale with brightness. Therefore I did not normalize it by the standard deviation or the average background. An absolute value of 2 at minus 2 f-stops corresponds to a change in luminance of about 5-10%! The stripe is therefore 5-10% percent darker or lighter than the rest of the image. This is well visible directly in homogeneous image parts and will not only be visible after extensive post processing in Photoshop! I am not debating a purely academical problem here (at least not for all cameras).
First, let’s have a look at different people: do all cameras show the problem? The clear answer is: No! At least one of 6 tested K20D’s shows no artifact at all.userDiagram.png Three other cameras do show an artifact but it is so light that it will hardly be an issue. And two cameras, including mine, do show an artifact which is visible by naked eye. Please note that one user (josei) has a negative artifact (negative = slope is negative 😉 )! Usually the stripe is a dark one, but for him the stripe is brighter then the rest (although it matches exactly the location of other cameras artifact). In one other case the artifact is negative in one channel and positive in the other (stevo). This is marked in in a display of four cameras artifacts. The other marks show no artifact (frasei). user.pngI also attached an image of the stripes appearance in real world shots. This is amplified! For the first case the stripe is visible in an unamplified version but since many PC monitors are too dark it would not be visible in this low quality web image. (The second one was shifted a bit to the left accedentially in Photoshop, try to find the band’s border ;-)) The other examples show little or no artifact.user.jpg
To test the reproducibility of the artifact I tested it against 2 variables: brightness and exposure time. One would expect to see no difference for brightness and a decline of the artifact with shorter shutter times (longer shots, more noise). However, what happens is quite the opposite. exposuretimeDiagram.pngThe artifact correlates best with the darkness of an area and not with exposure time. For different times from 1/1000s to 2 s the amplitude stays almost constant. However, while it is extremely low in bright parts of the image, where it is rendered invisible by the high background brightness anyway, it kicks in most in dark image parts. At -2 or -3 f-stops it is worst.brightnessDiagram.png
So how should one summarize the result?

  • The stripe/banding artifact (the pattern noise type described here, I am not talking about banding from pixel to pixel!) in Pentax K20D cameras is present in most cameras but low for the majority of them
  • While some cams do not have it at all, others are so severely affected that the Pentax service should take a look at them
  • For affected cams, shots at low ISOs and especially with the D-Range function turned on can show banding under difficult conditions like dark clouds or candlelight scenes. High ISO shots without noise reduction might be completly destroyed (one example, not shown)

Tags: , , , , ,

Tuesday, March 31st, 2009 Photography No Comments

Banding Artifact of a Pentax K20D

The newest addition to my collection of cameras is a Pentax K20D DSLR. It is now my main camera which I regularly use. Considering the extremely good price point and all its features, it is a really great tool. There is nothing negative I could say about it, except one special problem: pattern noise banding at the left side of the frame under low-light, low-ISO conditions. It’s worst when the dynamic range compression is used. There has been quite some debate on the Internet about it. One group of people have the problem and say it’s real, the other group wants to defend the Pentax altar (which I usually would also do) and accuses the first group of broken memory cards and exaggeration via increasing exposure in postprocessing. A typical claim of this group would be “You can get everything when you brighten the image in Photoshop!”. Since I discovered the banding issue in my pictures as well, I decided to do a little testing. When I spotted it in an image which was not processed for the first time (I’d known it from shopped photos) I was trying a few things for a still life photograph:


And there is the first problem: if your monitor settings are not ideal, you might see little or no artifact. But several posters in discussion groups have fallen into that fallacy: just because a low-quality web snapshot shows little, does not mean the image is ok. In fact, on a calibrated monitor with the full resolution RAW-file opened, the artifact is prominent and destroys the picture.  Since the banding ruined several of the images in this series, I decided to investigate the problem. I took a few series of test shots of out-of-focus, gray overcast sky. These images are then read into a little program I wrote, which averages all rows of the image so that a vertical banding will appear as a dip or bump. The is average trace for each color channel is additionally smoothed with a 5 pixel, phase neutral, sliding average filter (the artifact stays in place, random noise is smoothed!). Out of that average trace the leftmost 20% of the frame are plotted. The banding shows up as a region with lower luminosity from row 1 to row 279 (at 3008 pixel frame width) and a gray line marks the border. Here are the parameters for the images: in-camera jpg, 6 MP resolution, colors set to natural, noise reduction medium, contrast +-0, manual WB on the clouds. Please note that the fluctuations are not the artifact but image noise and the linear trend is due to the vignetting of the used Sigma APO DG 70-300 mm at 300 mm with wide open aperture! The banding artifact is the region with overall lower luminance from 1 to about 280 (gray line). Please read the explanations below the graphs!!!


Picture 1 of 5

This is a plot of the base sensitivities of my K20D. As you can see, the artifact, the little bump around the line, is only visible in ISO 100 and 400 when DRange is off. Due to the normal exposure compensation the artifact will not be visible in the image without postprocessing. ISO 200 and 800 seems to have no artifact.

As you can see, the artifact is limited to special combinations of ISO, DRange compression and image brightness. This is probably the reason why it was not necessarily reproducible for many people.  What happens is the following: ISO 100 and 400 in particular show the artifact. ISO 200 and 800 and above are less affected. The absolute value of the artifact seems to be rather constant, explaining why it can only be seen in dark regions (-2 stop images), where it is larger relative to the overall luminance!Enabling the DRange compression does two apparent things: firstly, the ISO 100 option disappears from the K20D’s menu. ISO 200 is now lowest. And secondly, the artifact is shifted by one ISO setting. Now it appears at ISO 200 and 800, with 400 and 1600 almost unaffected. What the DRange probably does, is just multiplying dark regions with some factor, making them brighter, thereby increasing effective ISO and “calculating” the artifact into a perfectly good image. Damn! So what do we know?

  • The artifact affects paradoxically LOW ISO values, it is completely absent above ISO 1600!
  • Not all ISO values are affected
  • The effect has constant amplitude and is not multiplied by the real ISO of the sensor
  • However, it is LARGELY increased by the DRange function
  • Underexposed parts of an image are affected worst
  • ISO 200 with DRange produces the worst results. Beware!
  • Independent of: exposure time (at least up to 2 seconds), memory card, image stabilization

Here are two more pictures, showing a clean, correctly exposed ISO 200 picture and an UNPROCESSED! picture at ISO 200 with DRange on at -2 stops underexposure. This vividly demonstrated, that this artifact is NOT something which is only brought out by image processing. It is visible in dark parts of normal images at low ISO, which is, in my opinion, unacceptable!



What does this mean? I would suspect an offset problem in the sensor or it’s amplifiers! This is an image from the net, which shows the same effect even more pronounced:

What you can see is, that, just as in my camera, there is not just the stripe on the left side, but also one on the right side. Interestingly this one has no clear border! An indication that the sensor itself is the problem- not a chip which processes one part of the image later on! Since the amplitude of the effect is constant, it does not show up in bright parts of the image where it is just too small relatively. It could be very well an offset problem of the pixels amplifier! A different sensitivity of individual photo sites is highly unlikely, since the effect does not scale with brightness. So but what can we do now? Here is a list of suggestions:

  • My analysis shows which ISO/DRange  constellations you might want to avoid
  • Stay away from the DRange function. It has very little positive effect but apparently destroys some shots!
  • If you own a K20D, please take a 6 mega pixel JPG picture at ISO 200, with DRange on and exposure compensation set to -2 stops against a white wall, sky or a sheet of paper. Don’t forget the white balance. Please don’t remove the EXIF! Then use the email address on this site to send it to me: Mail me! I will post it here and we can check, whether this problem affects all K20D’s, just some of them. If it is just some, the Pentax service might be able to help us out 😉 And even if not: since the effect seems to be constant a new firmware version could be able to fix it!

So. And now, last but not least, the final result of my still life session. As you can see, it’s possible to get great shots in difficult lighting if you know the possible traps 😉


Tags: , , , , ,

Friday, March 27th, 2009 Photography No Comments