= Libcaca study: the science behind colour ASCII art = This document is an attempt at extending the leverage of skilled resources by uncovering and addressing the challenges the industry faces today in the area of colour ASCII art generation. Seriously, guys. If you think that what libcaca does is easy, you either don’t know what you are talking about, or we want you in the team. == Foreword == Meet Lena. She will guide us through this document, because the seriousness of a scientific document in the area of computer graphics can be measured by the number of times Lena appears in it. She truly is the Mona Lisa of image processing. ![2] [[Image(source:/web/trunk/www/study/lena256.png,alt="Lena (256×256)")]] [[Image(source:/web/trunk/www/study/gradient256.png,alt="colour gradient (64×256)")]] [[Image(source:/web/trunk/www/study/lena256bw.png,alt="Lena (256×256BW)")]] [[Image(source:/web/trunk/www/study/gradient256bw.png,alt="greyscale gradient (32×256)")]] This document makes a lot of assumptions, such as the fact that input images are made of pixels that have either one (grey level) or three (red, green and blue) values uniformly spread between 0 and 1 (with regards to human contrast perception). Real life is more complicated than that, but that is beyond the scope of this document for now. Table of contents * [wiki:libcaca/study/1 1. Colour quantisation] * 1.1. Black and white thresholding * 1.2. Greyscale thresholding * 1.3. Dynamic thresholding * 1.4. Random dithering * [wiki:libcaca/study/2 2. Halftoning] * 2.1. Halftoning patterns * 2.2. Screen artifacts * 2.3. Ordered dithering * 2.4. Random ordered dithering * 2.5. Non-rectangular dither tiles * 2.6. Supercell dithering * 2.7. Void and cluster method * [wiki:libcaca/study/3 3. Error diffusion] * 3.1. Floyd-Steinberg and !JaJuNi error diffusion * 3.2. Floyd-Steinberg derivatives * 3.3. Changing image parsing direction * 3.4. Variable coefficients error diffusion * 3.5. Block error diffusion * 3.6. Sub-block error diffusion * 3.7. Direct binary search * [wiki:libcaca/study/4 4. Model-based dithering] * 4.1. Gaussian human visual system model * 4.2. Direct binary search * 4.3 Comparing dithering algorithms * [wiki:libcaca/study/5 5. Greyscale dithering] * 5.1. Introducing gamma * 5.2. Gamma correction * 5.3. Greyscale sub-block error diffusion * [wiki:libcaca/study/6 6. Colour dithering] * 6.1. Separate-space dithering * 6.2. Accounting for other dimensions * 6.3. Reducing visual artifacts * 6.4. Colour sub-block error diffusion * [wiki:libcaca/study/7 7. Photographic mosaics] * 7.1. Image classification * 7.2. Error diffusion * 7.3. Colour ASCII art * [wiki:libcaca/study/bib Bibliography]