JuliaImages / DitherPunk.jl

Dithering algorithms in Julia.
MIT License
68 stars 3 forks source link

Add serpentine scanning option to error diffusion algorithms #20

Open adrhill opened 3 years ago

adrhill commented 3 years ago

As described here under the section "The "false" Floyd-Steinberg filter":

Much better results would be obtained by using an alternating, or serpentine, raster scan: processing the first line left-to-right, the next line right-to-left, and so on (reversing the filter pattern appropriately). Serpentine scanning –which can be used with any of the error-diffusion filters detailed here– introduces an additional perturbation which contributes more randomness to the resultant halftone.

(Apparently this is also known as Boustrophedon transform dithering.)