UFRaw FAQ

While keeping an eye on the UFRaw mailing lists, forums, etc. Some questions quite regularly pop up. I’m writing this to clear some things up, and prevent me from having to repeat myself over and over again:

The Colors Are Off

Make sure your screen isn’t the culprit. Just because you spent a lot of cash on a screen, that doesn’t mean it’s accurate at all. Make sure your screen white balance is set to 6500K. Make sure your screens brightness/contrast is properly set using simple calibration images. If you can afford a colorimeter consider profiling your screen. The way the vendors (Canon, Nikon, etc) process images/colors are completely proprietary. This is a very complicated affair, since it involves at least demosaicing the sensor data, applying white balance corrections, correcting gamma, applying a color matrix or color lookup table, not forgetting noise reduction, and even lens abberation correction in newer camera’s. Having said that, when looking at UFRaw’s color management page, you have several options for the camera input profile. First there’s the “No profile” option, which is intended to be used for processing images to be profiled, you should never use this for normal image processing. Next there’s the “Color matrix” option, which in fact is a small camera specific profiles that comes with UFRaw. These (D65) matrices come from Adobe’s DNG converter. However a matrix is not enough, since we also need gamma correction, which you can control using the Gamma and Linearity options. By default these are respectively set to 0.45 and 0.10, and they are just that, defaults. For my Canon EOS 400D, values like 0.35/0.08 seem much more appropriate. So I highly recommend you shoot a few picture in RAW+JPG mode, and fiddle a bit with the Gamma and Linearity until the images match (mostly). Please do use properly exposed images for this fiddling, and set Exposure Compenstation to +0EV. Next there are lots of color profiles available on the web. However, don’t be surprised if these don’t work all that great. For optimal results, a color profile need to be generated specifically for UFRaw, at Gamma 1.0. Most profiles have been generated for other software, and often aren’t generated at Gamma 1.0, so your milage will vary. The above bit, is the easy way. If you willing to put in some effort, you can create your own camera profile, by way of an IT8 target. However this does usually require some trial and error, I’ve written about the procedure before. Last, UFRaw saves sRGB images by default, which is just fine. Stick to sRGB if you don’t really understand color management. Don’t use AdobeRGB because someone told you it’s “better”. I mean it mostly is, but it has grave technical consequences for working with the images. AdobeRGB is one of those things people shoot themselves in the foot with.

Unsupported Camera

If you doubleclick on your camera’s RAW files in Nautilus, and UFRaw won’t open, it could be a problem with MIME associations. Please try starting UFRaw manually, and try to open the RAWs then. If UFRaw gives you an error, it could be a previously known RAW format that has changed for your new camera. Or maybe it’s a completely unknown format. In either case, please check if the latest version of dcraw can open them. UFRaw periodically imports new code from DCRaw, so if DCRaw does support your camera, UFRaw is likely to support it as well in their next release. If you have the skills, you could try building UFRaw from CVS. Even if UFRaw reads your RAW files, there are still a few things that could go wrong. One recurring issue is white balance support, which can be split in two parts. Camera white balance, which is highly dependant on vendor proprietary EXIF structures. Next there are the white balance presets, which can be extracted from RAW files, which have been shot using in-camera white balance presets.

In all cases, if the latest DCRaw does not yet (fully) support your RAW files, please contact Dave Coffin (of DCRaw) first, and provide him with some sample RAWs. Once DCRaw supports your RAWs, sooner or later UFRaw will as well.

Also consider uploading a sample RAW (you made yourself), to rawsamples.ch, at least if they don’t already have a sample RAW for your camera.

Miscellaneous Problems

Sometimes people note that somehow UFRaw procedures slightly higher resolution files, than the camera itself. Which is true. During demosaicing vendors actually crop off a few pixels, so they can skip extra complex calculations at the sensor borders. UFRaw includes intelligent code, to leverage those border pixels as well. This is not a bug, it’s just the sensor’s real resolution!

On some camera’s you may notice UFRaw will produce significantly lower resolution images, than the camera does. This is very common with camera’s which do not feature regular Bayer sensors, like Fuji’s SuperCCD sensor. Fuji’s sensor designs are odd to say the least. Best to my knowledge Fuji trades resolution for low-noise and dynamic-range, and then intelligently upsamples the image. But I could be mistaken.

Some users have noticed problems with exposure, this can (as far as I know) has two causes. First, you probably need to adjust Gamma and Linearity settings for your camera (as described above). Second you may have used Highlight Priority mode, which basically intentionally underexposes the image, and UFRaw just doesn’t automatically compensate for that. Just try enabling UFRaw’s auto exposure, or compensate manually.

Newer versions of UFRaw possibly have LensFun enabled (mine does), which corrects your lens’ distortion, but this also means, you’ll get a curved black border around your image as the result of the correction. You can just crop this border off…

General Tips

While developing RAW there are a lot of options available… Here are a few generic tips:

First make sure you have film clipping enabled, this will make sure it’s harder to blow out your highlights, and when they blow out, it’ll still look a bit more elegant.

Next to the demosaicing algorithm (on the white balance tab) there is a button with a yellow brush on it, which you can enable to smooth the output. Smoothing is (as far as I know) a median filter, which gets rid of some demosaicing artefacts. This is highly recommendable.

However, the smoothing does not deal with all artifacts. In the past, I’ve always used AHD, but AHD produces mazing artifacts for some camera’s. In the past I considered this an obscure problem, and never checked if my camera was affected. But recently I did, and guess what, my camera (EOS 400D) was affected. Using VNG4 demosaicing resolves the issue (AHD left, VNG4 right):

Demosaicing Mazing

Please note, to notice the mazing issue, you need to convert an image with some smooth area’s and view those area’s at a magnification of 200% or more. Currently UFRaw only offers 50% magnification, so you need to convert, and then view with the GIMP.

Some shots may look a bit contrastless to you, before actually starting to toy with the contrast, you may want to try enabling automatic blackpoint correction first (on the correct luminosity, saturation page).

UFRaw by default applies no denoising at all, while all camera’s do apply denoising internally. UFRaw has a noise reduction algorithm called Wavelet Denoising, it’s available on the first (white balance) tab. In my experience a good starting guideline would be your RAWs ISO rating divided by ten. So a value of 20 for Wavelet Denoising for pictures shot at ISO 200, for example. Of course do your own experimenting for optimal results.

Once you happy with your image, you need to save the image. There are several formats available. First, let’s knock off PPM, which is a primitive format. Next we have PNG, which is a nice format, but doesn’t have official standardized EXIF support, so that’s not ideal either. That leaves us with JPEG and TIFF. Most of us would want to stick with JPEG, which is lossy, which means some information is lost each time an image is saved, but at high qualities this can be limited to an absolute minimum. TIFF produces huge files, and should only be used if you need absolute high (lossless) quality. Now with JPEG images, you can control how much information is lost or kept, on a scale of 0 to 100. Please do note, even at quality 100 some information is still lost, however minute that may be. Depending on the value on this scale, UFRaw enables or disables chroma subsampling appropriately. At quality 90 and below both vertical and horizontal subsampling are enabled. With qualities higher than 90 vertical subsampling is disabled. Horizontal subsampling gets disabled at qualities higher than 92. That said, filesizes will suddenly increase between quality 90-91 and 92-93. Personally I usually use quality 98 for archiving, which should be roughly equivalent to quality 12 with Adobe Photoshop (Adobe’s scales are different).

Training Video’s

Rolf Steinort has used UFRaw in a couple of episodes in his excellent Meet The GIMP show, if you’re new to UFRaw, I can advise you to watch them:

Ubuntu PPA for UFRaw CVS

For those of your who like to keep up to date with the latest and greatests of UFRaw, I maintain a Ubuntu PPA, with nicely packaged CVS builds of UFRaw (with LensFun enabled). Since these are CVS checkouts, it does mean there’s is no guarantee of stability or functionality. Sometimes things can break.

IRC

There is an unofficial IRC channel for UFRaw on irc.freenode.net#ufraw. Consider dropping by sometime. Please do have some patience, since not everyone is in the same timezone. If you have a specific problem, please upload some samples online, so we can experiment/investigate.