Go Back   Rangefinderforum.com > Rangefinder Forum > Photography General Interest

Photography General Interest Neat Photo stuff NOT particularly about Rangefinders.

Reply
 
Thread Tools Display Modes

0 - 255 Histograms
Old 10-17-2012   #1
daveleo
Registered User
 
daveleo's Avatar
 
daveleo is offline
Join Date: Oct 2010
Location: Central Mass. (USA)
Posts: 1,171
0 - 255 Histograms

I should know this (I thought I did) but I don't.

My DSLR displays a linear image histogram for each RGB color and also the overall "value".

After some stumbling about it, I find that neutral 18% gray = 128 on this histogram scale, half way between 0 and 255.

I am trying to calibrate my brain and I'm looking for the correlation between f-stops and 0 - 255. I cannot find what I am looking for.

If 128 = 18% (just about 2 1/2 f-stops down from white) how can I interpret the linear histogram shown on my camera's LCD in terms of f-stops ?

This is not an idle question, as I have been shooting manually with old lenses and finding the exposures are not what I expected.

Thanks in advance for any replies.
__________________
Dave

http://www.cafephotos.net
  Reply With Quote

Old 10-17-2012   #2
Roger Hicks
Registered User
 
Roger Hicks is offline
Join Date: Apr 2005
Location: Aquitaine
Posts: 18,238
Dear Dave,

If I am reading you right, surely the histogram is logarithmic rather than linear? Wouldn't it HAVE to be, to fit 18% in as half way?

The point (again, as I understand it) is that perception (of greys) is indeed logarithmic, not linear.

Cheers,

R.
__________________
Now even more free photography information on www.rogerandfrances.com
  Reply With Quote

Old 10-17-2012   #3
edge100
Registered User
 
edge100 is offline
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 184
For an 8-bit JPEG:

255 - 128 = 1 stop
127 - 64 = 1 stop
63 - 32 = 1 stop
31 - 16 = 1 stop
15 - 8 = 1 stop
7 - 4 = 1 stop
3 - 2 = 1 stop
1 - 0 = 1 stop

The histogram is not linear; it's exponential (or logarithmic, if you prefer), base 2. So the range between 0 and 1 and between 128 and 255 both represent one stop, which is why you are advised to "use the bits" and "expose to the right" (i.e. so your stop of light is represented by more 'levels').

Remember, however, that all modern DSLRs are 14-bit, so the noise floor doesn't come quite as quickly as on older 12-bit cameras. That is to say, as bit depth increases, the real value is increased shadow detail; since the noise floor is fixed for a given sensor generation, the higher the bit depth, the further away shadow detail gets from that noise floor. Thus, with 14-bit (or 16-bit, as found in many digital MF backs), you're gaining 2 (or 4) stops of DR over the old 12-bit sensors, and that DR is manifested as better shadows (contrast this with film where the increased DR of negative films vs digital is manifested in better highlight retention).
__________________
www.mfphotography.ca - Toronto street photography.
  Reply With Quote

Old 10-17-2012   #4
daveleo
Registered User
 
daveleo's Avatar
 
daveleo is offline
Join Date: Oct 2010
Location: Central Mass. (USA)
Posts: 1,171
Let's agree that I am confused, so maybe what I am saying is just wrong.

My confusion is that grayscale #128 = 18% gray, which (in photographic terms) is 2 and 1/2 stops down from white. But white = grayscale #255.

My question is: if the midpoint of my camera's histogram is #128 = 2 1/2 stops down from white (#255), where is one f-stop, 2 f-stops, 3 f-stops, etc down from white ??

I have to disagree with edge100 on this . . . 128 is NOT one f-stop down from 255 (actually that's what I thought until I saw the results). 128 is 2 1/2 f-stop down from 255.

Somewhere there is a chart listing grayscale number ( 0- 255) and f-stops down from white . . . somewhere . . . .

as a reference: http://www.luminous-landscape.com/tu...stograms.shtml
__________________
Dave

http://www.cafephotos.net
  Reply With Quote

Old 10-17-2012   #5
Roger Hicks
Registered User
 
Roger Hicks is offline
Join Date: Apr 2005
Location: Aquitaine
Posts: 18,238
Is it actually 128, then? Or is it just half way down?

Not arguing: I'm confused too. And so, maybe, is anyone who labelled 128 as 18% grey.

Cheers,

R.
__________________
Now even more free photography information on www.rogerandfrances.com
  Reply With Quote

Old 10-17-2012   #6
jtm6
Registered User
 
jtm6 is offline
Join Date: Jul 2012
Posts: 275
Quote:
Originally Posted by daveleo View Post
My confusion is that grayscale #128 = 18% gray...
The 128 doesn't refer to the 18% grey value on the card. An 18% grey card reflects about 50% of the light. That's all there is to it. 0-255 represent the range of an 8-bit value, so a value of 127 or 128 represents a measurement of 50% for the light being reflected.

Plus:
- since 50% of light is measured as 50% on the scale, it indicates that the histogram scale is linear.
- the exact number can vary a little bit depending on things like gamma.
  Reply With Quote

Old 10-17-2012   #7
Nomad Z
Registered User
 
Nomad Z is offline
Join Date: Aug 2010
Posts: 390
If memory serves, according to St Ansel, the so-called 18% grey is actually 50% grey with 18% reflectance.
  Reply With Quote

Old 10-17-2012   #8
daveleo
Registered User
 
daveleo's Avatar
 
daveleo is offline
Join Date: Oct 2010
Location: Central Mass. (USA)
Posts: 1,171
Obviously, I have homework to do.

I always thought that one f-stop down = 50% of the light impacting the film (sensor). And that a gray card was 18% of "white" which is 2 1/2 f-stops down from white. (1 f-stop = 50%; 2 f-stops = 25%; 3 f-stops = 12.5%, etc etc) How 18% of the reflected light got to be 128/255 is beyond my understanding at the moment.

I'd sure like to see that list of grayscale # (0 - 255) versus f-stops down from white - which is what started me going on this quest.

My best guess is that on the digital grayscale meter ( 0 - 255) one f-stop = 51, which puts "gray" at 128 or so, if white = 255 and black = 0. But . . . I actually just made that up to fit the numbers .
__________________
Dave

http://www.cafephotos.net
  Reply With Quote

Old 10-17-2012   #9
Roger Hicks
Registered User
 
Roger Hicks is offline
Join Date: Apr 2005
Location: Aquitaine
Posts: 18,238
An 18% grey card reflects 18% of the light falling on it. That's why it's called an 18% grey...

But because PERCEPTION is more or less logarithmic, if you ask people to rank (say) 21 cards with different reflectances from 5% to 90% (the highest you can realistically get), they'll put the 18% in the middle: a so-called Munsell mid-tone.

Cheers,

R.
__________________
Now even more free photography information on www.rogerandfrances.com
  Reply With Quote

Old 10-17-2012   #10
edge100
Registered User
 
edge100 is offline
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 184
Quote:
Originally Posted by jtm6 View Post
The 128 doesn't refer to the 18% grey value on the card. An 18% grey card reflects about 50% of the light. That's all there is to it. 0-255 represent the range of an 8-bit value, so a value of 127 or 128 represents a measurement of 50% for the light being reflected.
True.

Quote:
Originally Posted by jtm6 View Post
Plus:
- since 50% of light is measured as 50% on the scale, it indicates that the histogram scale is linear.
- the exact number can vary a little bit depending on things like gamma.
The histogram is not linear with respect to its relationship to photographic f/stops. If it were linear, then the difference between 255 and 128 (i.e. 1 f/stop) would be the same as the difference between 127 and 0. In reality, the latter represents 7 f/stops, ergo the scale is non-linear.

In an 8-bit system, 128 represents exactly one-half full scale, or put another way, 50% of pure white.
__________________
www.mfphotography.ca - Toronto street photography.
  Reply With Quote

Old 10-17-2012   #11
edge100
Registered User
 
edge100 is offline
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 184
Quote:
Originally Posted by daveleo View Post

My best guess is that on the digital grayscale meter ( 0 - 255) one f-stop = 51, which puts "gray" at 128 or so, if white = 255 and black = 0. But . . . I actually just made that up to fit the numbers .
The problem is that it's not linear. The digital value of 1 f/stop can be as small as 1 (i.e. between 0 and 1) and as big as 127 (i.e. between 128-255), for an 8-bit system. That's the whole basis of analog-to-digital conversion: higher analog signals (brighter, in the case of light) are recorded with increased fidelity because they're represented by more digital levels than lower signals.

Now, if you increase bit depth (say, to 16-bits), now you have 65536 levels, and the same intensity of light that registered with a single level in your 8-bit system (i.e. 8 f/stops down from full white) is now represented by 512 levels, which is far above the noise floor, hence increased DR in the shadows.
__________________
www.mfphotography.ca - Toronto street photography.
  Reply With Quote

Old 10-18-2012   #12
daveleo
Registered User
 
daveleo's Avatar
 
daveleo is offline
Join Date: Oct 2010
Location: Central Mass. (USA)
Posts: 1,171
I appreciate everyone who is taking time to comment here. I am still struggling to understand, and will continue reading up on this.

My recent camera experience does imply that (on a scale of 0 - 255) the middle value (128) shown on the camera's histogram is only one f-stop down from white. I say this because the images were consistently, uniformly over-exposed. This does agree with some of the above.

I still have some holes to fill in my thinking. Like how an 18% gray card is really reflecting 50% of the light hitting it ? ? That puts "gray" one f-stop down from "white"? All my life I thought it was 2 1/2 stops down from white.

Anyway . . . thanks all for your time, I will learn to use the histogram in the field even if I don't quite get the math that's going on.
__________________
Dave

http://www.cafephotos.net
  Reply With Quote

Old 10-18-2012   #13
Roger Hicks
Registered User
 
Roger Hicks is offline
Join Date: Apr 2005
Location: Aquitaine
Posts: 18,238
Quote:
Originally Posted by daveleo View Post
I appreciate everyone who is taking time to comment here. I am still struggling to understand, and will continue reading up on this.

My recent camera experience does imply that (on a scale of 0 - 255) the middle value (128) shown on the camera's histogram is only one f-stop down from white. I say this because the images were consistently, uniformly over-exposed. This does agree with some of the above.

I still have some holes to fill in my thinking. Like how an 18% gray card is really reflecting 50% of the light hitting it ? ? That puts "gray" one f-stop down from "white"? All my life I thought it was 2 1/2 stops down from white.

Anyway . . . thanks all for your time, I will learn to use the histogram in the field even if I don't quite get the math that's going on.
It really, really isn't, and anyone who tells you it is, doesn't understand what they're talking about. An 18% grey LOOKS (about) half as bright, because perception is logarithmic. But in reality, it's reflecting -- gosh, what a surprise -- 18% of the light falling on it.

This whole minefield is known as 'psychophysics' -- what things actually look like to real people, not what instruments (or people who don't understand the subject) tell you they 'should' look like.

Cheers,

R.
__________________
Now even more free photography information on www.rogerandfrances.com
  Reply With Quote

Old 10-18-2012   #14
sepiareverb
genius and moron
 
sepiareverb's Avatar
 
sepiareverb is offline
Join Date: Feb 2007
Location: NEK
Posts: 7,109
I would suggest not over thinking it and running a quick, simple test with a white card, a black card, an 18% grey card and a couple of beers.
  Reply With Quote

Old 10-18-2012   #15
mfunnell
Shaken, so blurred
 
mfunnell's Avatar
 
mfunnell is offline
Join Date: Sep 2006
Location: Sydney, Australia
Posts: 1,842
Quote:
Originally Posted by sepiareverb View Post
I would suggest not over thinking it and running a quick, simple test with a white card, a black card, an 18% grey card and a couple of beers.
I think your test needs more beers.

...Mike
__________________
There is a very fine line between "hobby" and "mental illness." Dave Barry

My RFF top 10(12). My flickr photostream has day-to-day stuff, while dA has some of my better shots.
  Reply With Quote

Old 10-18-2012   #16
Jack Conrad
Registered User
 
Jack Conrad's Avatar
 
Jack Conrad is offline
Join Date: Jan 2010
Posts: 1,312
Ack! I just read this whole thread, and now I think I've contracted some sort of histogram virus.
  Reply With Quote

Old 10-18-2012   #17
sepiareverb
genius and moron
 
sepiareverb's Avatar
 
sepiareverb is offline
Join Date: Feb 2007
Location: NEK
Posts: 7,109
Quote:
Originally Posted by mfunnell View Post
I think your test needs more beers.

...Mike
Everything needs a few more beers.
  Reply With Quote

Beer is not confusing
Old 10-18-2012   #18
daveleo
Registered User
 
daveleo's Avatar
 
daveleo is offline
Join Date: Oct 2010
Location: Central Mass. (USA)
Posts: 1,171
Beer is not confusing

Actually, the only thing that I understand so far is the part about the beer
__________________
Dave

http://www.cafephotos.net
  Reply With Quote

Old 10-18-2012   #19
Roger Hicks
Registered User
 
Roger Hicks is offline
Join Date: Apr 2005
Location: Aquitaine
Posts: 18,238
To do the experiment properly, you need a large number of cards in varying shades of grey, from the darkest black you can get (typically 2-5% reflectivity) to the brightest white (just over 90% reflectivity). Arrange them in order from the darkest to the lightest. Pick the one you think looks most like a mid-tone. It will be 18% reflectance, or something close to it. This is because we're MUCH better at seeing small differences on something brightly lit than at seeing small differences in poor lighting. People can often tell the difference between two 'whites' (very light greys) that differ by 1/10 stopor less, but with 'blacks' (very dark greys), we may need 1/2 stop or more to see the difference.

Cheers,

R.
__________________
Now even more free photography information on www.rogerandfrances.com
  Reply With Quote

There is a lot of incorrect here
Old 10-18-2012   #20
Ranchu
Registered User
 
Ranchu's Avatar
 
Ranchu is offline
Join Date: Sep 2009
Posts: 1,095
There is a lot of incorrect here

Here is the answer. Apparently this item is no longer on the web, but we owe many thanks to Julia Borg for creating it.
Attached Images
File Type: jpg gamma.jpg (75.0 KB, 13 views)
__________________
You can dance if you want to
All the critics love you, in New York
You don't have to keep the beat
They'll still think it's neat, in New York

http://www.thehungersite.com/clickTo...faces?siteId=1
  Reply With Quote

Old 10-18-2012   #21
sol33
Registered User
 
sol33 is offline
Join Date: Feb 2008
Location: Barcelona
Posts: 85
Quote:
Originally Posted by Ranchu View Post
Here is the answer. Apparently this item is no longer on the web, but we owe many thanks to Julia Borg for creating it.
Ranchu is correct. The 14bit data in raw files is linear, but the 8bit data in jpeg files is gamma corrected. The most common gamma value is 2.2 which is (roughly) what is used in sRGB. Gamma 1.8 was common for older Macintosh computers, but since 10.6 Leopard Macs use a gamma of 2.2 too. A gamma of 1 is no gamma correction at all so this column represents linear data. However, 8 bit of linear data allow for only 8 stops of dynamic range, thats why raw files have more bits.
  Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -8. The time now is 21:22.


vBulletin skin developed by: eXtremepixels
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

All content on this site is Copyright Protected and owned by its respective owner. You may link to content on this site but you may not reproduce any of it in whole or part without written consent from its owner.