Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcdc!hpfcdj!myers
From: myers@hpfcdj.HP.COM (Bob Myers)
Newsgroups: sci.electronics
Subject: Re: sync signal generator
Message-ID: <17660017@hpfcdj.HP.COM>
Date: 16 Aug 89 18:35:40 GMT
References: <89216.120136BHB3@PSUVM>
Organization: Hewlett Packard -- Fort Collins, CO
Lines: 66

>Ardent calls their 24 bit color table "Truecolor" and I was just wondering if
>it was possible to see the finest steps in a smooth transition on the monitor.
>While you can only display 1310720 unique colors at a time on the screen,
>it would be possible to make a 16 frame "movie" loop that displayed all of
>the possible colors.  A possible test would be to have R increase with X,
>G increase with Y, and B increase with time/frame #.

OK, I understand what you mean now.  What you're really asking here is if
the video amplifies provide a proper response such that the brightness of
each color (of red, green, and blue) increases linearly and monotonically
over a 256-step range.  The answer to this, for most current color monitors,
is both yes and no (don't you just love these precise answers?).  Making
an amplifier with a linear, monotonic response over this range is not
difficult.  However, the output of the amplifier (the signal sent to the
CRT cathodes) does not linearly correspond to brightness, and therein lies
the first problem.  An additional problem is that, even if the system DID
correctly resolve these color, it is very doubtful that the human eye will
be able to tell the difference in all cases.  Now, more on the CRT 
non-linearity, etc.:

>pattern.  If you draw one of these primary color bars with 256 levels and
>adjust the monitor so that it is black on one side and saturated on the
>other, the color change will not appear to be linear.  It will be different
>from an old monitor to a new monitor.  It will also differ between the red,
>green, and blue phosphors.  It will be very different on a video photograph.
>The individual's eyes and the ambient lighting will also play a role.
>All of these parts have non-linear response curves.  
>
>Ardent was clever enough to put what they call "Gamma Correction Tables"
>in between their color table and each video DAC to allow for correcting
>the curves.  I have not discovered how they determine the curves, but it
>sounds like they can be changed fairly easily.  These promise to be very
>useful in correcting for video photography.  Now, if I can only figure out
>how to generate the curves :-)

The cathode of a CRT (actually, three cathodes in the color CRT's case) does
age with time.  However, you should be able to correct gross errors by
performing a white balance adjustment as recommended by the manufacturer.
Gamma correction is the next step beyond this, in a way, and can provide
pretty accurate results if you understand how it works.

As mentioned above, the absolute brightness level (as measured by a photometer,
not as perceived by the eye) does not vary linearly with the applied signal
level in a typical CRT.  Instead, the increase follows a curve described by
the formula

                    I = k(Vg)^(gamma)

where I is the intensity of the light resulting from control grid voltage Vg
("k" is a constant that hides a multitude of sins in getting from voltage to
brightness).  The value of gamma is usually determined empirically for each
CRT/monitor design; typical values are between 2 and 3.  To provide a linear
response, some systems (or monitors, as this could also be done in the
video amp design) provide "gamma correction."  If done in the display logic,
as in your case, this usually consists of an additional set of look-up tables.
You can generate the correction easily enough yourself, by playing with the
equation above and re-writing these tables.  Starting with a gamma of about
2.5 is probably as good as any, then move up or down by 0.1 or so and see how
you like the results.  It's reasonably safe to assume that the video amplfiers
themselves are linear, so the Vg is the above equation corresponds directly 
with the signal coming out of your DACs.


Bob Myers            | "One man's "magic" is another man's engineering.  
myers%hpfcla@hplabs. |     "Supernatural" is a null word." 
hp.com               |                   - Lazarus Long/Robert A. Heinlein