



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions for computing the output of a dithering operation using a given matrix and input image, as well as proving that the chromaticity coordinates of a linear combination of three given colors lie within the triangle formed by those colors in chromaticity space. Additionally, it covers encoding and decoding a grayscale image using a defined colormap and computing the empirical quantization snr for each channel.
Typology: Assignments
1 / 5
This page cannot be seen from the preview
Don't miss anything!




1. [3 points]
Compute the output of dithering operation using the dithering matrix D =
and the algorithm described in the
“Keeping the Same Resolution” slide, assuming the following input:
1 2 3 4 0 1 2 3 9 0 1 2 8 9 0 1
Please show the result in a nice graphic form.
Here is what the original image looks like:
Here is the output of the dithering operation (0 means “off” or “black”) if the row/column indices of the image start from 1 (the row/column indices of the dither matrix always start from 1):
1 0 0 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 1 0 0 1 0 0 1 1 1 1 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 0 0 0 0 0 0 1 0 1 1 1 1 1 0 0 1 0 0 1 1 1 1 1 0 1 1 0 1 0 0 1 1 0 1 0 0 1 1 1 0 0 0 0 0 0
Here is what the dithered image looks like: If the row/column indices of the image start from 0, this is the result:
Here is what the dithered image looks like in this case:
2. [3 points] Prove that the chromaticity coordinates of any linear combination (with positive coefficients) of three given colors lie in the triangle in chromaticity space which has the chromaticity coordinates of the three colors as vertices. (Hint: remember that, given N points, any linear combinations of such points with positive coefficients such that
combination of those colors, where the coefficients α i are positive. The chromaticity coordinate of the combination are
x y x x y z
y x y z
x y x y x
i i^ i^ i j j^ j^ j^ j
α α
1
3
1
3
x y
x y ix y x x y i i i i i i j j
i i^ i^ i j j
=
β
β
β β
1
3
1
3 1
3
1
3
3. [1 point] Suppose we encode a sequence of 18 frames using MPEG. Each frame in the sequence is encoded as I, B or P according to the following order: I B B P B I I P P B B P P B I I P I Derive the correct transmission and decoding order.
Here is what the resulting image looks like:
Here are the variances of the input channels: var (R) =4216; var (G) = 5786; var (B) =
Here is what the image at frame n+1 looks like:. Here is what the image at
frame n looks like:. The central macroblock in the frame n+1 comes from the block in frame n which is located one pixel to the left and one pixel below. Therefore, the displacement vector is d=(1,-1). [Note that I am assuming that the column index x of a pixel grows as we move right, and that the row index y grows as we move down].
The residual error for the central macroblock is e^ =
and its variance
is var(e)=22..