Hi.
After setting up my camera to uniwb, dcraw shows the following multipliers.
I was expecting the green multiplier to be 1.000, but it isn’t. After the readings I made to implement uniwb, I assumed that the green channel is always to be invariant, but maybe this is a wrong assumption.
gustavo@N4050:~/Pictures/2020/20200214_cr2_uniwb$ dcraw -w -v IMG_6915.cr2
Loading Canon EOS 5D image from IMG_6915.cr2 ...
Scaling with darkness 128, saturation 3692, and
multipliers 1.291240 1.164960 1.000000 1.164960
AHD interpolation...
Converting to sRGB colorspace...
Writing data to IMG_6915.ppm ...
Regardless, developing a few images has presented no problem so far, so maybe this is a nonsense question.
gustavo@N4050:~/Pictures/2020/20200214_cr2_uniwb$ dcraw -w -v -H 0 IMG_6915.cr2
Loading Canon EOS 5D image from IMG_6915.cr2 ...
Scaling with darkness 128, saturation 3692, and
multipliers 1.291240 1.164960 1.000000 1.164960
AHD interpolation...
Converting to sRGB colorspace...
Writing data to IMG_6915.ppm ...
gustavo@N4050:~/Pictures/2020/20200214_cr2_uniwb$ dcraw -w -v -H 1 IMG_6915.cr2
Loading Canon EOS 5D image from IMG_6915.cr2 ...
Scaling with darkness 128, saturation 3692, and
multipliers 1.000000 0.902203 0.774449 0.902203
AHD interpolation...
Converting to sRGB colorspace...
Writing data to IMG_6915.ppm ...
gustavo@N4050:~/Pictures/2020/20200214_cr2_uniwb$ dcraw -w -v -H 2 IMG_6915.cr2
Loading Canon EOS 5D image from IMG_6915.cr2 ...
Scaling with darkness 128, saturation 3692, and
multipliers 1.000000 0.902203 0.774449 0.902203
AHD interpolation...
Blending highlights...
Converting to sRGB colorspace...
Writing data to IMG_6915.ppm ...
gustavo@N4050:~/Pictures/2020/20200214_cr2_uniwb$ dcraw -w -v -H 3 IMG_6915.cr2
Loading Canon EOS 5D image from IMG_6915.cr2 ...
Scaling with darkness 128, saturation 3692, and
multipliers 1.000000 0.902203 0.774449 0.902203
AHD interpolation...
Rebuilding highlights...
Converting to sRGB colorspace...
Writing data to IMG_6915.ppm ...
dcraw’s “-H” modes don’t change the ratio between the multipliers. The modes do change the normalisation of the multipliers. “-H 0” normalises so the smallest multiplier is 1.0 (it divides all multipliers by the smallest). The other modes normalise to the largest multiplier is 1.0 (it divides all multipliers by the largest).
Can you explain how you did this?
I thought the purpose of uniwb was to set all multipliers to 1.0 in the camera. But I could be wrong.
For the same motivation that drove the first “uniwb developers” to devise it, as stated by one of the first users here.
EDIT: Also, a recommended reading:
Let’s think through the problem. I think the purpose of (the rather awkward) UniWB is to make the JPEG driven histogram in the camera behave as if it were a raw one. This ruins the JPEG and so there is no point using the JPEG+RAW mode as you have.
To approach this problem, I would first need to take a photograph of a evenly soft illuminated grey card near saturation. If I know the properties of the card and lighting, I would know what WB, etc., settings to change to make the histogram behave in the way I want it to.
Now here are the multipliers that (I believe) you should be examining. I say “(I believe)” because I haven’t done this in a long time and every camera has different metadata. If I recall correctly, you could ask exiftool or maybe it was exiv2 to expose the full name of the tags to make sure you have the right one(s).
If these are the correct ones, then you can clearly see that the ratio is off from R=G=B. Clearly something is wrong. If I recall correctly, Mr Kasson’s quick method depends on your monitor being calibrated / profiled in a particular way.
I noticed something else in your metadata.
Picture Style : User Def. 1
Picture Style User Def : Standard; Standard; Standard
In my opinion, it shouldn’t be Standard but Neutral. If you don’t have Neutral, then Faithful. Basically, turn down or off anything that would affect the JPEG and make it more abstract from what the “raw” output would be (e.g., sharpening, non-linear modes).
PS I noticed that your dcraw output says 3692 as saturation. At 12 bit, it should be 4096 as the max value. I wonder why dcraw would use the former value…
I’m not familiar with Canon exiftool results, but I think the “Measured RGGB” mentioned by @afre is what the camera measures from the scene. But the camera is set to use a custom WB, isn’t it, so it ignores the measured RGGB?
These are exactly the ratios given by @gadolf above, but in RGBG order:
dcraw …
multipliers 1.291240 1.164960 1.000000 1.164960
I think the goal of uniwb is to get all four multipliers the same, or at least very close. Perhaps the camera has the ability to dial down the red channel slightly, and dial up the blue channel slightly. Take another photo, and what does “WB RGGB Levels As Shot” say?
Ideally, cameras would have a simple ability to set the four multipliers. Alas, that would be too simple.
I used measured because (I believe) that is what the camera actually sees. If you think of it another way, in measured, the reds are lacking; so in the WB settings, we give red more weight. In any case, @gadolf should be able to verify the appropriate tags.
Yes, I saw that.
But I wanted to start from scratch. Anyway, since my camera is rather old (5D from 2005), I thought it would be better to do it manually so that I ended up having measurements according to this specific camera, not a generic 5D image probably produced by a healthier 5D camera than mine.
What I mean is that you do your part and then compare his metadata with yours. I had trouble downloading it via Firefox so I used a separate downloader. Here is the file for reference: uniwb5d.cr2 (11.5 MB).
I see.
I was already doing that, but since you’ve made it, thanks.
In summary, his uniwb5d.cr2 shows:
dcraw
gustavo@N4050:~/Pictures$ dcraw -w -v uniwb5d.cr2
Loading Canon EOS 5D image from uniwb5d.cr2 …
Scaling with darkness 127, saturation 3692, and
multipliers 2.381836 1.000000 1.230469 1.000000
AHD interpolation…
Converting to sRGB colorspace…
Writing data to uniwb5d.ppm …
gustavo@N4050:~/Pictures/2020/20200213_cr2_uniwb$ dcraw -w -v IMG_6909.cr2
Loading Canon EOS 5D image from IMG_6909.cr2 …
Scaling with darkness 128, saturation 3692, and
multipliers 1.972656 1.000000 1.448242 1.000000
AHD interpolation…
Converting to sRGB colorspace…
Writing data to IMG_6909.ppm …
EDIT: Take note that what I call “my uniwb5d_gadolf” is the image I took from the screen after following all the steps to produce the image that will bring jpeg wb closer to raw, which, in my case, is IMG_6909.cr2
I am confused by the image above of Mr Lujik’s. His maximum deviation looks like he is doing R-G=5.6%. If we do that with the provided CR2 or yours, we get a huge difference. Something is amiss.
Yeah, mine is 1.291240 - 1.164960 = 0.12628, or 12.6%, which is more than double the recommended channel deviation of around 5%.
Well, although I still don’t understand why in first place dcraw doesn’t show 1.000 for G for an image taken with uniwb, from the tests I made so far I have a somewhat approximate “raw histogram” in my camera.