Secrets of Digital Photography
NEF tests! Supplement to the Nikon eBook V.5.0
Jump back to Breaking News... NOTE: The V5 special iNEFer.atn files are here! What's the deal with .NEF* files? *Nikon Extended Format. Nikon has introduced RAW image capture and these can be resolved in Photoshop as a 16-bit image. That ought to be a whopping Good Thing, but where are the benefits and what do the limits look like? Images in this essay were photographed with a CP5700 and processed in Photoshop 7.0 with Color Management off. |
Raw Meet? Intercepting the image early is "Good," right? When you shoot in the CP5000 (assuming you have loaded the Firmware 1.7 Upgrade) you now have RAW image format as a capture option. The CP5700 came with RAW format integrated into its file options from the outset. But what does the world expect from a RAW format, and how actually RAW is it? Medium RAW What it is (?): RAW format, as practiced among various digital cameras, is a method that captures a greater-than-8-bit per pixel image of the entire face of the image chip without the camera intervening to sully the direct data. Hence the "raw" uncooked nomenclature. By tracking the data within each sensor, a RAW file is "uncompressed" in the same way that a TIFF file is, but at a more basic level. A significant difference is that the sensor data from a RAW capture is at a higher bit-depth than what is usually tracked with RGB images. Normally, the camera would process the data the image chip reported and arrive at a three layer, RGB image with 8-bits per pixel, 24 bits overall, yielding over 16 million colors and 256 levels of grayscale tonality. This means that each of the RGB channels would have numerical (digital) tonality steps labeled from zero to 255. That's good enough to fool your eye into seeing continuous tones, but as soon as you start manipulating this 8-bit range with any sort of color, Levels, Curves, Hue, Saturation, Contrast or Brightness adjustments, the continuous ascending numerical tonal relationships MUST change, or else no adjustment would or could be made. These changes show up on the Photoshop Histogram (also seen interactively in the Levels control) as gaps in the tonal structure of the 8-bit per channel image. Case in point: The first image is of an exterior scene exposed one stop too dark. It's a JPEG image now being interpreted by Photoshop as having 256 tonal levels. Certainly this needs to be brought up in brightness, since nearly every pixel is below the half way point in brightness. To do this, the white point (right lower delta icon) was slid left to a spot reading "175" instead of its former "255".
Once the adjustment has been made and accepted, the top 175 tones are re-distributed across the available 256 steps.
The move produced the right amount of exposure elevation, but upon re-reading the Levels Histogram, the last histogram image is the result. The manipulation has stretched the tonal values apart forming gaps between what were formerly adjacent values. The fact that the gap lines are only one pixel wide means that the values have only been separated by two out of 255 numerical steps. Any further manipulation might separate certain gaps more and more. It's cumulative.
This is very typical of the results one gets when stretching the values of an 8-bit per RGB channel image and although your eye may not miss certain intermediate numerical values, they are indeed absent. Grain, pixel noise and the fact that the gaps are only a single digital value or two tend to mask the idea.
RAW hide Enter RAW format. The fundamental concept behind RAW is that the data from each sensor on the original chip is grabbed without in-camera processing. The camera's internal A to D converter is the chip that transforms the sensors' voltages into digital data, and the Nikon cameras produce a 12-bit per pixel result which presumably is the bit depth of their RAW images. Those four extra bits are important. Two to the fourth power is sixteen, and a 12-bit image should have 16 times the numerical resolution of an 8-bit image. 16 x 256 = 4096. Meaning that instead of 256 divisions of its maximum tonal range, these tonalities are a whopping 4096 numerical divisions. I say divisions because I don't want to suggest that these are numbers that exist on the same scale as the 8-bit ones. The actual range from darkest detail to lightest highlight can be anything the image engineers have decided. One can, for instance, divide a meter into centimeters or millimeters simply by using a different basis of division. Meaning that the image engineers have said that the 12-bit numbers cover a span from this amount of darkness to that amount of brightness. What are the values of "this" and "that?" Ask the image engineers at Nikon. Of course they could tell you, but they'd have to swear you to secrecy first. So that pretty much ensures that a public revelation of the this and that values will remain cloaked in corporate secrecy. Suffice to say that these values cover the range of brightnesses digital photography is interested in. But as photographers, we may wish to have the use of brightnesses above and below the values of that and this. What we all would like is a format that held deeper shadow detail and higher highlight detail that we might later recover somehow from those extended ranges of higher bit-depth, right? Certainly that is the promise of RAW, but how does it actually shake out? RAW Deal By grabbing the data map from the sensors without processing it in the camera, one should be able to store the information pretty efficiently. Each pixel would supposedly be accounted for accurately, but there would be no separate RGB channel structure--yet. Eventually that chip data MUST be interpreted into a string of RGB channels, but that could happen later in your computer. The bad news is this. The full 8-megabytes of camera RAW data still must be formatted into Nikon's proprietary ".NEF" file structure and that takes about 27 seconds to store onto a typically fast CompactFlash card inside the camera. Advantage number one: RAW clears out of your way after the exposure for follow up shots in about six seconds. That .NEF file is a lumpy 8,023,561 bytes in size. A 24-bit TIFF file is 14,858,569 bytes big--about twice the size of the .NEF file but oddly, it takes only about 20 seconds to store on the same CF card in the same camera. Later, opening the RAW image in Photoshop requires that the computer on your desktop or in your lap be able to perform the things your camera didn't. And that means those supercomputer-fast, totally optimized digital signal processing chips inside your camera will be replaced by much, MUCH slower programming steps performed inside your PC. My 500 megahertz G4 Macintosh Titanium takes about 38 seconds to simply open a .NEF image. Your mileage will vary. Advantage number 2: Your CompactFlash card may inhale the image slower or quicker than that, but the point is that the file-structuring and storage process inside the camera is disruptive for any sort of fast shooting--except for one special case: Continuous High. That's the shooting frame rate that fires off three shots in under one second. And it WILL grab three RAW images just as fast as it gathers three JPEGs. (Continuous Low works for three images, too, but takes one shot every 3.5 seconds. Hardly a fast-moving motor drive and no match for the JPEG speed of one shot per second.) The CP5000 and CP5700 don't simply grab the data off the chip and store that on the CF card. There is some degree of processing going on, but Nikon isn't saying in public just exactly what it is. When one shoots in RAW format, the camera's setting of white balance and Sharpening still shows up on the translated image--the one that ends up on your desktop in Photoshop--because a file of camera settings follow the data into the .NEF file. RAW Facts We know from reading the specifications of the Sony ICX282AKF (or similar) 11mm diagonal 5-megapixel image chip that the three shots per second mode is a special feature of that family of devices, provided that a fast adjacent memory cache is ready to accept the rapid stream of full-chip data. So Nikon has indeed taken advantage of this image sensor feature and has provided the innards of these cameras with enough memory to grab these three shots. Why three? Ask Sony's chip engineers. It appears to be some sort of chip-level maximum. In fact, the RAW format does not prevent use of the BSS feature, either. The camera will gather up to nine (!) shots before pausing to do a detailed evaluation of the images. Meaning at least two things: 1] There is enough buffer memory to hold the entire chip's sensor data for nine full-frame images inside the camera, and 2] The camera is NOT dependent on JPEG image size, already-compressed images to determine which shot is the most detailed for the BSS selection process. There goes that theory... We can imagine several ways in which BSS may ultimately function, but its most interesting contribution to this essay is that it still functions prior to the camera saving the selected image in .NEF format. RAW Guesses My conclusion, putting these "2's" together, is this:
One assumes that RAW means "raw," as in uncooked. But some level of cooking seems to be taking place or else the RAW image data and its header of camera settings would be easy to save in about 55% of the time (or less) that a TIFF image is stored. Is the chip data converted into intermediate formats between chip and .NEF file? RAW Behavior Advantage number three: However the .NEF file structure is created, it does one thing very well. It produces an image that ends up in Photoshop as a 16-bit per pixel data bit map. Meaning that the 12-bits per pixel of the RAW internal analog (sensor voltage) to digital (12-bit number) data is presumably now spread out over some portion of the 16-bit (65,536 step) numerical spectrum. That allows the .NEF image to have such a wide range of values that it rises above considerations of things like white balance which involves a precise match of red, green and blue tonalities at every step from darkest to lightest. Done right this balance can and does allow a camera to capture a monochrome image that has no tonality showing a color. It sounds simple, but one of the hardest thing to do with a white balance operation is to create the interpretation formulas that produce linear-looking continuous monochrome results. The .NEF file contains enough data per pixel that an image of any white balance resides within its boundaries. All this tends to feed the idea that the .NEF file might have superior tonality overall. The comb-like gap structure of the stretched 8-bit per channel image shows what happens to adjacent values when they are stretched at a scale that can be directly observed. The same sort of thing is going on in a 12-bit to 16-bit conversion, but the scale one would need to observe the effect would be so great that it would take a histogram just over sixty feet wide (at the scale of the one shown here) to perceive the comb structure of discontinuous tonalities. A very finely divided tonality lets you stretch, compress and distort the tonal structure all over the place without introducing visible artifacts into the final result. Your eyes only appreciate about 150 of the 256 black to white divisions of tonality in a print or computer display anyhow, so yanking a given value up or down by anything less than a numerical jump of 400 (in a 16-bit file) will escape your notice completely. Here are two images (originally B&W JPEG). One with 256 gray levels, the other with merely 150 levels. You tell me which is which:
Surely the smooth-toned areas of mid and light gray would have given it away? But no. One is a JPEG of a Grayscale original containing 256 gray levels--the absolute limit of your monitor at "millions of colors" display depth, while the other was posterized in Photoshop to a limit of 150 tones, then reproduced here at an enforced 150-step .GIF file standard. Why is it that you can't see the difference? Because there's not enough of a difference to call it truly "different." The only way you will know which is which would be to copy them to your computer and see which one was the .GIF. (Of course, you might see a difference on these images if your computer display were not a full 24-bit, millions of colors presentation, but that doesn't count.) This demonstrates that a compromised image --one without the full 8-bit "deck" of tonalities-- still looks decent to your eyes. You can print out compromised images like these and the prints won't give away their lack of full fidelity, either. You have to really crunch a shot below about 110 tones for obvious areas of tonal discrepancy to show up to your eyes. Any noise or grain in the image will only make it look BETTER! That's right, grain MASKS loss of tonality. RAW Promises Still, it would be best to have a long-scale original image, right? One that you could stretch, compress, adjust and shape to your heart's content while the final result would look just peachy, free of banding, posterization effects and any artifacts that would make it look less optimum. And that is central to the promise of RAW image file capture. The RAW interpreter that comes with Nikon View 5 and above is basic. It will allow you to manipulate the "exposure" of the RAW file +/-2.0 EV, potentially revealing any highlight and shadow detail that a JPEG might miss. Vincent Bockaert has demonstrated this in his RAW Tutorial pages and I recommend that you visit them for even more valuable information. Supposedly a RAW image should invariably give you better results than a JPEG shot of the same thing. After all, what could possibly go wrong with a RAW shot? Let's say you shot the same scene with the same in-camera settings in JPEG Fine and RAW. Let's say you further harmed both images by shooting them a full stop underexposed --something that RAW is allegedly famous for recovering from. RAW's loading utility facilitates exposure lifts expressed in stops. Then suppose you brought both images up to normal exposure by manipulating them. First in the Nikon View Photoshop .NEF interpretation utility that comes with the camera on the Nikon View CD, then by using that utility to elevate the exposure by +1.0 EV: (Images shown are blowups from the center of a 100% scale image. These are 200% pieces of an image shot at 1/1000 sec @ f/6.2 with Normal contrast, Normal sharpening and Normal saturation.)
This is the RAW image lifted by one full stop using the Nikon View Plug In. At this point you might be thinking, "Wow, that IS a handy feature! I can screw up an image by a full stop (at least) and get back a decent looking result!" What did RAW give you that a JPEG Fine did not? For one thing, the RAW image--even after correction--shows a Levels Histogram that is continuous. Now let's do the same thing with a JPEG Fine image made with every camera setting exactly the same, except here we have improved the exposure by dragging the right delta (highlights) to the left at value 200. This forces just 200 tonalities into the previous 256 tonalities of a full-range image.
That helped the exposure all right, but did you notice the distant hills and sky? How shall I say this? I guess I must blurt it out: They beat the stuffing out of the artifact-laden RAW conversion!!! Alas, the histogram from this JPEG Fine image is now torn up. It's almost identical to the one we have been showing with gaps in the tonal values. Surely those are going to really hurt the image and make the result of such a radical improvement favor the RAW file, right? You must know by now, that just about every time I use the colloquial convention of sticking an informal "...right?" on the end of a sentence it can mean only one thing: What you thought was right is coming from a place of assumption, right? RAW Material One thing is certain. After using the Nikon View-supplied RAW Plug In in Photoshop to lift and sharpen the image, the JPEG that has followed a similar route looks less noisy. Hmm. What if we didn't use the Plug In to make the exposure compensation? Would that help? As it turns out, it does. Here is what that looks like: Which is best? Which is more artifact-free? Compare the above image to the JPEG. Run your mouse over the shot to see the JPEG hiding under it. Mouse off
= RAW converted, then ISO boosted in Photoshop. Hey! That RAW image delivered on its promise after all. But not by using the procedure the Plug-In seems to suggest is the best. All of these are seen at 200% blow-up, so you can make easy evaluations right from the shots here. This sort of thing may not be what one experiences from every shot made with a comparison of JPEG and RAW images, but both images here are made with EXACTLY the same f-stop, shutter speed, camera sharpening, contrast and saturation within 15 seconds of each other. RAW Score: The comparison here is of a JPEG handled normally and a RAW image handled through the RAW image translation utility that comes with the camera followed by a RAW image converted at the default settings and only THEN lifted in exposure. The test is designed to poke these two image formats farther than one would normally press them. But the results under these conditions point out some interesting things: 1. I'll pick the second RAW image as having the best looking rendition of image details, freedom from artifacting, color depth, saturation and tonality. The lesson here is, "don't just accept the Nikon View Plug-In as a panacea for fixing the image. Use it for its strength --opening RAW images into a 16-bit environment-- and leave the exposure compensation alone." You can compensate exposure better in Photoshop AFTER the image is open. 2. The JPEG looks nearly as good but it does land on the screen with a combed-out Levels histogram. Not surprising since more than 20% of its tonalities have been tossed to the wind. For work flow speed, the downsides of this are few. Sure the histogram shows gaps, but remember the 150-tone B&W example above? Gaps don't necessarily kill that image. 3. The RAW image that was converted with a +1 EV boost before it became a 16-bit image looks poorest. This is significant. It means that the artifacts of sharpening that the converter Plug-In instills in the image are generated at some stage in the procedure that causes them to degrade the final image. Better to follow the advice in #1. Technically that top RAW image has the missing tonal touch points that the JPEG lacks, but the grain (and this is ISO 100 by the way) covers it so well in the JPEG, that there is no pictorial loss here. Technically the JPEG may lack some fine points, but other factors rise so far above the lack of completely consistent tonality that the visual results don't cause the effect to be noticed at all. But for the best results with the Plug-In, get your mouse away from that Exposure Compensation control.
Shooting without in-camera Sharpening will avoid the sharpening artifacts seen in the top image. Even though you convert it in Photoshop, the converter will NOT be asked to add sharpening. That means you must add sharpness yourself in Photoshop, and the iNEFer.atn Photoshop Action Filter set has two complex sharpening tools to achieve just that. Download it here. It didn't make it onto some of the CD disks. Just click on the highlighted words or the icon to jump to the page that has the file called "iNEFer.atn" on it. Simply download that to your computer and load it into Photoshop's Actions Palette using the Action Pallet's own Load feature. It does not go into the Plug-Ins folder. Where was I? Oh, yes... The culprit here seems to be the limits of the translation program itself since it is the only place that the sharpening artifacts could originate in the RAW image. Certainly the camera itself is not creating a similarly noisy effect around these sorts of contours. Nikon Capture software may do much better. One thing keeps me from enjoying RAW images more. Time. My shooting style has little need for 27 second file saves, slow in-camera reviews and time-consuming translations on opening files in my computers. I urge all who wish to use the RAW format to perform their own Apples to Apples tests with it. Shoot the same subject within seconds of each other in both RAW and JPEG Fine and compare the results. Study Vincent Bockaert's pages on the subject, too. He likes the RAW option and approaches it with fresh eyes. The test I've made here is designed to BREAK whichever format does the poorest, and while there may be technical advantages to each, there are surprise breaking points on each as well. Remember, only you --and you alone-- can decide which format you wish to use. Testing will give you a visceral feeling for which one serves your images best. -iNova Get the eBook. Version 4.0 is now shipping. Buy it today and you
get Version 5 for free in November, 2002. |