[comp.graphics] Dithering/Halftoning techniques

dburkes@pnet12.cts.com (Danny Burkes) (09/09/88)

I would be interested in exchanging ideas/experiences with anyone who
is/has implemented dithering techniques on in C/ASM to display continious
tone images on bi-level devices, especiallyr$: anyone who has a good
Floyd-Steinberg algorithm which is pratical for micros.  k{he ~{
The floating point nature of FS dithering makes it quite slow (at least in
mymy implementations) and I would be interested in anyone else's
experiences, as well as any alternative error-diffusion techniques anyone
may have.  By all means, drop me a line as this is what I have been doing
for the last 6 months.


Dan Burkes

UUCP: {crash btree}!pnet12!dburkes
ARPA: crash!pnet12!dburkes@nosc.mil
INET: dburkes@pnet12.cts.com

markv@uoregon.uoregon.edu (Mark VandeWettering) (09/10/88)

In article <166@serene.CTS.COM> dburkes@pnet12.cts.com (Danny Burkes) writes:
>I would be interested in exchanging ideas/experiences with anyone who
>is/has implemented dithering techniques on in C/ASM to display continious
>tone images on bi-level devices, especiallyr$: anyone who has a good
>Floyd-Steinberg algorithm which is pratical for micros.  k{he ~{
>The floating point nature of FS dithering makes it quite slow (at least in
>mymy implementations) and I would be interested in anyone else's
>experiences, as well as any alternative error-diffusion techniques anyone
>may have.  By all means, drop me a line as this is what I have been doing
>for the last 6 months.

There isn't anything about FS dithering that inherently says that you
have to use floating point math.  You are merely trying to spread the
error inside the rendering of a single pixel to the surrounding pixels.
The figures that I have usually seen have used 3/8 of the error
propogating rightward and downward, and 2/8 (1/4) of the error propogating 
diagonally right and down.

The main thing to remember is that you have to account for ALL the error
somehow.  If you are using integer math for instance, and have an error
of 7 in the current pixel, then 3/8 * 7 = 2 (truncated) and 2/8 * 7 = 1.
This only acounts for 5 out of the total error of 7.  You have to ensure
that all your error terms sum to the current error.  What I generally do
is pick a direction and bump the error for that direction
"nondeterministically" [*].

mark vandewettering

nondeterministically -- should be random, but is in fact generally
implemented as just round robin the directions.  First down, next down
and right, next right....