unexposure for 12-bit D600 raw files

Chun Li
2013-04-22
2013-09-16
  • Chun Li
    Chun Li
    2013-04-22

    Sorry I meant "underexposure" in the title. It seems I cannot edit the title anymore.

    Ufraw version 0.18 works okay with 12-bit D600 raw files. But all 0.19 versions (0.19, 0.19.1, 0.19.2) open them (with rare exceptions) underexposed by exactly 2EV. It looks ufraw guesses the bit depth and often treats 12-bit NEF files as 14-bit ones. I wonder if there is a way to tell apart 12- and 14-bit D600 files and treat them accordingly. NEF might be proprietary but the bitdepth information has been cracked and implemented in exiftool (since its version 9.16). Please let me know if you need any information.

    Thanks.

    Chun

     
    Last edit: Chun Li 2013-04-22
  • Please download the latest version of DCRaw (version 9.17) and develop the raw files with this command line:
    dcraw -w -W -v filename

    The bug is in DCRaw if the output image is underexposed. Please tell us about the result.

    Regards,
    Niels Kristian

     
    Last edit: Niels Kristian Bech Jensen 2013-04-22
  • Chun Li
    Chun Li
    2013-04-22

    Thanks for the quick response. I compiled DCRaw 9.17 (using "gcc -o dcraw -O4 dcraw.c -lm -DNODEPS") and ran the command you suggested. It produced a .ppm file that is even darker than that from ufraw 0.19.2. Compared to the camera JPG, the ufraw result is -2EV while the dcraw result is -3EV. Is there an easy fix?

    Thanks!
    Chun

     
  • There is no easy fix but it is as I thought. The bug is in DCRaw so you should ask Dave Coffin to fix it. It will be fixed in the cvs version of UFRaw (and releases after that) when it is updated with a fixed version of DCRaw.

    Regards,
    Niels Kristian

     
  • Chun Li
    Chun Li
    2013-04-23

    I just sent him an email, but I am not sure he would answer it because he has a statement, "Don't complain that 16-bit output is too dark -- read the FAQ!", where he basically says he intends dcraw to output the "dark" way and downstream programs should perform the correction. If he insists on this, shouldn't we either fork dcraw to maintain a more desirable version or perform the correction in ufraw?

    I will keep you updated if I receive any answer from him.

    Thanks.
    Chun

     
  • The default for DCRaw is 8-bit output so that statement does not apply to your situation.

    Regards,
    Niels Kristian

     
  • Chun Li
    Chun Li
    2013-09-13

    I contacted Mr. Coffin in April and he asked for a D600 NEF file, which I sent and heard nothing back. I finally "solved" the D600 underexposure problem myself. All I did was to change the lines for D600 in adobe_coeff() in dcraw.cc (that comes with ufraw) to:

    { "NIKON D600", 0, 0,
    { 7866,-2108,-555,-4869,12483,2681,-1176,2069,7501 } },

    and then the usual "./configure; make; sudo make install". I got the numbers from a post by Pascal de Bruijn at http://comments.gmane.org/gmane.comp.graphics.ufraw.devel/802

     
  • Chun Li
    Chun Li
    2013-09-16

    I was curious of what "fixed" the problem. It turns out that as long as the first two numbers for black and maximum are 0, ufraw always generates exactly the same file no matter what the 9-number transformation matrix is. Is this intentional? Thanks!

     
    Last edit: Chun Li 2013-09-17