Velocity Reviews > histogram logarithm

# histogram logarithm

drs@canby.com
Guest
Posts: n/a

 12-06-2004
I am new to reading digital photo histograms. I've been told that the
horizontal scale of luminosity is logarithmic. That the histogram is
divided into 8 segments (not visually differentiated) of equal width.
The first segment at the right side contains twice the information as
the next segment, and that segment contains twice the info as its
neighbor to the left, and so on. Meaning that the distribution image
isn't quite what it might appear at first glance, its being on a
logrithmic rather than linear scale. Apparently, the advantage of a
log scale is that since the dark (left) end of the histogram
represents images with far fewer photons, a linear scale histogram
would be pretty thin on that end. Can anyone direct me to a better
explanation of this? One that doesn't have a degree in physics as a
prerequisite?

Michael A. Covington
Guest
Posts: n/a

 12-06-2004

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am new to reading digital photo histograms. I've been told that the
> horizontal scale of luminosity is logarithmic.

Right, just like film curves and all the other exposure scales you've seen.
Equal distances correspond to equal numbers of f-stops.

> That the histogram is
> divided into 8 segments (not visually differentiated) of equal width.

No. It is more or less continuous, or divided into hundreds of segments.

The reason for the log scale is that we perceive light logarithmically. The
shutter speeds on your camera are logarithmic (1/1000, 1/500, 1/250... not
1/1000, 2/1000, 3/1000...). The f-stops on your camera lens produce
logarithmically scaled intensities. One "stop" is a factor of 2, not an
increment of 2.

In short: Don't panic. Photographic measurements have been logarithmic all
along. What you think of as "midtones" are halfway along a logarithmic
scale, not halfway along a linear scale.

If the histogram were not logarithmic, the highlights would take up far too
much of it.

Ron Wong
Guest
Posts: n/a

 12-07-2004
In article <(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> I am new to reading digital photo histograms.
>...
>...Can anyone direct me to a better explanation of this? One that doesn't
> have a degree in physics as a prerequisite?

http://www.luminous-landscape.com/tu...stograms.shtml

ron

P.S. Didn't this question come up not too long ago - like within the past
couple of weeks?

drs@canby.com
Guest
Posts: n/a

 12-07-2004
On Mon, 06 Dec 2004 23:03:40 -0800, (E-Mail Removed) (Ron
Wong) wrote:

>http://www.luminous-landscape.com/tu...stograms.shtml

I've read that article and quite a few others. None mention the
logarithmic distribution and from what I was recently told,
understanding the difference between a log scale and a linear scale is
very helpful in using histograms. He was saying that the histogram of
a properly exposed black-and-white checkerboard (exactly same amount
of blacks and whites) would not show a symmetrical curve. The curve
would be weighted toward the dark end of the scale. A useful thing to
know, apparently. Not that being unaware of that means a person can't
use a histogram to improve exposure.

Timo Autiokari
Guest
Posts: n/a

 12-07-2004
On Mon, 06 Dec 2004 11:04:15 -0800, (E-Mail Removed) wrote:

The histogram that digital cameras show is not logarithmic nor linear.

With current digital cameras the histogram shows the distribution of
the linear captured data after the data has been a) automatically
edited (finalized) by the firmware of the camera and b) compensated
for CRT viewing. So, in short, with most if not all digital cameras
the histogram is calculated from the camera finalized JPEG image. This
unfortunately is so even if one is shooting in the linear RAW mode.

In case the following three requirements are in effect:

1) the camera outputs the image data in the sadRGB color space (not
many do so even if the manufacturers may so indicate in the manual)

2) the camera does behave colorimetricly, in other words it does not
apply non-colorimetric "enhancements" (most if not all point&shoot
cameras are non-colorimetric and some dSLRs are also).

3) the coding system of the camera is such that it maps the captured
data up to level 255 (most do so)

then you can estimate your exposure value (EV) from the histogram
using the following table:

Histogram ends at 255 == EV 0
Histogram ends at 230 == EV -0.33
Histogram ends at 207 == EV -0.67
Histogram ends at 186 == EV -1
Histogram ends at 168 == EV -1.33
Histogram ends at 151 == EV -1.67
Histogram ends at 136 == EV -2
Histogram ends at 122 == EV -2.33
Histogram ends at 110 == EV -2.67
Histogram ends at 99 == EV -3
Histogram ends at 89 == EV -3.33
Histogram ends at 80 == EV -3.67
Histogram ends at 72 == EV -4

So, e.g. if the histo of your photo ends at level 207 it means that
you'd need to overexpose by +2/3 stops in order to capture hull
histogram (in other words to utilize the capability of the camera in
the best possible way).

Most cameras do not apply the sadRGB transfer function so the
following table that is calculated for gamma 1.72 space (native gamma
space of Mac systems) will often give more accurate estimation:

Histogram ends at 255 == EV 0
Histogram ends at 223 == EV -0.33
Histogram ends at 195 == EV -0.67
Histogram ends at 170 == EV -1
Histogram ends at 149 == EV -1.33
Histogram ends at 130 == EV -1.67
Histogram ends at 114 == EV -2
Histogram ends at 100 == EV -2.33
Histogram ends at 87 == EV -2.67
Histogram ends at 76 == EV -3
Histogram ends at 67 == EV -3.33
Histogram ends at 58 == EV -3.67
Histogram ends at 51 == EV -4

Now, a totally another issue then is the way how you perceive the
effect of the f/stops (aperture) when you look through the viewfinder
and change the aperture setting of the lens (while keeping the DOF
button pressed). In this situation the vision adapts (light
aperture (that also has logarithmic scale) will be perceived as a
change that is equal in "effect" or in "amount", stop after stop, so
the perceived effect is about linear. That is the desired effect and
infarct the very reason why the aperture scaling was chosen to be
logarithmic.

Timo Autiokari http://www.aim-dtp.net

drs@canby.com
Guest
Posts: n/a

 12-07-2004
On Tue, 07 Dec 2004 20:44:10 +0200, Timo Autiokari
<(E-Mail Removed)> wrote:

>On Mon, 06 Dec 2004 11:04:15 -0800, (E-Mail Removed) wrote:
>

>
>The histogram that digital cameras show is not logarithmic nor linear.

Thanks. I'm quickly out of my element. I'll keep reading.

eawckyegcy@yahoo.com
Guest
Posts: n/a

 12-07-2004
Timo Autiokari wrote:

> The histogram that digital cameras show is not logarithmic nor

linear.

??? I take a picture with my 10D. I observe histogram. I say "it
needs another stop". So I adjust the exposure to add 2x the light,
take a new picture and look at the histogram. The whole thing shifts
over one horizontal "bar" on the display, just as one would expect.

So it seems fairly log-ish to me. And really, if the histogram didn't
behave this way, the feature would be rather useless.

Charles Schuler
Guest
Posts: n/a

 12-07-2004

> ??? I take a picture with my 10D. I observe histogram. I say "it
> needs another stop". So I adjust the exposure to add 2x the light,
> take a new picture and look at the histogram. The whole thing shifts
> over one horizontal "bar" on the display, just as one would expect.
>
> So it seems fairly log-ish to me. And really, if the histogram didn't
> behave this way, the feature would be rather useless.

Linear would be next to useless. My camera works the same way. Many log
graphs are powers of ten but digital camera histograms (the horizontal axes)
are powers of two.

Timo Autiokari
Guest
Posts: n/a

 12-08-2004
(E-Mail Removed) wrote:

>So it seems fairly log-ish to me. And really, if the histogram didn't
>behave this way, the feature would be rather useless.

Well, it does not behave like that. The 4 vertical bars in the 10D
histogram are not f/stops, if they were the 10D would only have a 5
f/stop dynamic range. But is has about 8 stops of dynamic range.

You can easily test this, with the camera in manual, take macrophotos
of white evenly illuminated paper (set the lens un-focussed so paper
surface will be optically blurred) at dfferent exposures by 1/3 f/stop
stepping. The histo will show a nice peak for each shot and you can
verify how the EV adjustment affect to the data (how the peak is moved
as the function of EV).

The histogram is calculated as I explained earlier. For the 10D and
other dcameras that have equally spaced 4 vertical divisor bars in the
histogram display one of the following tables will give a decent
approximation (the bars are counted from right to left):

Assuming gamma 1.72 space, if the histogram ends:
at the location of Whitepoint: EV = 0
in the middle of Whitepoint and 1st bar: EV = -0.26
at the location of 1st bar: EV = -0.55
in the middle of 1st bar and 2nd bar: EV = -0.89
at the location of 2nd bar: EV = -1.27
in the middle of 2nd bar and 3rd bar: EV = -1.72
at the location of 3rd bar: EV = -2.27
in the middle of 3rd bar and 4th bar: EV = -2.99
at the location of 4th bar: EV = -3.99
in the middle of 4th bar and Blackpoint: EV = -5.71

Assuming gamma 2 space, if the histogram ends:
at the location of Whitepoint: EV = 0
in the middle of Whitepoint and 1st bar: EV = -0.3
at the location of 1st bar: EV = -0.64
in the middle of 1st bar and 2nd bar: EV = -1.03
at the location of 2nd bar: EV = -1.47
in the middle of 2nd bar and 3rd bar: EV = -2
at the location of 3rd bar: EV = -2.64
in the middle of 3rd bar and 4th bar: EV = -3.47
at the location of 4th bar: EV = -4.64
in the middle of 4th bar and Blackpoint: EV = -6.64

Assuming gamma 2.2 space, if the histogram ends:
at the location of Whitepoint: EV = 0
in the middle of Whitepoint and 1st bar: EV = -0.33
at the location of 1st bar: EV = -0.71
in the middle of 1st bar and 2nd bar: EV = -1.13
at the location of 2nd bar: EV = -1.62
in the middle of 2nd bar and 3rd bar: EV = -2.2
at the location of 3rd bar: EV = -2.91
in the middle of 3rd bar and 4th bar: EV = -3.82
at the location of 4th bar: EV = -5.11
in the middle of 4th bar and Blackpoint: EV = -7.31

Timo Autiokari http://www.aim-dtp.net

Tom Nakashima
Guest
Posts: n/a

 12-08-2004

"Timo Autiokari" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> (E-Mail Removed) wrote:
>
> >So it seems fairly log-ish to me. And really, if the histogram didn't
> >behave this way, the feature would be rather useless.

>
> Well, it does not behave like that. The 4 vertical bars in the 10D
> histogram are not f/stops, if they were the 10D would only have a 5
> f/stop dynamic range. But is has about 8 stops of dynamic range.
>
> You can easily test this, with the camera in manual, take macrophotos
> of white evenly illuminated paper (set the lens un-focussed so paper
> surface will be optically blurred) at dfferent exposures by 1/3 f/stop
> stepping. The histo will show a nice peak for each shot and you can
> verify how the EV adjustment affect to the data (how the peak is moved
> as the function of EV).
>
> The histogram is calculated as I explained earlier. For the 10D and
> other dcameras that have equally spaced 4 vertical divisor bars in the
> histogram display one of the following tables will give a decent
> approximation (the bars are counted from right to left):
>
> Assuming gamma 1.72 space, if the histogram ends:
> at the location of Whitepoint: EV = 0
> in the middle of Whitepoint and 1st bar: EV = -0.26
> at the location of 1st bar: EV = -0.55
> in the middle of 1st bar and 2nd bar: EV = -0.89
> at the location of 2nd bar: EV = -1.27
> in the middle of 2nd bar and 3rd bar: EV = -1.72
> at the location of 3rd bar: EV = -2.27
> in the middle of 3rd bar and 4th bar: EV = -2.99
> at the location of 4th bar: EV = -3.99
> in the middle of 4th bar and Blackpoint: EV = -5.71
>
> Assuming gamma 2 space, if the histogram ends:
> at the location of Whitepoint: EV = 0
> in the middle of Whitepoint and 1st bar: EV = -0.3
> at the location of 1st bar: EV = -0.64
> in the middle of 1st bar and 2nd bar: EV = -1.03
> at the location of 2nd bar: EV = -1.47
> in the middle of 2nd bar and 3rd bar: EV = -2
> at the location of 3rd bar: EV = -2.64
> in the middle of 3rd bar and 4th bar: EV = -3.47
> at the location of 4th bar: EV = -4.64
> in the middle of 4th bar and Blackpoint: EV = -6.64
>
> Assuming gamma 2.2 space, if the histogram ends:
> at the location of Whitepoint: EV = 0
> in the middle of Whitepoint and 1st bar: EV = -0.33
> at the location of 1st bar: EV = -0.71
> in the middle of 1st bar and 2nd bar: EV = -1.13
> at the location of 2nd bar: EV = -1.62
> in the middle of 2nd bar and 3rd bar: EV = -2.2
> at the location of 3rd bar: EV = -2.91
> in the middle of 3rd bar and 4th bar: EV = -3.82
> at the location of 4th bar: EV = -5.11
> in the middle of 4th bar and Blackpoint: EV = -7.31
>
> Timo Autiokari http://www.aim-dtp.net

Greetings Timo,
you seem to be an expert on the histogram.
I've never used mine in the field. I have a Pentex spot meter that I use
for evaluating highlights and shadows. Perhaps I no longer need the spot
meter. Do you use the histogram much in the field? I would like to learn
more on how to use it.
-tom