| 1 | <?php header("Content-Type: text/html; charset=utf-8"); ?> |
|---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
|---|
| 3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd"> |
|---|
| 4 | |
|---|
| 5 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
|---|
| 6 | |
|---|
| 7 | <head> |
|---|
| 8 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|---|
| 9 | <meta name="GENERATOR" content="vim" /> |
|---|
| 10 | <meta name="Author" content="sam@zoy.org (Sam Hocevar)" /> |
|---|
| 11 | <meta name="Description" content="Libcaca study: the science behind colour ASCII art" /> |
|---|
| 12 | <meta name="Keywords" content="libcaca, ASCII, ASCII ART, console, text mode, ncurses, slang, AAlib, dithering, thresholding" /> |
|---|
| 13 | <title>Libcaca study: the science behind colour ASCII art</title> |
|---|
| 14 | <link rel="icon" type="image/x-icon" href="/favicon.ico" /> |
|---|
| 15 | <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> |
|---|
| 16 | <link rel="stylesheet" type="text/css" href="/main.css" /> |
|---|
| 17 | </head> |
|---|
| 18 | |
|---|
| 19 | <body> |
|---|
| 20 | |
|---|
| 21 | <?php include($_SERVER["DOCUMENT_ROOT"]."/header.inc"); ?> |
|---|
| 22 | |
|---|
| 23 | <p> <span style="color: #aa0000; font-weight: bold;">Warning</span>: this |
|---|
| 24 | document is still work in progress. Feel free to send comments but do not |
|---|
| 25 | consider it final material. </p> |
|---|
| 26 | |
|---|
| 27 | <!--<div style="float: left;"> |
|---|
| 28 | <a href=""></a> |
|---|
| 29 | </div>--> |
|---|
| 30 | <div style="float: right;"> |
|---|
| 31 | <a href="part1.html">>>> Colour quantisation</a> |
|---|
| 32 | </div> |
|---|
| 33 | |
|---|
| 34 | <br style="clear: both;" /> |
|---|
| 35 | |
|---|
| 36 | <h2> Libcaca study: the science behind colour ASCII art </h2> |
|---|
| 37 | |
|---|
| 38 | <p> This document is an attempt at extending the leverage of skilled |
|---|
| 39 | resources by uncovering and addressing the challenges the industry faces |
|---|
| 40 | today in the area of colour ASCII art generation. </p> |
|---|
| 41 | |
|---|
| 42 | <p> Seriously, guys. If you think that what libcaca does is easy, you either |
|---|
| 43 | don’t know what you are talking about, or we want you in the team. </p> |
|---|
| 44 | |
|---|
| 45 | <h3> Foreword </h3> |
|---|
| 46 | |
|---|
| 47 | <p> Meet Lena. She will guide us through this document, because the |
|---|
| 48 | seriousness of a scientific document in the area of computer graphics can |
|---|
| 49 | be measured by the number of times Lena appears in it. She truly is the |
|---|
| 50 | <i>Mona Lisa</i> of image processing. [2] </p> |
|---|
| 51 | |
|---|
| 52 | <p style="text-align: center;"> |
|---|
| 53 | <img src="lena256.png" width="256" height="256" |
|---|
| 54 | class="inline" alt="Lena (256×256)" /> |
|---|
| 55 | <img src="gradient256.png" width="64" height="256" |
|---|
| 56 | class="inline" alt="colour gradient (64×256)" /> |
|---|
| 57 | <img src="lena256bw.png" width="256" height="256" |
|---|
| 58 | class="inline" alt="Lena (256×256BW)" /> |
|---|
| 59 | <img src="gradient256bw.png" width="32" height="256" |
|---|
| 60 | class="inline" alt="greyscale gradient (32×256)" /> |
|---|
| 61 | </p> |
|---|
| 62 | |
|---|
| 63 | <p> This document makes a lot of assumptions, such as the fact that input |
|---|
| 64 | images are made of pixels that have either one (grey level) or three (red, |
|---|
| 65 | green and blue) values uniformly spread between 0 and 1 (with regards to |
|---|
| 66 | human contrast perception). Real life is more complicated than that, but |
|---|
| 67 | that is beyond the scope of this document for now. </p> |
|---|
| 68 | |
|---|
| 69 | <h3> Table of contents </h3> |
|---|
| 70 | |
|---|
| 71 | <ul> |
|---|
| 72 | <li> <a href="part1.html">1. Colour quantisation</a> |
|---|
| 73 | <ul> |
|---|
| 74 | <li> 1.1. Black and white thresholding </li> |
|---|
| 75 | <li> 1.2. Greyscale thresholding </li> |
|---|
| 76 | <li> 1.3. Dynamic thresholding </li> |
|---|
| 77 | <li> 1.4. Random dithering </li> |
|---|
| 78 | </ul> |
|---|
| 79 | </li> |
|---|
| 80 | <li> <a href="part2.html">2. Halftoning</a> |
|---|
| 81 | <ul> |
|---|
| 82 | <li> 2.1. Halftoning patterns </li> |
|---|
| 83 | <li> 2.2. Screen artifacts </li> |
|---|
| 84 | <li> 2.3. Ordered dithering </li> |
|---|
| 85 | <li> 2.4. Random ordered dithering </li> |
|---|
| 86 | <li> 2.5. Non-rectangular dither tiles </li> |
|---|
| 87 | <li> 2.6. Supercell dithering </li> |
|---|
| 88 | <li> 2.7. Void and cluster method </li> |
|---|
| 89 | </ul> |
|---|
| 90 | </li> |
|---|
| 91 | <li> <a href="part3.html">3. Error diffusion</a> |
|---|
| 92 | <ul> |
|---|
| 93 | <li> 3.1. Floyd-Steinberg and JaJuNi error diffusion </li> |
|---|
| 94 | <li> 3.2. Floyd-Steinberg derivatives </li> |
|---|
| 95 | <li> 3.3. Changing image parsing direction </li> |
|---|
| 96 | <li> 3.4. Variable coefficients error diffusion </li> |
|---|
| 97 | <li> 3.5. Block error diffusion </li> |
|---|
| 98 | <li> 3.6. Sub-block error diffusion </li> |
|---|
| 99 | <li> 3.7. Direct binary search </li> |
|---|
| 100 | </ul> |
|---|
| 101 | </li> |
|---|
| 102 | <li> <a href="part4.html">4. Model-based dithering</a> |
|---|
| 103 | <ul> |
|---|
| 104 | <li> 4.1. Gaussian human visual system model </li> |
|---|
| 105 | <li> 4.2. Direct binary search </li> |
|---|
| 106 | <li> 4.3 Comparing dithering algorithms </li> |
|---|
| 107 | </ul> |
|---|
| 108 | </li> |
|---|
| 109 | <li> <a href="part5.html">5. Greyscale dithering</a> |
|---|
| 110 | <ul> |
|---|
| 111 | <li> 5.1. Introducing gamma </li> |
|---|
| 112 | <li> 5.2. Gamma correction </li> |
|---|
| 113 | <li> 5.3. Greyscale sub-block error diffusion </li> |
|---|
| 114 | </ul> |
|---|
| 115 | </li> |
|---|
| 116 | <li> <a href="part6.html">6. Colour dithering</a> |
|---|
| 117 | <ul> |
|---|
| 118 | <li> 6.1. Separate-space dithering </li> |
|---|
| 119 | <li> 6.2. Accounting for other dimensions </li> |
|---|
| 120 | <li> 6.3. Reducing visual artifacts </li> |
|---|
| 121 | <li> 6.4. Colour sub-block error diffusion </li> |
|---|
| 122 | </ul> |
|---|
| 123 | </li> |
|---|
| 124 | <li> <a href="part7.html">7. Photographic mosaics</a> |
|---|
| 125 | <ul> |
|---|
| 126 | <li> 7.1. Image classification </li> |
|---|
| 127 | <li> 7.2. Error diffusion </li> |
|---|
| 128 | <li> 7.3. Colour ASCII art </li> |
|---|
| 129 | </ul> |
|---|
| 130 | </li> |
|---|
| 131 | <li> <a href="biblio.html">Bibliography</a> </li> |
|---|
| 132 | <li> <a href="source.html">Source code</a> </li> |
|---|
| 133 | </ul> |
|---|
| 134 | |
|---|
| 135 | <!--<div style="float: left;"> |
|---|
| 136 | <a href=""></a> |
|---|
| 137 | </div>--> |
|---|
| 138 | <div style="float: right;"> |
|---|
| 139 | <a href="part1.html">>>> 1. Colour quantisation</a> |
|---|
| 140 | </div> |
|---|
| 141 | |
|---|
| 142 | <?php $rev = '$Id$'; |
|---|
| 143 | include($_SERVER['DOCUMENT_ROOT'].'/footer.inc'); ?> |
|---|
| 144 | |
|---|
| 145 | </body> |
|---|
| 146 | </html> |
|---|