Monday, 19 May 2014

DCRAW 9.21 for OS X Mavericks: using the command line

In my previous article I gave simple instructions how to compile your own dcraw executable. But if you don't want to mess with C compiler feel free to download my executable from here (but you still need to put it into bin folder). Now let's have some fun and test the program.

Fuji x-trans raw file post-processed in dcraw 9.21

Here is my basic workflow and couple recommendations.



1. Create your test image folder and copy there one or more raw files, files with extensions like .arw, .nef. cr2., depends on the camera manufacturer. In my example I will use Fuji x-trans raw files with extension .raf. I put two files in my "test images" folder just to illustrate how dcraw works.



2. Right click on your image folder and start Terminal app


In my previous article I explained how to start Terminal in the folder of your choice but you can always navigate between different folders using cd command .


3. In Terminal window type: dcraw followed by your file name and extension, in this case it was my standard test image file  _DSF8880.RAF

dcraw _dsf8880.raf

and hit Enter. Seems like nothing is happening, but wait... wait....


and after about 30 sec you should see a new file in the folder


but PPM file is not what I want. How do you change the output? Simply by using options. Type: dcraw     and hit Enter


4. After experimenting with various combinations I settled down on this set of options as my starting point:

dcraw -v -w -o 4 -q 3 +M -6 -T  filename.raf

Quick explanation why I chose these options:

-v        Print verbose messages
-w        Use camera white balance, if possible
-o 4      Output colorspace = ProPhoto
-q 3      High interpolation quality
+M        Use an embedded color matrix
-6        Write 16-bit output file instead of 8-bit
-T        Write TIFF instead of PPM


Now if I run it the terminal window I will get the response:


and 16-bit TIFF file that other imaging programs can recognize. Keep in mind, if you re-run the program it will overwrite the output file. You need to rename the output if you would like to save the variant before the re-run.

5. Looks good, but I didn't like blown highlights



Easy fix with options -H (to recover highlights) and -b (to improve the image brightness after highlight recovery, let's add those to the standard set of options:

dcraw -v -w +M -o 4 -q 3 -6 -T -H 9 -b 4 _dsf8880.raf

That's how the photo looks with my standard command and with highlights recovered


Just for fun, I also compared dcraw output (with highlights recovered) to ACR 8.4 (used in CS and LightRoom).  ACR is arguably the best tool to recover highlights and I applied it at 100%.


Now, let's compare two


I was surprised to see that while ACR pushed highlights into uniformed grey, dcraw took tones from the surrounding non-blown areas and recovered highlights look more natural. Could be a big plus for portrait work.

My second observation was about the colour hue, I guess the difference is obvious. But I suggest to test dcraw yourself and draw your own conclusion.

In my next article I will talk about really good (and free) GUI front-end to dcraw.

All the best,
vkphto









2 comments:

  1. Nice article, thanks

    ReplyDelete
  2. Very interesting :-)

    But sadly your DCRaw Dropbox link don't work anymore :-(

    ReplyDelete