[comp.lang.postscript] grayscale -- logarithmic or linear??

davis@pacific.mps.ohio-state.edu ("John E. Davis") (05/14/91)

Hi,

   I was wondering if the relationship between the grayscale as defined by
postscript (density of points??) and the way the eye perceives shades of gray
is linear or logarithmic.  It seems to me that the eye less sensitive to the
darker shades of gray than lighter ones.  The reason I want to know is that I
am writing a program to draw contour plots and I am representing the third
dimension as shades of gray.

Thanks,
--
John

  bitnet: davis@ohstpy
internet: davis@pacific.mps.ohio-state.edu

aty@ucselx.sdsu.edu (young a t) (05/17/91)

In article <DAVIS.91May13235246@pacific.mps.ohio-state.edu> davis@pacific.mps.ohio-state.edu  (John E. Davis) writes:
>Hi,
>
>   I was wondering if the relationship between the grayscale as defined by
>postscript (density of points??) and the way the eye perceives shades of gray
>is linear or logarithmic.  It seems to me that the eye less sensitive to the
>darker shades of gray than lighter ones.  The reason I want to know is that I

Unfortunately, the answer to this question is "no".  The response function of
the eye is neither linear nor logarithmic, but approximately a POWER law.
The apparent lightness of a surface is nearly proportional to the CUBE ROOT
of its reflectance or brightness.

Thus, a medium gray that looks about halfway between white and black turns out
to reflect about 16%.

There is a huge literature on this subject, covering the areas of color science,
psychophysics, and neurophysiology (among others).  There are also several
different gray-scale and color-naming systems in use: the NBS-ISCC names, the
Munsell color system (used in the paint, paper, and pharmaceutical industries),
the Pantone system (used in color printing), etc.  Most of it is quite opaque
to outsiders because each group employs a different jargon.

For your purposes, stick to the cube-root law and you'll be happy with the
results.  If you're lazy, a square-root approximation won't look quite right,
but might be good enough.

		-- A.T.Young   (aty@mintaka.sdsu.edu)