Finally, a D300 Near UniWB JPEG

Started Apr 3, 2008 | Discussions
jeminijoseph Veteran Member • Posts: 6,550
Thank you guys

I got it now. I will try to adjust the WB later in NX. My subject is wildlife and I have no way of shooting a reference grey card for every occassion. It's also not practical for me to change the WB after taking the exposure. This will be a great help for fashio or studio shots.

Anyway I will give it a try. Thank you again. Have a great day
Jemini

gollywop wrote:

jeminijosepth: This is explained above in this thread in the post
labeled "A Brief Explanation." This WB helps set proper exposure,
but basically assumes you are shooting RAW. You would then correct
for WB in PP using a gray card or some such device. I should suspect
that the WB adjustment that would be needed for JPEG would be
problematic.

I guess in principle, when shooting JPEG, you could use UniWB to
determine the proper exposure then switch to an appropriate WB before
actually taking the shot. But this is going to be very awkward for
everyday use -- maybe for special occasions when you have plenty of
time to set up the shot and ETTR is very important.

So, basically, if you are shooting JPEG, whether or not with RAW,
this is not likely to be of much use.

-- hide signature --

Thanks
Jemini Joseph

http://www.wildbirdimages.com

 jeminijoseph's gear list:jeminijoseph's gear list
Nikon D500
auhopu New Member • Posts: 16
RAW uniwb for D300

hi there...

i have come up with a RAW uniwb file for D300 following guillermo luijk's method.

http://forums.dpreview.com/forums/read.asp?forum=1018&message=27052543

the resulting file has coefficients of:
1.000000, 1.036437, 1.004049

this also happens to be a shot of a whibal (spectrally neutral gray card) so one can see the difference from the correct white balance in post processing.

guillermo has made it publicly available on his site

http://www.guillermoluijk.com/article/uniwb/index.htm

(the site is in spanish, scroll down to DESCARGA DE ARCHIVOS RAW UNIWB)

regards,
elias

-- hide signature --
Darren Langdon
Darren Langdon Contributing Member • Posts: 756
Re: RAW uniwb for D300

Thanks.
--

One should never 'take' a photo but rather make one.....the only thing you should take is your time.

http://www.flickr.com/photos/darren_langdon/collections/72157603970297327/

FCAS Member #104

 Darren Langdon's gear list:Darren Langdon's gear list
Nikon D810 Nikon D850 Nikon AF-S Nikkor 70-200mm f/2.8G ED VR II Nikon AF-S Teleconverter TC-14E II Sigma 35mm F1.4 DG HSM Art +9 more
Erciro Senior Member • Posts: 1,708
Re: Finally, a D300 Near UniWB JPEG

Thank you all for making this available but I find the Auto WB and the exposure so correct I don't even use the WB setting cards anymore. Well, sometimes Expodisc. Do I really need UniWB if the exposure is correct in the histogram?

-- hide signature --
 Erciro's gear list:Erciro's gear list
Nikon Coolpix AW120 Nikon D300 Fujifilm X-T1 Nikon AF DX Fisheye-Nikkor 10.5mm f/2.8G ED Nikon AF Micro-Nikkor 60mm f/2.8D +9 more
_GUI_ Regular Member • Posts: 386
Re: RAW uniwb for D300

Elias, I received your RAW file, and it happens to have RAW-embedded coefficients of:
multipliers 1.000000 1.036437 1.004049 1.036437

as you stated, but those are the coefficients embedded in the RAW files, not the coefficients one gets when using that RAW file to adjust WB, so as far as I can see, that RAW file is not useful to set the UniWB on the D300 since it won't produce 1.0 multipliers.

What we need is the RAW file you used to make your camera work with the 1.000000 1.036437 1.004049 1.036437 multipliers, not a RAW file from a shot taken using those multipliers.

Regards

-- hide signature --
Marianne Oelund Veteran Member • Posts: 7,753
Simple in-camera UniWB setting

Erciro wrote:

Thank you all for making this available but I find the Auto WB and
the exposure so correct I don't even use the WB setting cards
anymore. Well, sometimes Expodisc. Do I really need UniWB if the
exposure is correct in the histogram?

The point is that, when using AWB, you don't know what the channel gains applied by the camera were, so you don't know how much headroom you really have by looking at the RGB histograms (i.e., the camera lies to you).

With UniWB, you are setting up the histograms so that they indicate the true values provided by the A/D converters.

I use a simple manual WB setup which is more than accurate enough for my purposes:
On D300, set manual WB to 5000K, and add a G5 shift.
On D3, set manual WB to 4760K, and add a G5 shift.

This produces accurate UniWB for the cameras (very accurate for D300; Green will display about 0.1 stop low on D3). With this setting, there will be about 3/4 stop of headroom when the channel histograms reach the right side (where the highlight warning will start to flash).

matthew saville
matthew saville Senior Member • Posts: 2,133
I've always know that the blinkies and the one-channel histogram lie to me, but...

...how much does the full RGB histogram lie, the individual channels? Seemed to be pretty accurate to me. I always have trouble with one channel burning out when shooting something very vibrant, but I've just gone by the full RGB histogram instead of the one-channel histogram, and been fine...

-- hide signature --

Cameras capable of making great photographs have become commonplace these days, but photographers have not. While technical innovations have made photography ever easier in recent decades, the art of producing images that other people will care about has become even more formidable. Galen Rowell

GaborSch Veteran Member • Posts: 7,203
UniWB is not enough

I miss the explanation, that WB is only one (though the biggest) component of the adjustments applied in-camera before creating the JPEG image, which is the basis of the histogram.

The contrast, saturation and color tone adjustment (does the D300 offer that?) have to be neutralized (not the minimum value but "0"), and the sharpening has to be at the minimum. Only then will the in-camera histogram look like the raw histogram.

One can test the result by comparing the in-camera histogram with what Rawnalyze displays; see http://www.cryptobola.com/PhotoBola/Rawnalyze.htm

GaborSch Veteran Member • Posts: 7,203
Raw vs RGB histogram

matthew saville wrote:

...how much does the full RGB histogram lie, the individual channels?

It does nothing else but lie.

I always have trouble with one
channel burning out when shooting something very vibrant

With a good reason. See following exampkes: the first is and RGB-like histogram; not true RGB, but it reflects the effect of WB. The second one is the raw histogram. Note, that the RGB shows, that the red is the highest, while in fact the green is higher. If you expose until the the RGB histogram shows the red clipping, the green will be clipped by far, while the red is still not clipped.

antimonite Regular Member • Posts: 144
Re: UniWB is not enough

You are totally right. Just an example: two shots in NEF with the standard settings of the neutral mode, one with WB at 5000 ºK and G5 and the second with the NEARUNIWB. You can see the differences between the real RAW histogram done with Rawnalyze and the embedded JPEG ones.

The red highlights and the blue shadows are misleading.

You can download a JPEG with all the data of the 5000 º K G5

http://picasaweb.google.es/Antimonita/D300/photo#5188372669866470482

as well as the JPEG with all the data of the Near UniWB

http://picasaweb.google.es/Antimonita/D300/photo#5188372721406078050

Data of the NEF file from Dcraw that was used to extract the embedded JPG

The camera multipliers are different but better with 500ºK G5 than d-1.

I don’t think that it would be possible to get the real sensor histogram due, as you say, to the jpeg processing (Tone, saturation, sharpening…)

Regards,

Antimonite

Iliah Borg Forum Pro • Posts: 25,769
Re: UniWB is not enough

GaborSch wrote:

I miss the explanation, that WB is only one (though the biggest)
component of the adjustments applied in-camera before creating the
JPEG image, which is the basis of the histogram.

The contrast, saturation and color tone adjustment (does the D300
offer that?) have to be neutralized (not the minimum value but "0"),
and the sharpening has to be at the minimum

Sharpening can be set to none (0). One can add loading linear tonal curve to the mix above.

Second biggest issue after white balance is tonal mapping to gamma 2.2 and this can be avoided too loading reverse tonal transform as a custom curve thus ending up with a linear histogram. If it is done, the statement below is true.

Only then will the
in-camera histogram look like the raw histogram.

Thr disconnection is that camera makers have chosen to try to mimic Photoshop-style histograms in cameras instead of traditional eV and D readings. Ironically, it should be vice versa - Photoshop should follow photo standards.

-- hide signature --

no text

Iliah Borg Forum Pro • Posts: 25,769
Re: Simple in-camera UniWB setting

With this setting,
there will be about 3/4 stop of headroom when the channel histograms
reach the right side (where the highlight warning will start to
flash).

Blinkers start about 1/3 eV before histogram really hits the wall.

-- hide signature --

no text

GaborSch Veteran Member • Posts: 7,203
Real sensor histogram

antimonite wrote:

I don’t think that it would be possible to get the real sensor
histogram due, as you say, to the jpeg processing (Tone, saturation,
sharpening…)

Tone, saturation, sharpening, etc. can be "disabled" (neutralized) in the camera, that's not the problem.

There are two additional issues:

1. the mapping of the originally linear values on a nonlinear fashion, like sRGB is doing (often called "applying gamma").

2. the transformation from the camera's color space to sRGB or aRGB. Make a shot of a red sheet with a tiny white card to pick WB on and take a look at the raw and RGB histograms. I created a demo:

1. the raw histogram,

2. the histogram shown by ACR after WB on the white letters,

3. the histogram shown by Rawnalyze after WB and sRGB mapping,

4. selection stats on a red area.

Note, that the green channel is much higher (one and a third stops) than the red, but that is due to the white letters on the box; the red is dominant on the red areas, see the fourth screen capture. However, even on that red-dominant area, the average of reds is 901, the greens average at 417 and the blues at 221, while the ACR stats on a selection is RGB=(200, 47, 36) (averages).

However, all the above is irrelevant from the point of judging the exposure: these facts do not affect the right end, i.e. how close the exposure is to clipping or if it has clipped already.

(Btw, the WBd histogram of Rawnalyze shows, that the reds, greens and blues end at the same level; that is due to the white letters. The histogram is logarythmic, therefor the white appears to be quite much).

GaborSch Veteran Member • Posts: 7,203
Mapping is irrelevant for ETTR

Iliah Borg wrote:

Second biggest issue after white balance is tonal mapping to gamma
2.2 and this can be avoided too loading reverse tonal transform as a
custom curve thus ending up with a linear histogram. If it is done,
the statement below is true

The mapping changes the distribution on the scale, but not relevantly the relative position of the channels to each other, and it does not affect at all the judgement of ETTR.

antimonite Regular Member • Posts: 144
Re: Real sensor histogram

Thank you for your information. As you know Capture NX emulates the Camera settings, so I have tried to "neutralize" the processing settings in the RAW file of the shot 5000 ºK G-5:
Sharpness = Nitidez minimum
Tone = Contraste id
Saturation = saturación id
Brightness unchanged (Blue clipping at black point)
Hue = Tono unchanged
This are the results:

Still clipping. The tranforms do have an independent term?

Regards,

Antimonite

GaborSch Veteran Member • Posts: 7,203
Contrast and saturation

There is no "negative sharpening", thus that should be at zero. However, contrast and saturation are relative, so they should be at null.

Note, that this clipping can not have been caused by the contrast setting, as a negative contrast pulls the shadows and highlights towards the middle (this can conceal clipping). On the other hand, negative saturation can cause virtual clipping.

What about uploading the raw file, so that I can take a look at it in ACR?

Iliah Borg Forum Pro • Posts: 25,769
Re: Mapping is irrelevant for ETTR

GaborSch wrote:

Iliah Borg wrote:

Second biggest issue after white balance is tonal mapping to gamma
2.2 and this can be avoided too loading reverse tonal transform as a
custom curve thus ending up with a linear histogram. If it is done,
the statement below is true

The mapping changes the distribution on the scale,

And prevents correct evaluation of the real mass of the affected highlights and shadows. That is, it is really important to know the distribution of the tones across the scale.

-- hide signature --

no text

auhopu New Member • Posts: 16
Re: RAW uniwb for D300

Hi Guillermo,

I suspect we do something differently or maybe you "think Canon" at some point
I will try to explain.

There are two ways to set a custom WB setting on D300.

measurement method:

by taking a direct measurement off a white or gray (or magenta in our case) object that fills the whole viewfinder and store it as "d-0" preset. this setting can then be copied to any preset from "d-1" to "d-4" so it won't be accidentally erased by a new measurement. (note that there is NO picture taken in this process!)

file method:

by copying WB from an existing file to one of "d-1" to "d-4" presets. the file does not have to be an image of a white or gray object.

(see page 136 of D300 manual for further details
http://www.nikonusa.com/pdf/manuals/noprint/D300_en_noprint.pdf )

Your comment

"those are the coefficients embedded in the RAW files, not the coefficients one gets when using that RAW file to adjust WB"

raised an important question.

Which of the following happens when D300 adjusts WB based on an file?

a. It sets WB by averaging the whole image, like the "-a" flag in dcraw
(is this what you implied?)
b. It sets WB by using the file coefficients

Before your last post, I believed it did "b." , so I made an experiment to verify.

I shot
DSC0055.NEF with WB set to "d-1" (original magenta measurment) DSC0056.NEF with WB set to "d-2" (WB based on the raw image I sent you)
DSC0057.NEF with WB set to "d-3" (WB based on DSC0056.NEF)

I then developed with "dcraw -w" and saw that the camera recorded the same multipliers in all images... which means "b."

C:\data\D300\UniWB\myuniWB> dcraw -v -w -T -4 DSC0055.NEF
Loading NIKON D300 image from
DSC0055.NEF ...
Scaling with darkness 0, saturation 16383, and
multipliers 1.000000 1.036437 1.004049 1.036437
AHD interpolation...
Converting to sRGB colorspace...
Writing data to DSC0055.tiff ...

C:\data\D300\UniWB\myuniWB> dcraw -v -w -T -4 DSC0056.NEF
Loading NIKON D300 image from
DSC0056.NEF ...
Scaling with darkness 0, saturation 16383, and
multipliers 1.000000 1.036437 1.004049 1.036437
AHD interpolation...
Converting to sRGB colorspace...
Writing data to DSC0056.tiff ...

C:\data\D300\UniWB\myuniWB> dcraw -v -w -T -4 DSC0057.NEF
Loading NIKON D300 image from
DSC0057.NEF ...
Scaling with darkness 0, saturation 16383, and
multipliers 1.000000 1.036437 1.004049 1.036437
AHD interpolation...
Converting to sRGB colorspace...
Writing data to DSC0057.tiff ...

So once a WB measurement has been taken, all images based on this WB setting inherit the same coefficients. If any of these images is used to set WB for further shooting, the new images inherit the same coefficients as well.

What I do not understand is: how did you end up to an image with coefficients different from 1.000000 1.036437 1.004049 1.036437 by setting WB based on an file with these?

Best regards,
Elias
--
http://www.auhopu.com

antimonite Regular Member • Posts: 144
Re: Contrast and saturation

GaborSch wrote:

What about uploading the raw file, so that I can take a look at it in
ACR?

Sorry for the late answer, been out some days. Unfortunately it is not possible to upload the NEF file to Picasa. In the meantime I have taken some shots with a neutral tone curve 1:1 (not the reverse gamma because I compare sRGB histograms) and a WB 5000K G6 A1, which gives 258, 256, 264, 256. I have also applied no sharpness and neutral saturation and …I still have serious discrepancies in black level clipping with the blue channel, and red channel white level clipping.

Of course we cannot compare the histogram shapes because:

  • The raw has a bit count logarithmic scale and the camera one is lineal.

  • The camera histograms values are 8 bits, the raw are 12 or 14 shown over a 256 positions scale. (If I am not wrong)

  • The demosaicing influence in the bit count.

But the tendency of the distribution has to be the same.

On the other hand I have noticed that the D300's black level recorded on the RAW file is always 0 as well as the black point. The green channel white level is always about 3840, a 25% less than the other channels. According to Sony/Nikon information the A/D conversion is done by columns and there is only one kind of photodiodes, so in theory the white level has to be the same in all the channels. Going now to the black point, even with the transistor reset the base photodiode noise spread has to be there. Some information is missing in the RAW file. I have seen in your web page that you have found something similar with the D2X.

I give up. I think that with my D300 it will be near impossible to judge the sensor clipping through the in camera histogram.

Best regards, congratulations for your excellent PhotoBola Raw Image Analysis.

Antimonite

GaborSch Veteran Member • Posts: 7,203
A note on uploading

Whenever there is a need to upload something, what an image server does not accept, use yousendit.com. No need to register, you can use a fictional email address for sender and receiver. You get a URL for downloading, if you post that here (or wherever), everyone can download the file 10 days long.

I understand that you are fed up with technicalities, so I rather don't answer to the other issues.

Happy shooting!

Keyboard shortcuts:
FForum MMy threads