Maze artifacts in raw files from Nikon

June 28th, 2008 by michael

There seems to be an issue with some Nikon cameras and the raw images they produce. Not always, and it’s trucky to understand when, but sometimes when viewed there is a gauze effect, and when converted to PSD there are pronounced maze or mosaic artifacts. Really bad, especially if you have customers wanting to see results soon. It looks bad to redo the photo shoot.

Here are two examples of the maze/mosaic effect. This first one is from Adobe Photoshop. It’s not a comment on Photoshop itself, which is in fact an excellent product, but here just to show how bad it the effect can be.

Eye with strong mosaic noise

This next one is from dcraw, a free command line utility. Although less pronounced it is definitely still there. The options we used where ‘dcraw -T imagefile.nef’, to write tif output, and leave everything else defaulted.

Mosaic effect on eye

So what to do? I have searched the Internet for solutions and come up blank. My saving grace has come in the form of dcraw again. Yes, it still has the mosaic effect, but if we look closely at the manual, there’s a beautiful gem of information in there.

  •  -f     Interpolate RGB as four colors.  Use this if the output shows false 2×2 meshes with VNG or mazes with AHD.

What this means is that using the ‘-f’ command line option will remove the mosaic effect, by using a different conversion process. So when I tried the command line ‘dcraw -T -f imagefile.nef’ I got the following result.

Eye without mosaic

A vast improvement. It looks a bit soft, but that’s nothing a little sharpening won’t fix. The main point here is that the mosaic effect has completely gone.

If command line tools are not for you, try either UFRaw for Linux or RAWDrop for Windows. They are graphical front ends to the dcraw command. Certainly UFRaw has more features, but RAWDrop has a beautiful simplicity that makes it really easy to use. In each of these applications though you must remember to choose Four Colour Interpolation (bold so you don’t forget).

Share/Save/Bookmark

4 Responses to “Maze artifacts in raw files from Nikon”

  1. Ira Says:

    Thanks - very helpfull!

  2. Andrew Says:

    I’ve seen this a few times with my D40. The effect is extremely pronounced in PS CS3, and not quite as bad (but still there) in Nikon’s Picture Project.

    I haven’t been able to figure out the cause, but the last time it happened, I was shooting at 1/500 sec with off camera flashes, using Cactus V2S triggers. If I shoot at 1/400sec or slower, the problem goes away. So maybe it’s related to sync speed.

    Thanks for the tips on fixing it. Another way is to resize the image in photoshop with the bicubic resampling, but I need to experiment more to see which works best. Fortunately it doesn’t happen that often!

    Does this happen in the higher end Nikon’s? I’d like to upgrade at some point in the next year and would like to avoid any camera with this problem.

  3. michael Says:

    These test images where taken with a D40. In general the artifacts seem worse either at higher shutter speeds or when using the standard lense. I have read some reports of high key being the problem, and I have a personal theory that it might be down to the lossy raw compression employed.

    I might buy a D3 later this year, depending on how the prices go. So I’ll report back here when I have had a chance to experiment with that.

  4. Sebastian Says:

    Hey I got this link from a fellow flickr user and I’ve discovered this effect as well.
    Similiar situation as Andrew:
    iso 200
    1/640
    f22

    I discussed the issue here: http://www.flickr.com/groups/strobist/discuss/72157604961230744/?search=Maze
    and mikko rainkainen also pointed me to dcraw.

    Although I didnt use dcraw to PP the shot again, I haven’t had any problems letely, mainly based on the fact that I haven’t attemptet any lowkey shots any more. ;-)

    My suspicion is that it the demosaicing artifacts are connected to a large f-stop, fast shutter speeds combined with large amounts of light (My SB 600 was on 1/2 power) in a short time, which confuses your sensor.
    This could be worth to try and reproduce the effect to prove the consitancy of this suspicion…

    But it’s good to know that there is software out there that will do the job!
    Thanks for evaluating the topic!

Leave a Reply