From mmt@dciem.UUCP Thu Jan 21 18:30:55 1988
Path: leah!uwmcsd1!ig!agate!aurora!labrea!decwrl!sun!pitstop!sundc!seismo!uunet!mnetor!utzoo!dciem!mmt
From: mmt@dciem.UUCP (Martin Taylor)
Newsgroups: comp.graphics
Subject: Re: Advanced Dither Needed
Message-ID: <2602@dciem.UUCP>
Date: 21 Jan 88 23:30:55 GMT
References: <3703@ames.arpa> <2741@masscomp.UUCP> <2863@watcgl.waterloo.edu>
Reply-To: mmt@dciem.UUCP (Martin Taylor)
Distribution: na
Organization: D.C.I.E.M., Toronto, Canada
Lines: 56


>A comment on dither - the "quick and dirty" approach to uniform division of
>the color space (so that R, G and B can be treated separably) very often
>slices up 8 bit pixels as 3 bits for red and green, 2 bits for blue (where
>the eye is least sensitive).
>
>This is an unnecessary oversimplification that leaves blue with only two
>mid-range intensities. 
>[There follows a discussion of coding colour tables]

It is not strictly true that the eye is least sensitive to colour
variation in the neighbourhood of blue.  In fact, the MacAdam discrimninatio
ellipses are smallest near blue and largest near green.  What IS true
is that the eye does not discriminate blue-yellow contrasts in small
areas, nor does it have any blue-yellow edge detectors.  Hence, blue
is a good candidate for colour dither.  I have never tried this, having
not been associated with colour display since about 12 years ago, but the
following seems like a good idea, based on visual function:

Give as much colour resolution per pixel as you can to red-green contrast,
and minimize dither in that part of the colour space.  For blue,
which dominates the blue-yellow contrast of most regions, use either
1 or 2 bits, but average over substantial regions by dithering.  If one
dithers over a 4X4 region with 1 bit, one has 16 blue levels over regions
that probably are not far from the resolution limit of the eye for
blue-yellow contrast.  Unfortunately, this will not be the whole story,
because the blue phosphor contributes more to brightness than does a
good central blue, but it should be a reasonable approximation.  As a
practical matter, I suspect that the traditional 3+3+2 red-green-blue
distribution of bits is not bad if one dithers red and green on a
3-pixel region, and blue on a 9-pixel region.  The 3-pixel regions
would be L-shaped or inverted-L-shaped, interlocking for either red or
green, with the interlock column offset 1-pixel between red and green.
At discrete edges in the image, don't dither, but use the best per-pixel
value.  The existence of the edge will mask any subtle colour error.

These are untested ideas, but off-hand I can't see why they would not
give good subtle shading in a colour space of 9x9x18 (red-blue-green)
over gradually varying regions of a picture, plus good edge resolution
in other regions.  You actually want better blue colour resolution
and worse blue spatial resolution than for red and green, which is
what this scheme would give you.  But I have no idea how computationally
expensive it would be to have these non-rectangular dither areas which
had different boundaries for all three primary colours.

If anyone tries this, I would like to know how it works (and to get
credit if it is magnificent!).
-- 

Martin Taylor
{allegra,linus,ihnp4,floyd,ubc-vision}!utzoo!dciem!mmt
{uw-beaver,qucis,watmath}!utcsri!dciem!mmt
mmt@zorac.arpa
Magic is just advanced technology ... so is intelligence.  Before computers,
the ability to do arithmetic was proof of intelligence.  What proves
intelligence now?