Page 1 of 2

Nikon D750 .nef raw conver

Posted: 2019-03-12T15:42:15-07:00
by jan.stritesky
Hi all,
I apologize for starting a new topic about nef convert. I'm new to IM. I found a similar topic on the forum but they did not help to me.

I would like to convert raw nef file from Nikon D750 camera (to tiff or jpeg) but output is darker and yellower against Photoshop output.
I found the problem will probably be related to AWB, but I don't know how to achieve the same result as PS.
I used simple

Code: Select all

magic convert in.nef out.jpg 
I also tryed to use

Code: Select all

dcraw.exe dcraw -6 -w -T -O out.tiff in.nef
the result is much better (almost like PS), but I want to use IM directly.
I tryed to modify

Code: Select all

dng:decode
record in delegates.xml, but this has no effect

link to sample file: https://img.photographyblog.com/reviews ... 750_05.nef
IM output: https://ibb.co/vvdzzZp
PS output: https://ibb.co/YLDD3SN

I'm running on Win 10, ImageMagick-7.0.8-33-Q16-x64-static/ddl.


Thank you for your advice.
Regards
Jan

Re: Nikon D750 .nef raw conver

Posted: 2019-03-12T16:28:27-07:00
by snibgo
What does "magick -version" say? For example:

Code: Select all

f:\web\im>%IMG7%magick -version
Version: ImageMagick 7.0.7-28 Q16 x64 2018-03-25 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lq
 openexr pangocairo png ps raw  <<== rsvg tiff webp xml zlib
My version has a built-in delegate "raw", so an external delegate is not used, so changing delegates.xml will have no effect (sadly).

This means IM offers the user no controls over converting raw files. Personally, I use dcraw instead.

EDIT: I should add: If you want, you can create an entry in delegates.xml with a different prefix, eg "MYRAW:", and use that to call dcraw (or any other command-line raw converter).

Re: Nikon D750 .nef raw conver

Posted: 2019-03-12T16:45:47-07:00
by fmw42
Use magick not magic.

So if you do what snibgo said the command would be:

Code: Select all

magick MYRAW:convert in.nef out.jpg 
But you have to set up the entry for MYRAW in your delegates.xml file to use the same arguments as you would when using dcraw so that it will do the AWB for you.

Re: Nikon D750 .nef raw conver

Posted: 2019-03-12T16:52:46-07:00
by jan.stritesky
Thanks a lot:

Code: Select all

<delegate decode="MYRAW" stealth="True" command="dcraw.exe -6 -w -T -O &quot;%o&quot; &quot;%i&quot;"/>
Works for me.
JS

Re: Nikon D750 .nef raw conver

Posted: 2019-03-14T13:54:04-07:00
by jan.stritesky
Is there a dcraw setting that would give the same result as provides Adobe Camera Raw with As Shot and Default settings?
For this picture https://bit.ly/2HBlSiD, is dcraw output cyan and blured, but Camera Raw provide colour-neutral sharp image.

Re: Nikon D750 .nef raw conver

Posted: 2019-03-14T14:11:57-07:00
by snibgo
dcraw can neither blur nor sharpen. If your result from Adobe Camera Raw is sharper, then that is applying sharpening.

Re: Nikon D750 .nef raw conver

Posted: 2019-03-14T15:56:21-07:00
by jan.stritesky
Sharpness is perhaps a secondary problem.
Output from dcraw is cyan and have resolutin 6032x4032px - http://bit.do/eL3PC
Output from other aplications (Capture NX-D, Adobe CR, online converters...) have neutral color and output resolution is 6016x4016px http://bit.do/eL3RF
I'm confused.
- is in the nef raw file included some preview jpg?
- I tried to use nikon icm profile - no resut
- alos set custom white balance by -r option

Re: Nikon D750 .nef raw conver

Posted: 2019-03-14T16:16:11-07:00
by snibgo
jan.stritesky wrote:Output from dcraw is...
What was your command? What options did you specify for white balance? Type "dcraw" for a list of the options.

Re: Nikon D750 .nef raw conver

Posted: 2019-03-14T16:26:37-07:00
by jan.stritesky
I tried multiple commands:
i start from this dcraw.exe -6 -w -T -O -> - w for auto white balance
by dcraw -i -v i get Camera multipliers, which i tried to use as custom wb value:
dcraw.exe -6 -o 1 -A 1.222656 1.000000 2.179688 0.000000 -T -O
I also try shift gamma by: -g 2.4 12.9.
Only one thing that helps a bit is the shift in brightness by -b 1.4, but why this value?

Re: Nikon D750 .nef raw conver

Posted: 2019-03-14T16:35:55-07:00
by snibgo

Code: Select all

dcraw -w -6 -T -O x.tiff test.nef
... works fine for a sRGB output, automatically brightened.

Your "-A" option is wrong, as "-A" uses whatever WB makes your specified coordinates gray. Perhaps you really meant "-r" with those numbers, but why set the second G channel multiplier to zero?

Re: Nikon D750 .nef raw conver

Posted: 2019-03-14T16:55:41-07:00
by jan.stritesky
No output is still same - to cyan against another apps output.
I tried use "-A" and also "-r" with RGBG numbers. I use zero for second G because on the output fom "dcraw -i -v" is zero for this channel. I also tried to use value from first G channel but it has no effect.

Re: Nikon D750 .nef raw conver

Posted: 2019-03-14T22:41:17-07:00
by snibgo
You should generally use the same multiplier for both green channels.

other.tiff has certainly been sharpened. If you zoom in to dark/light boundaries, you can see the overshoot ("acutance"). I suspect other "prettifying" has been applied: it is lighter and more saturated than dcraw.tif.

Re: Nikon D750 .nef raw conver

Posted: 2019-03-15T04:05:11-07:00
by jan.stritesky
We used custom color temperature 2900K during take the test photo. Is it a problem?
All other preview and convert application using "prettifying" filter?

Re: Nikon D750 .nef raw conver

Posted: 2019-03-15T08:01:34-07:00
by snibgo
If you know your lighting is 2900K, and your camera was set to that, that should be good. However, the lighting might be nominally 2900K but actually slightly different.

If the "white" of your background should be a neutral gray, then you can tell the raw converter to use the WB that makes that gray. This may be more accurate than assuming your lighting is 2900K.

Your questions are about the different capabilities of different raw converters. I suggest you look at the forum https://discuss.pixls.us/ , where people have more knowledge than me of raw converters.

Re: Nikon D750 .nef raw conver

Posted: 2019-05-28T02:02:01-07:00
by whugemann
I have a similar problem under Windows 10, 64 bit:
I would like to develop a Sony RAW photo (*.arw) with my own settings and apply a lens correction to it. Following the hint given in this thread I arrived at:

Code: Select all

  <delegate decode="LUMINANCE" stealth="True" command="dcraw.exe -q 3 -o 0 -4 -r 1 1 1 1 -S 65535 -T -O &quot;%o&quot; &quot;%i&quot;"/>
which correctly performs the conversion based on dcraw and the parameters supplied.

But in order to apply the correction for barrel distortion, I need to generate a temporary file in order to to process it further. Therefore I tried using %u.tif

Code: Select all

  <delegate decode="LUMINANCE" stealth="True" command="dcraw.exe -q 3 -o 0 -4 -r 1 1 1 1 -S 65535 -T -O &quot;%u.tif&quot; &quot;%i&quot;"/>
following the "fake" code entry for DNG. Thise results in the message:

Code: Select all

magick: unable to open image 'C:/Users/Hugemann/AppData/Local/Temp/magick-14944A1WfII0P63C7': No such file or directory @ error/blob.c/OpenBlob/3491.
magick: unable to open module file 'C:\Program Files\ImageMagick7\modules\coders\IM_MOD_RL_LUMINANCE_.dll': No such file or directory @ warning/module.c/GetMagickModulePath/675.
magick: unable to open file 'C:/Users/Hugemann/AppData/Local/Temp/magick-14944A1WfII0P63C7': No such file or directory @ error/constitute.c/ReadImage/596.
which is formally correct, as the conversion first creates four temporary files

Code: Select all

magick-14944A1Wfll0P63C7         0 KB
magick-14944Aqa2f1WU-190    20.388 KB
magick-14944CyfoUhctpi9O         0 KB
magick-14944zwjvGbkYIUli         0 KB
and stores the result in magick-14944CyfoUhctpi9O.tif.

What goes wrong here?

BTW: I took me quite a while to find out that the delegates-entry for dng:decode is simply ignored. This is very misleading. It should be deleted in future releases.