CS155 Computer Graphics

Lab 1: Color shift

In this lab you'll write the pseudo code for a 4x4 ordered dither and the Floyd-Steinberg algorithms. Complete the lab in a text or word document and upload it to your wiki. Feel free to work with a partner but write up your own solution.
  1. Ordered Dither
    1. For the 2x2, 1 bit ordered dither algorithm, explain why adding a (3-2j)/8 offset to a pixel then using the uniform quantization rule is equivalent to the location-based quantization rule given in class.
    2. Calculate the offset for 2x2, 2 bit ordered dither.
    3. Calculate the offset for 2x2, n bit ordered dither.
    4. Calculate the offset for 4x4, n bit ordered dither.
    5. Write pseudo-code for the 4x4, n bit ordered dither algorithm
  2. Floyd Steinberg: Write pseudo-code for the Floyd Steinberg algorithm. Clearly identify the order the pixels are quantized by explicitly giving the loop indices.


Last updated Sept. 10