Changes between Version 1 and Version 2 of libcaca/study/6


Ignore:
Timestamp:
12/22/2009 09:22:36 PM (15 years ago)
Author:
Sam Hocevar
Comment:

fix image links

Legend:

Unmodified
Added
Removed
Modified
  • libcaca/study/6

    v1 v2  
    77In some cases it is possible to perform three one-dimensional dithering operations instead of one three-dimensional one. Consider for instance the following palette:
    88
    9 [[Image(source:/web/trunk/static/study/out/pat6-1-1.png,class="inline",alt="8-colour RGB palette")]]
     9[[Image(source:/web/trunk/www/study/out/pat6-1-1.png,class="inline",alt="8-colour RGB palette")]]
    1010
    1111It is made of the eight possible red/green/blue combinations made of 0 and 1 values:
     
    1919Separate-space dithering works by splitting the image into three red, green and blue channels. Each of this channel is treated as a greyscale image that is then dithered to black and white using any dithering method seen previously. The resulting images are then treated again as three red, green and blue channels and recombined into the final image:
    2020
    21 [[Image(source:/web/trunk/static/study/fig6-1-7.png,class="matrix",alt="separate-space dithering")]]
     21[[Image(source:/web/trunk/www/study/fig6-1-7.png,class="matrix",alt="separate-space dithering")]]
    2222
    2323Here 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:
    2424
    25 [[Image(source:/web/trunk/static/study/out/lena6-1-1.png,class="inline",alt="serpentine FS, 8 colours")]]
    26 [[Image(source:/web/trunk/static/study/out/grad6-1-1.png,class="inline",alt="serpentine FS, 8 colours gradient")]]
    27 [[Image(source:/web/trunk/static/study/out/lena6-1-2.png,class="inline",alt="serpentine FS, 8 colours, gamma-corrected")]]
    28 [[Image(source:/web/trunk/static/study/out/grad6-1-2.png,class="inline",alt="serpentine FS, 8 colours, gamma-corrected gradient")]]
     25[[Image(source:/web/trunk/www/study/out/lena6-1-1.png,class="inline",alt="serpentine FS, 8 colours")]]
     26[[Image(source:/web/trunk/www/study/out/grad6-1-1.png,class="inline",alt="serpentine FS, 8 colours gradient")]]
     27[[Image(source:/web/trunk/www/study/out/lena6-1-2.png,class="inline",alt="serpentine FS, 8 colours, gamma-corrected")]]
     28[[Image(source:/web/trunk/www/study/out/grad6-1-2.png,class="inline",alt="serpentine FS, 8 colours, gamma-corrected gradient")]]
    2929
    3030== 6.2. Accounting for other dimensions ==
     
    3434Here is a palette that cannot be used in the same way:
    3535
    36 [[Image(source:/web/trunk/static/study/out/pat6-2-2.png,class="inline",alt="8-colour RGB palette")]]
     36[[Image(source:/web/trunk/www/study/out/pat6-2-2.png,class="inline",alt="8-colour RGB palette")]]
    3737
    3838As can be seen, it does not have the [0.5 0.5 0.5] grey colour, or the [1 0.5 0] orange colour, for instance, despite having other combinations of 0, 0.5 and 1 values:
     
    4646The following examples show gamma-corrected Floyd-Steinberg using the above 16-colour palette and two different definitions of distance: the '''sum of absolute differences''' and the '''euclidian distance'''. The sum of absolute differences performs pretty poorly because it does not penalise wide disparities:
    4747
    48 [[Image(source:/web/trunk/static/study/out/lena6-2-1.png,class="inline",alt="Floyd-Steinberg, sum of absolute differences")]]
    49 [[Image(source:/web/trunk/static/study/out/grad6-2-1.png,class="inline",alt="Floyd-Steinberg, sum of absolute differences gradient")]]
    50 [[Image(source:/web/trunk/static/study/out/lena6-2-2.png,class="inline",alt="Floyd-Steinberg, euclidian distance")]]
    51 [[Image(source:/web/trunk/static/study/out/grad6-2-2.png,class="inline",alt="Floyd-Steinberg, euclidian distance gradient")]]
     48[[Image(source:/web/trunk/www/study/out/lena6-2-1.png,class="inline",alt="Floyd-Steinberg, sum of absolute differences")]]
     49[[Image(source:/web/trunk/www/study/out/grad6-2-1.png,class="inline",alt="Floyd-Steinberg, sum of absolute differences gradient")]]
     50[[Image(source:/web/trunk/www/study/out/lena6-2-2.png,class="inline",alt="Floyd-Steinberg, euclidian distance")]]
     51[[Image(source:/web/trunk/www/study/out/grad6-2-2.png,class="inline",alt="Floyd-Steinberg, euclidian distance gradient")]]
    5252
    5353Distances can be computed in another space. For instance, the '''HSV space''' allows to give colour variations a smaller influence than brightness variations simply by changing the HSV cone’s height. On the left is spatial Floyd-Steinberg using the euclidian distance in an HSV cone of height 1 and base radius 1. On the right is the same distance within a cone of height 3 and base radius 1:
    5454
    55 [[Image(source:/web/trunk/static/study/out/lena6-2-3.png,class="inline",alt="Floyd-Steinberg, 1×1 HSV cone")]]
    56 [[Image(source:/web/trunk/static/study/out/grad6-2-3.png,class="inline",alt="Floyd-Steinberg, 1×1 HSV cone gradient")]]
    57 [[Image(source:/web/trunk/static/study/out/lena6-2-4.png,class="inline",alt="Floyd-Steinberg, 3×1 HSV cone")]]
    58 [[Image(source:/web/trunk/static/study/out/grad6-2-4.png,class="inline",alt="Floyd-Steinberg, 3×1 HSV cone gradient")]]
     55[[Image(source:/web/trunk/www/study/out/lena6-2-3.png,class="inline",alt="Floyd-Steinberg, 1×1 HSV cone")]]
     56[[Image(source:/web/trunk/www/study/out/grad6-2-3.png,class="inline",alt="Floyd-Steinberg, 1×1 HSV cone gradient")]]
     57[[Image(source:/web/trunk/www/study/out/lena6-2-4.png,class="inline",alt="Floyd-Steinberg, 3×1 HSV cone")]]
     58[[Image(source:/web/trunk/www/study/out/grad6-2-4.png,class="inline",alt="Floyd-Steinberg, 3×1 HSV cone gradient")]]
    5959
    6060== 6.3. Reducing visual artifacts ==
     
    6969All patterns visually blend to the same shade, but the last one is the most visually appealing:
    7070
    71 [[Image(source:/web/trunk/static/study/out/pat6-2-1.png,class="inline",alt="3 ways to dither the same colour")]]
     71[[Image(source:/web/trunk/www/study/out/pat6-2-1.png,class="inline",alt="3 ways to dither the same colour")]]
    7272
    7373Shaked, Arad, Fitzhugh and Sobel introduce the '''minimum brightness variation criterion''' (MBVC), stating that in order to reduce halftone noise, the halftone set which should be used to render the desired colour should be the one whose brightness variation is minimal ![25]. Similarly, Klassen ''et al.'' suggest the selection of low-contrast colour combiation wherever possible ![24].
     
    7979The images below shows the result using our now well-known “lines” tile list, using respectively the 8-colour palette and the 16-colour palette:
    8080
    81 [[Image(source:/web/trunk/static/study/out/lena6-4-1.png,class="inline",alt="8-colour sub-block error diffusion")]]
    82 [[Image(source:/web/trunk/static/study/out/grad6-4-1.png,class="inline",alt="8-colour sub-block error diffusion gradient")]]
    83 [[Image(source:/web/trunk/static/study/out/lena6-4-2.png,class="inline",alt="16-colour sub-block error diffusion")]]
    84 [[Image(source:/web/trunk/static/study/out/grad6-4-2.png,class="inline",alt="16-colour sub-block error diffusion gradient")]]
     81[[Image(source:/web/trunk/www/study/out/lena6-4-1.png,class="inline",alt="8-colour sub-block error diffusion")]]
     82[[Image(source:/web/trunk/www/study/out/grad6-4-1.png,class="inline",alt="8-colour sub-block error diffusion gradient")]]
     83[[Image(source:/web/trunk/www/study/out/lena6-4-2.png,class="inline",alt="16-colour sub-block error diffusion")]]
     84[[Image(source:/web/trunk/www/study/out/grad6-4-2.png,class="inline",alt="16-colour sub-block error diffusion gradient")]]
    8585
    8686Speed is starting to become a problematic issue. A 16-colour palette can generate 65,536 unique 2×2 blocks. Exhaustive search to determine the best tile is no longer realistic, and we need to find better ways to find the best matching block.