[comp.sys.amiga.tech] Nonlinear video info?

doug@xdos.UUCP (Doug Merritt) (01/02/90)

I just finished a dithering project for face server images (starting
with a program by Thad Floryan). Using a simple 2x2 ordered dither
in a high res screen and assuming a linear grey scale for the 4
bit planes, I ended up with 61 grey scales (15 * 4 + 1).

I then decided to try compensating the grey scale for nonlinearity
(as suggested by "Digital Halftoning"). In the process it occurred
to me that I could get more grey levels by taking advantage of the
nonlinearity.

After several days of tedious trial-and-error hacking on the grey scale,
I succeeded in creating one that has around 180 unique dithered grey levels,
producing a significant improvement in the resolution of the image.

The question: does anyone out there have any information about the
nonlinearity of the Amiga video output? This trial and error stuff is
for the birds! I stopped because I got burnt out in the process of
creating *any* nearly-monotonic grey scale, not because I had
created the best possible scale.

Second question: I've never heard of anyone doing this before on *any*
kind of equipment. Have you? Is it common, and I simply missed it?
It seems like a valuable way of improving output quality. The "Digital
Halftoning" bible glosses over the whole subjects of nonlinearity
and grey scales as trivial, but they're not. I suspect he just ran out
of steam.

Finally, yes, I know that different monitors are nonlinear in different
ways, too, but hey, I'm doing the best I can, and I don't have any info
about variation in nonlinearity from one monitor to another, either, so
I was just eyeballing it on my setup and leaving it at that. No, I don't
have a photometer, and if I did I'd worry about *its* linearity.

(And as for using ordered dither, I know about Floyd-Steinberg, but that's
a minor difference compared with what I could get from improving the
linearity of the grey scale! Also my original motivation for this project
was simply speed, which I've achieved...50 fold faster than the original
display program. Gee, it's hard to do fast graphics without the blitter!
But satisfying.)
	Thanks,
		Doug
-- 
Doug Merritt		{pyramid,apple}!xdos!doug
Member, Crusaders for a Better Tomorrow		Professional Wildeyed Visionary

aduncan@rhea.trl.oz.au (Allan Duncan) (01/19/90)

Doug Merrit of Hunter Systems asks about the non-linearity of the
amiga's output, and the variability of KNOWN monitor non-linearity.

I have been working with video (on and off) for many years, mainly from
the originating end of things, and have been disturbed by the blind
ignorance in which most computer terminals have been designed(?).  This
has been particularly galling with the use of EHB.  I had intended to
post a tutorial to the world in the near future, but will pre-empt it
with a quick run-down.

1. All crt displays are non-linear from voltage in (the usual way of
driving them) to cathode current out.  The relation between cathode
current and the screen light amplitude is approximately linear.  Note
that the BRIGHTness is the square of the amplitude.  There is a degree
of uniformity in the overall characteristic, and a particular value is
chosen for broadcasting purposes.  This is described as gamma in the
equation
         intensity = const1xV^gamma + const2

In Australian broadcasting, gamma is taken as 2.8


2. If there is ambient light, the darker portions of the picture will
dissappear in the reflected glow, so some elevation of these brightness
levels is needed.

3. Computer generated output (amiga included) is LINEAR.  Now in TV, the
camera output is compessed at the bright end the match the display
gamma, different types of pick-up tubes have different gammas, and have
to be matched accordingly.  CCD camera sensors are just as linear as the
amiga, however the camera has a gamma corrector built in.  THIS is my
beef about EHB - it isn't HALF bright at all, it is only 14% bright!
The correct solution would have been to have the video output corrected,
but it is too late now.  Look at stuff that uses EHB for an entire
screen - it looks like twilight, and unless you wind up the brightness to
overcome incident light, half missing.

4. The only way you can fully utilise EHB is to add (3) gamma
correctors, and then paint accordingly.  I don't know what is in the
Video Toaster, but it really should have them, or a lot of the paint
output will be sub-optimum.  The trouble is, the artist produces the
picture looking at an uncorrected output, and chooses a pallete
accordingly.

5. In the end, since human vision perceives brightness logarithmically,
what you see on the screen is really what counts, and subjective tests
underly all of the TV industry constants and standards.

Allan Duncan	ACSnet	aduncan@rhea.trl.oz
		ARPA	aduncan%rhea.trl.oz.au@uunet.uu.net
		UUCP	{uunet,hplabs,ukc}!munnari!rhea.trl.oz.au!aduncan
Telecom Research Labs, PO Box 249, Clayton, Victoria, 3168, Australia.