White point adjustment

Good question, and one which should go into RawPedia. Maybe @heckflosse @agriggio or @jdc can help answer: what is the math (in layman terms, if possible) of the exposure slider and how does it affect the black point? How does it compare to the math of the “standard” tone curve?

What scale is the curve in, what do the curve grid lines represent?

Some tests:

Thank you @Morgan_Hardwood From the limited empirical tests I have done, it seems that the effect of dragging the top right hand point on the curve to the left is similar to the effect you get with the ‘whites’ slider in Lr i.e. the mid-tones are not affected in the same way as they are when you use the exposure slider to nudge the histogram up to the white point. It will be interesting to see whether this is indeed the case.

I am not at home, but in travel :slight_smile:
Just a general remark. All work in RGB is always «false» full of approximations which may seems pleasant but depend on working space…
Jacques

1 Like

exposure is just a multiplication by 2^{Ev}. the tone curve is gamma encoded so what looks like a straight line in the graph is actually a nonlinear curve, that’s why you see differences between the two.

1 Like

scratch that – it shouldn’t matter actually. I will refrain from commenting further until I get back home and do some homework with pencil and paper :slight_smile:

I don’t know the math but in simple terms:
When you change the exosure you change the white point, the black point and everything in between.
When you change the white point in the tone curve, the black point doesn’t change. Everything in between changes in proportion to it’s position between the two.

well, of course it does matter. the formula should be something like this:

y = T(x^{\gamma})^{1/\gamma}

where T is the tone curve, and x \in [0,1] is the input value

1 Like

Exposure compensation is a multiplication operator; zero times EV equals zero.

For what it’s worth, Guillermo Luijk has a dcraw tutorial that discusses this:

http://www.guillermoluijk.com/tutorial/dcraw/index_en.htm

Scroll down to " EXPOSURE CORRECTION USING CURVES"…

Yep.

But the black point still changes when you change the exposure.

Then, something else is being done besides the exposure transform. You can’t move a value that is RGB=0,0,0 off that with multiplication.

When it is determined that a particular camera has a non-zero value for its black point, that compensation occurs as a subtraction of that value from all measurements in the image. I’m having fun with just that right now; my trusty D7000 had a blackpoint of zero, but my new Z6 has a blackpoint of 1008, so that has to be subtracted from the image early on to make it look right.

Ok, so black is black. And the rest of the image moves in relation to that. Is that a better way of saying the black point changes?

My comment was supposed to be a simple comparison of the two techniques in question, not a technical legalese definition of exposure.

I’m afraid not, sorry. or at least I don’t understand what you mean by that.

My comment was supposed to be a simple comparison of the two techniques in question

applying a linear curve is the same as multiplying

@Marctwo, the two techniques in question have a technical basis. If one doesn’t understand that basis, they’re just moving sliders around and hoping for the best. If that’s your objective, have fun.

@Wayne_Sutton, I do the curve technique to adjust my white point all the time, in the manner described in the article I posted in a previous post. Both it and exposure compensation are “linear scaling”, or multiplicative operations, the adjusted variable has different meanings based on the supporting equation. I like the curve method because I can stare at the histogram, figure out a white point I like, and scooch the control point over to it. I find this to be especially important if there is clipped data in the raw image, as that gets shifted arbitrarily by white balance and if you don’t either white-point to the lowest clipped channel or do a “reconstruction pet trick”, you get the dreaded magenta cast.

Now, this is based on my software, not RT. RT is doing things for you that you need to tease from what we’re talking about to insure you’re understanding the specific effect of these transforms, on the appropriate input data.

Thanks everyone for the replies. I’m still not sure I understand completely what is going on however If you push the exposure slider hard over to the right then the black point does indeed appear to stay put on the histogram while everything else above black is shifted to the right. Rawpedia maybe a bit misleading here @Morgan_Hardwood because it states that: Moving it to the right shifts the whole histogram to the right. This means this slider changes the black point (on the very left of the histogram) and the white point (on the very right). The formula indicated by @agriggio would presumably explain the difference between the two methods as far as the effect on the midtones is concerned although if I understand you correctly @ggbutcher the two methods are strictly linear operations so I’m a bit confused still on that point . For what it’s worth, I found a similar discussion regarding the use of the two methods in Lr but I’m not sure it adds anything to our discussion. The 4th post in the thread by MFRYE describes his observations using the two methods and these seem to stack up with what I have observed. two different ways to set black- and whitepoint
I agree with you @ggbutcher regarding the curve technique.

lol. If only it were that simple…

There are many levels between those extremes. I don’t fully understand the molecular structure of the gases in a light bulb… but I know when to turn the light on.

then please do elaborate. feel free to go as complex/detailed as you think is needed, I’ll do my best to follow…

1 Like

I did that in my first comment.

I see. thanks for clarifying

1 Like

“linear” in this case refers to a transfer function that progresses by a constant. Simply, this means the transfer function graphs as a line. Exposure and the two-point “curve” both have this characteristic, which is why exposure can equivalently be applied by a poorly-named “linear curve”.

This characteristic of a two-point curve is very useful in image processing. So much so that I wrote a separate curve routine just for that case, because computing x->y with a slope is so much more efficient than looking up y for each x in a complicated spline algorithm. It forms the basis for my blackwhitepoint tool in rawproc, where I can set black and white on a two-button slider and this “linear curve” is applied between the two points.

The reason for scaling your image thusly has one of its roots in the difference between your camera’s tone measurement range and most display’s range between black and white. A 14-bit raw file would seem to go most of the way in filling 16-bit integers available on modern computers, but really it’s only a quarter of the 16-bit range, 0-16383. And then, most consumer displays are still just 8-bit, so eventually a scaling has to be done in the “bad” direction, the direction that loses precision. And so, setting a point in the data range as “white” tells the software where to scale your data to meet that expectation.

A good “white” isn’t always the max value of all three channels; if you over-exposed your image, all the light past the sensor’s capability will just get glommed at the saturation point. Well and good until white balance is applied; now each of those channels is shifted in various ways, left or right of green (the common reference for white balance) and those saturation spikes separate from each other in the histogram. If you set the white point at the highest spike, your whites will take on a (usually) magenta cast, describing the residual color contributed by the spikes that aren’t at the white point. In that case you have to set the white point close to or at the lowest spike. This is stuff most raw processors do before they present an image to you for further mangling.

That same “linear curve” can be used to correct a lot of color casts. Look at the RGB histogram of a color negative sometime; you’ll notice that each channel has the about the same shape, but shifted left-right from each other. If your software lets you set separate black and white points for each R, G, and B channel, you can set them for each channel and they scale the channels to the same limits which removes the color cast. You can use white balance multipliers to do this, but you can’t set separate black points with them so the channel-shifting can’t be as equivalent.

More than you probably wanted to know. Sorry, just got into a writing mood…