# Changeset 2130Tweet

Ignore:
Timestamp:
Dec 7, 2007, 10:39:04 AM (12 years ago)
Message:
• Use serpentine FS instead of classical FS.
• Remove the crap about FS artifacts in colour dithering.
Location:
www/study
Files:
5 deleted
13 edited

Unmodified
Removed
• ## www/study/part3.html

 r2127

Ostromoukhov’s variable coefficients error diffusion uses a small matrix, which usually causes a lot of artifacts to appear. However, the coefficients here vary according to the input value, and the list of 256 discrete value triplets for d1, d2 and d3 provided by Ostromoukhov give pretty good results:

error diffusion values here are not constant. They vary according to the input value, and the list of 256 discrete value triplets for d1, d2 and d3 provided by Ostromoukhov give pretty good results with serpentine parsing:

• ## www/study/part4.html

 r2034 pixels in the [0, 0.5] range with black and gray, and pixels in the [0.5, 1] range with gray and white. Here are two different results with 4×4 Bayer ordered dithering and with Floyd-Steinberg error diffusion:

ordered dithering and with serpentine Floyd-Steinberg error diffusion:

class="inline" alt="4×4 Bayer ordered dithering gradient, 3 colours" /> class="inline" alt="serpentine FS error diffusion, 3 colours" /> class="inline" alt="serpentine FS error diffusion gradient, 3 colours" />

Here are the results of gamma-correcting input pixels before doing any computation on them, then using Floyd-Steinberg error diffusion:

any computation on them, then using serpentine Floyd-Steinberg error diffusion:

class="inline" alt="serpentine FS, 2 colours, gamma-corrected" /> class="inline" alt="serpentine FS, 2 colours, gamma-corrected gradient" /> class="inline" alt="serpentine FS, 3 colours, gamma-corrected" /> class="inline" alt="serpentine FS, 3 colours, gamma-corrected gradient" />

class="inline" alt="serpentine FS, 4 colours, gamma-corrected" /> class="inline" alt="serpentine FS, 4 colours, gamma-corrected gradient" />

• ## www/study/part5.html

 r2030 the images into three channels.

Here are the results with Floyd-Steinberg dithering applied to each channel. On the left, no colour correction, as The Gimp or Photoshop would

Here are the results with serpentine Floyd-Steinberg dithering applied to each channel. On the left, no colour correction, as The Gimp or Photoshop would do; on the right, gamma-corrected dithering:

class="inline" alt="serpentine FS, 8 colours" /> class="inline" alt="serpentine FS, 8 colours, gamma-corrected" />

It is therefore quite clear that the exact pixel values matter much less than visual artifacts. Here is a close-up of the previous output’s top-left corner. The slanted bright pixel lines that appear are typical Floyd-Steinberg artifacts. They are rendered even worse by the fact that dithering is done on three different dimensions that do not take the others into account:

Some algorithms perform a bit better in this area. This is Stucki dithering. The Floyd-Steinberg artifacts are much less visible:

And this is a close-up of the same area: