From: jsvrc@rc.rit.edu (J A Stephen Viggiano)
Subject: Re: Screen colors (Was Re: Zork/Dungeon)
Organization: RIT Research Corp
Date: Fri, 9 Oct 1992 15:50:18 GMT

In article <Xs76RB1w164w@lorc.UUCP> lowen@lorc.UUCP (Lamar Owen) writes:
 
>This is very true.  But, even with a 4096x4096 screen, you still couldn't see
>16 million colors.  Why?  The eye can only distinguish about 4 milllion colors.
>So, those other 12 million are just useless baggage.  Although using 24 bits
>for color info is easy on the hardware and the programmer, these days, due to 
>IBM's success at pushing 8-bit bytes.

All this assumes optimal quantization, which our CRT display subsystems
certainly do not have. No digital display system does.

In order to properly represent natural color scenes (eg., scanned in
photographs), it is necessary to use *at least* 7 bits per channel. This is
easy to prove, as the eye can resolve approximately 100 levels of gray alone.
In order to avoid tonescale aliasing, at least 100 levels of gray must be
provided. This is conveniently accomplished with 7 bits; 2 ** 7 = 128. The
additional bit per channel is necessary to allow for multiple quantization,
as well as artifacts which are introduced as you allow multiple dimensions
(i.e., color images as opposed to monochrome).

Seven bits is barely sufficient for monochrome, and eight bits are preferred.
For color images, we need three planes, not just one, so 21 bits are
necessary. Those of you with true color systems, capable of displaying
24-bit color, might want to try a little experiment. Start with a good
quality natural color image, with a full depth of 24 fully-populated bits
per pixel. Quantize the image to 21 bits per pixel, and compare it to the
original version. There should be little, if any, discernable difference. Now
quantize it to 18 bits per pixel, and compare it again. You'll notice false
contours (they show up readily in skin and sky); these give the picture a
paint-by-numbers appearance. The effect is even more pronounced at 15 bits
per pixel, which allows 5 bits per plane.

This experiment is easy to do in Adobe Photoshop on the Macintosh, but you'll
need a 24-bit display system to do it. Starting with a good full-color scene,
perhaps one of the demonstration images they provide, verify that all levels
are populated, at least in margin, by looking at the Red, Green, and Blue
histograms under Image/Histogram. Then use the "Posterize" option to
perform the quantization -- first to 128 levels (7 bits), then to 64 levels
(6 bits), and finally to 32 levels (5 bits).

Those with eight-bit display systems can verify at least the first assumption,
that the eye can resolve seven bits' worth of lightness, by using a monochrome
image. Take a good black-and-white picture, with all or nearly all levels
occupied. Again, this can be verified using a histogram. Lop off the low
order bits, one at a time. If you have Photoshop, this can be done using
the Posterize tool. You should start seeing the contours at 6 bit (64 level)
quantization for most images. It works best on images which have smooth
transistions from light to dark -- a digitally-generated gradation can
help you see the results. Be sure your monitor is set to 256 grays before
you start.

The only reason some people are satisfied with 8-bit color mapped color
displays, such as VGA, is that they haven't worked with true color systems,
such as TARGA, VISTA, or 32-bit Quickdraw, or they're doing things such as
business graphics, which can use a small pallette of colors. For natural
color scenes, 24 bits per pixel is baseline performance.

Steve Viggiano, A.B., Sc.M., M.Stat.
Senior Imaging Scientist
Rochester Institute of Technology Research Corporation
Newsgroups: alt.folklore.computers