Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Digital Photography > How to understand 18% gray?

Reply
Thread Tools

How to understand 18% gray?

 
 
David J. Littleboy
Guest
Posts: n/a
 
      11-27-2007

"Douglas" <(E-Mail Removed)> wrote:
> "David J. Littleboy" <(E-Mail Removed)> wrote:
>> "Steven Woody" <(E-Mail Removed)> wrote:
>>
>>> why 18% gray is in the mid of the full scale of brightness from
>>> darkest to brightest? what's the math behind it?

>>
>> While the "logarithmic" answer people have given is correct, it's easier
>> to see if you remember that a one stop difference means a twice the
>> brightness.
>>
>> So if you have mid-gray at 18%, you get five (that's all, folks) useful
>> tones on a print: 4.5%, 9%, 18%, 36%, and 72%. If you toss in 0% and
>> 100%, that makes 7 (although you probably won't be able to see the
>> difference between 4.5% and 0).


Note that Dave M. has provided a much better discussion of this issue than
the above.

> Perhaps a usefulness not yet explained or stated is for matching colour. I
> use a white, black and grey card (home made) in the first shot of a scene.
> I use it with the "levels" function of Photoshop and so far (maybe 1000
> frames) it works better than nearly any other post shoot white balance.


I don't recommend this. I have two Kodak gray cards here that have radically
different color compositions: one is somewhat blue, the other quite warm.

David J. Littleboy
Tokyo, Japan


 
Reply With Quote
 
 
 
 
Steven Woody
Guest
Posts: n/a
 
      11-27-2007
thanks for all your explains and that actually made me in the way of
understanding. now, another question poped up in my mind: how to
map a 18% point ( or a mid-tone point ) in a 1 to 255 scale in digital
photo file? there are four possible answers i can guess,

1, 255/2 = 128
2, 255*0.18 = 45
3, 0.18^(1/2.2)*255 = 117
4, 0.5^(1/2.2)*255 = 186

which one is right?
 
Reply With Quote
 
 
 
 
Don Stauffer in Minnesota
Guest
Posts: n/a
 
      11-27-2007
On Nov 26, 1:21 pm, "Douglas" <(E-Mail Removed)> wrote:
> "David J. Littleboy" <(E-Mail Removed)> wrote in messagenews:(E-Mail Removed)...
>
>
>
> > "Steven Woody" <(E-Mail Removed)> wrote:

>
> >> why 18% gray is in the mid of the full scale of brightness from
> >> darkest to brightest? what's the math behind it?

>
> > While the "logarithmic" answer people have given is correct, it's easier
> > to see if you remember that a one stop difference means a twice the
> > brightness.

>
> > So if you have mid-gray at 18%, you get five (that's all, folks) useful
> > tones on a print: 4.5%, 9%, 18%, 36%, and 72%. If you toss in 0% and 100%,
> > that makes 7 (although you probably won't be able to see the difference
> > between 4.5% and 0).

>
> > David J. Littleboy
> > Tokyo, Japan

>
> Perhaps a usefulness not yet explained or stated is for matching colour. I
> use a white, black and grey card (home made) in the first shot of a scene. I
> use it with the "levels" function of Photoshop and so far (maybe 1000
> frames) it works better than nearly any other post shoot white balance.
>
> I don't believe digital photography has the same use for a grey card as film
> shooters have.
>
> Douglas


I'm too lazy to look it up now, but weren't the definitions for ASA
and ISO speeds based on an exposure just above the toe of the
characteristic curve? I always assumed the 18% value was related to
that.

On the other hand, didn't the ISO for digital speed try to stick as
close to that for film speed as possible?
 
Reply With Quote
 
John Passaneau
Guest
Posts: n/a
 
      11-27-2007
Don Stauffer in Minnesota <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> On Nov 26, 1:21 pm, "Douglas" <(E-Mail Removed)> wrote:
>> "David J. Littleboy" <(E-Mail Removed)> wrote in
>> messagenews:(E-Mail Removed)...
>>
>>
>>
>> > "Steven Woody" <(E-Mail Removed)> wrote:

>>
>> >> why 18% gray is in the mid of the full scale of brightness from
>> >> darkest to brightest? what's the math behind it?

>>
>> > While the "logarithmic" answer people have given is correct, it's
>> > easier to see if you remember that a one stop difference means a
>> > twice the brightness.

>>
>> > So if you have mid-gray at 18%, you get five (that's all, folks)
>> > useful tones on a print: 4.5%, 9%, 18%, 36%, and 72%. If you toss
>> > in 0% and 100%, that makes 7 (although you probably won't be able
>> > to see the difference between 4.5% and 0).

>>
>> > David J. Littleboy
>> > Tokyo, Japan

>>

stuff sniped

One other reason I've not seen mentioned yet is that it's the level all our
exposure meters, even the ones in our digital cameras are set to "see".
That is if you expose a white or black object with you built in meter, it
tries to give you an expose that will make it 18% gray. So including a gray
card will give you something to set your meter by.

John Passaneau
 
Reply With Quote
 
Steven Woody
Guest
Posts: n/a
 
      11-28-2007
On Nov 27, 11:16 pm, Don Stauffer in Minnesota <(E-Mail Removed)>
wrote:
> On Nov 26, 1:21 pm, "Douglas" <(E-Mail Removed)> wrote:
>
>
>
> > "David J. Littleboy" <(E-Mail Removed)> wrote in messagenews:(E-Mail Removed)...

>
> > > "Steven Woody" <(E-Mail Removed)> wrote:

>
> > >> why18% gray is in the mid of the full scale of brightness from
> > >> darkest to brightest? what's the math behind it?

>
> > > While the "logarithmic" answer people have given is correct, it's easier
> > > to see if you remember that a one stop difference means a twice the
> > > brightness.

>
> > > So if you have mid-gray at18%, you get five (that's all, folks) useful
> > > tones on a print: 4.5%, 9%,18%, 36%, and 72%. If you toss in 0% and 100%,
> > > that makes 7 (although you probably won't be able to see the difference
> > > between 4.5% and 0).

>
> > > David J. Littleboy
> > > Tokyo, Japan

>
> > Perhaps a usefulness not yet explained or stated is for matching colour. I
> > use a white, black and grey card (home made) in the first shot of a scene. I
> > use it with the "levels" function of Photoshop and so far (maybe 1000
> > frames) it works better than nearly any other post shoot white balance.

>
> > I don't believe digital photography has the same use for a grey card as film
> > shooters have.

>
> > Douglas

>
> I'm too lazy to look it up now, but weren't the definitions for ASA
> and ISO speeds based on an exposure just above the toe of the
> characteristic curve? I always assumed the18% value was related to
> that.
>


what i can remember is the 0.1 plus filmbase + fog density on which
the ISO speed was based.

> On the other hand, didn't the ISO for digital speed try to stick as
> close to that for film speed as possible?

 
Reply With Quote
 
Steven Woody
Guest
Posts: n/a
 
      11-28-2007
On Nov 27, 12:13 pm, Steven Woody <(E-Mail Removed)> wrote:
> thanks for all your explains and that actually made me in the way of
> understanding. now, another question poped up in my mind: how to
> map a18% point ( or a mid-tone point ) in a 1 to 255 scale in digital
> photo file? there are four possible answers i can guess,
>
> 1, 255/2 = 128
> 2, 255*0.18 = 45
> 3, 0.18^(1/2.2)*255 = 117
> 4, 0.5^(1/2.2)*255 = 186
>
> which one is right?


any clue?
 
Reply With Quote
 
EAL
Guest
Posts: n/a
 
      11-28-2007
On Tue, 27 Nov 2007 19:20:58 -0800 (PST), Steven Woody
<(E-Mail Removed)> wrote:

>On Nov 27, 12:13 pm, Steven Woody <(E-Mail Removed)> wrote:
>> thanks for all your explains and that actually made me in the way of
>> understanding. now, another question poped up in my mind: how to
>> map a18% point ( or a mid-tone point ) in a 1 to 255 scale in digital
>> photo file? there are four possible answers i can guess,
>>
>> 1, 255/2 = 128
>> 2, 255*0.18 = 45
>> 3, 0.18^(1/2.2)*255 = 117
>> 4, 0.5^(1/2.2)*255 = 186
>>
>> which one is right?

>
>any clue?


I don't understand the question. I know "poped" means to make holier,
but what does "in digital photo file" mean? And how is 255 supposed to
relate to a percent?

Ed
 
Reply With Quote
 
Floyd L. Davidson
Guest
Posts: n/a
 
      11-28-2007
Steven Woody <(E-Mail Removed)> wrote:
>On Nov 27, 12:13 pm, Steven Woody <(E-Mail Removed)> wrote:
>> thanks for all your explains and that actually made me in the way of
>> understanding. now, another question poped up in my mind: how to
>> map a18% point ( or a mid-tone point ) in a 1 to 255 scale in digital
>> photo file? there are four possible answers i can guess,
>>
>> 1, 255/2 = 128
>> 2, 255*0.18 = 45
>> 3, 0.18^(1/2.2)*255 = 117
>> 4, 0.5^(1/2.2)*255 = 186
>>
>> which one is right?

>
>any clue?


Here's a table that might interest you. The two columns
marked "Levels" list the number of levels that fstop
range is divided into; hence, in the brightest zone an
image from 12-bit linear data can have 2048 distinctly
different values for brightness, while in an 8-bit gamma
corrected image there are 69 possible distinct levels in
that zone.

Fstop | Linear Linear Gam.Cor. Gam.Cor. Gam.Cor.
| 12 bit Analog Analog 8 bit 8 bit
Range | Levels Value Value Value Levels
------|-----------------------------------------------
1 | 2048 1.0 1.0 255 69
2 | 1024 0.5 0.72974 186 50
3 | 512 0.25 0.53252 136 37
4 | 256 0.125 0.38860 99 27
5 | 128 0.0625 0.28358 72 20
6 | 64 0.03125 0.20694 53 14
7 | 32 0.015625 0.15101 38 10
8 | 16 0.007812 0.11020 28 8
9 | 8 0.003906 0.08042 21 6
10 | 4 0.001953 0.05868 15 4
11 | 2 0.0009765 0.04282 11 3
12 | 1 0.0004883 0.03125 8 2


The useful dynamic range basically ends when one full
fstop is divided into fewer than 8 values. Hence a
12-bit linear data set has about a 9 stop useful dynamic
range, while an 8-bit gamma corrected data set has about
an 8 stop range. (With fewer than 8 levels the
quantization distortion becomes too apparent, and the
results are referred to as "posterized".)

To answer your question above requires knowing where you
are going to set the white and the black points of the
"display" (paper or monitor). For example, when
printing on paper with a 5 fstop dynamic range, the
printer would normally be adjusted to make 255 be
"white" and 52 black. The middle zone, 3, would have
values ranging from 100 to 136.

Does "3, 0.18^(1/2.2)*255 = 117" look grey to you?

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
Dave Martindale
Guest
Posts: n/a
 
      11-28-2007
Steven Woody <(E-Mail Removed)> writes:
>thanks for all your explains and that actually made me in the way of
>understanding. now, another question poped up in my mind: how to
>map a 18% point ( or a mid-tone point ) in a 1 to 255 scale in digital
>photo file? there are four possible answers i can guess,


>1, 255/2 = 128
>2, 255*0.18 = 45
>3, 0.18^(1/2.2)*255 = 117
>4, 0.5^(1/2.2)*255 = 186


#1 would be correct if the file used 8-bit linear coding, but nobody
does that because 8 bits simply doesn't give enough dynamic range or
intensity resolution in the shadow areas. On the other hand, 16-bit
linear coding is sometimes used.

#2 makes no sense to me.

#3 is close to correct assuming a particular exposure (see below). The
nonlinear function y = x^(1/2.2) is how intensity is encoded in video,
in JPEG files, and lots of other places. This is generally not
adjustable, nor not adjustable very much.

#4 tells you what you'd expect to find in the image file for a scene
brightness of 50% of peak (e.g. one stop down), not 18%.

Now more about exposure:
You or the camera has a choice of what brightness in the image gets
considered "1.0" and mapped to 255 in the file. Since images have
areas of widely varying reflectance illuminated by different amounts of
light, 255 doesn't necessarily represent "100% reflectance"; it's just
the brightest tone that the camera has decided to handle. So the
"0.18" in this expression is best regarded as "0.18 times peak white in
this photo", not any absolute reflectance.

It's actually more complex, too, because cameras may depart from this
power function in the highlight and/or shadow areas in order to capture
more brightness range at lower contrast in those areas. The "shoulder"
and "toe" in film response does the same thing in chemical photography.

Since the response tends to be more predictable in the midtones, one
good way to expose images in the first place is to adjust the exposure
so that something you have decided is of average brightness (e.g. an 18%
grey card) ends up in the middle of the tonal scale where you've decided
it should be (theoretically 117, but 115 or 120 or even 128 work too).
Exposing so a grey card ends up in the middle of the code value range,
or the middle of the film density range as measured by a densitometer,
is very common.

In the electronic world, it's sometimes more convenient to expose so
that the brightest thing in the scene that you want to preserve
information from ends up near, but not beyond, 255. You can do this
approximately using any digital camera that has a histogram display.
Some cameras also flash or put zebra stripes in areas that were
overexposed in the preview image, which gives better visualization of
what will be recorded correctly and what will be clipped.

Dave
 
Reply With Quote
 
mirafiori
Guest
Posts: n/a
 
      11-29-2007
if you look at a photographic grayscale of 11 steps, the centre mid-gray
(the sixth step) is indicated as 0.7. this is sensitometric density value, a
log value of opacity.
opacity = 100% of illumination upon X% reflected or transmitted light.
if X=18%, then opacity = 100/18=5.5
therefore sensitometric density = log5.5 = 0.74...-round off to 0.7.
hence 18% reflection gray is 0.7 sensitometric density value and is the
mid-gray between the white and black of a grayscale.


"Steven Woody" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> why 18% gray is in the mid of the full scale of brightness from
> darkest to brightest? what's the math behind it?



 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
an error on multi-source, but I can't understand... Neil VHDL 11 03-11-2010 03:15 PM
Read all of this to understand how it works. then check around on otherRead all of this to understand how it works. then check around on other thelisa martin Computer Support 2 08-18-2005 06:40 AM
understand Mozilla Thunderbird files... Joh Firefox 6 12-11-2004 11:46 PM
how to read and understand long written VHDL code? walala VHDL 6 09-03-2003 07:49 PM



Advertisments