NX101.com - A course in Nikon Digital Photography
 You are here: NX101.com » NX Gamma Tests   Donate Feedback  
Index NX Gamma Tests

Gamma encoded color space: Capture NX (1.3.2) takes a NEF, converts it to a gamma encoded color space, and presents that to you within NX for editing. The only problem with this is that some (all?) adjustments within Capture NX are not gamma aware.

Click to see gamma test results
CLICK HERE to see gamma resize test - original JPEG
Why do we care? Not being 'gamma aware' means color shifts -- and since you are editing a NEF in the first place, I am going to assume that you care about color accuracy. Not being gamma aware means color shifts.

An Example: Consider the beetle picture to the right. Looks nice? It was resized in a gamma aware program. Click on the link under the picture to see the result in Capture NX, caused by it not being gamma aware.

Most people will never notice that NX Adjustments are not gamma aware. Most photos are well exposed and rarely heavily modified. But if your photo contains abrupt changes in color or contrast or needs heavy editing, you will notice subtle shifts in color. I have noticed color shifts in several spots. (1) With D-Lighting, (2) in the recovery of extremely underexposed areas of photos, and (3) resizing photos smaller for the web.

Gamma Test Image
Classic Gamma Test Image: A classic gamma test is to create the image that you see to the right (green square over purple background) in your favorite image editing program and manipulate it (in NX, use two colorize steps to produce it). The colors in this test image are very carefully chosen. The purple is RGB (255,0,255) and the green is RGB (0,255,0). These colors stay the same before/after gamma encoding/decoding. So we can then examine the averaged area between the purple and green to see if an photo editor is gamma aware.


GOOD gamma aware result


BAD non-gamma aware result
Background: What happens when you rotate this test image? Some purple and green will have be 'averaged' together. Take the very simple case of one purple pixel (255,0,255) and one green pixel (0,255,0) that need to be averaged together. The result in a non-gamma aware program will be (128,128,128), which is half of 0+255 for red, green, and blue. But a gamma aware program would need to convert to linear (which is why the colors were chosen carefully -- the result is the same color), then averaged, which is (128,128,128), and then gamma encode that, resulting in (186,186,186). The results are obvious to see. (128,128,128) is dark color, whereas (186,186,186) is much lighter.

The Test: Rotate the test image by 5° and compare the results to what is expected from a gamma aware vs non-gamma aware program. A gamma aware program will have a pleasing white'ish blending. A non-gamma aware program will have an incorrect dark blending color.

Capture NX Test Results: Here are the test results for various Adjustments within Capture NX.


Distortion Control
 
Gaussian Blur
 
Resize
 
Straighten

Given the dark blending seen, we can conclude the adjustments are not gamma aware. Given that these adjustments fail, I need to question if there are any adjustments within NX that are gamma aware.

Capture NX needs to be fixed: Presenting gamma encoded RGB to edit with non-gamma aware Adjustments is a design flaw, which only leads to shifts in color when the RGB values are edited -- as can be clearly seen in the agove NX tests. Since many (all?) adjustments within NX are non-gamma aware in the first place, moving when gamma encoding takes place is the best way to fix NX. Currently gamma encoding appears to be a hidden step within RAW Adjustments.
How Nikon must fix Capture NX: Nikon needs to change when gamma encoding takes place within NX. And the solution to fix all of NX at once is deceptively simple:

Gamma encoding in NX is currently a (hidden) automatic step within RAW Adjustments. Gamma encoding must instead be an automatic last step in the edit list.
Another very clever Gamma Test: Thanks to 'Eric Brasseur' for the following test image. Save the following specially created 258x222 Dalai Lama photo to your computer (right click on the picture, select 'Save Picture As...') and open in your favorite image editing program, then resize to 50% (129x111). What do you see as a result? A non-gamma aware program like Capture NX will produce a gray square. Something that you can see is incorrect. A gamma-aware program will produce the result that we can see is correct:


Original test image
 
NON-gamma aware resize


Gamma AWARE resize


Help support this site - Make a Donation If NX101.com helps you, help this site by making a donation.

Index
Copyright © 2008 Jerry Jongerius