The one-dimensional discrete cosine transform is similar to the twodimensional transform, except…
The one-dimensional discrete cosine transform is similar to the twodimensional transform, except that we drop the second variable (j or y) and the second cosine factor. We also drop, from the inverse DCT only, the leading 1/ coefficient. Implement this and its inverse for N = 8 (a spreadsheet will do, although a language supporting matrices might be better) and answer the following:
(a) If the input data are , which DCT coefficients are near 0?
(b) If the data are , how many DCT coefficients must we keep so that after the inverse DCT, the values are all within 1% of their original values? And for 10%? Assume dropped DCT coefficients are replaced with 0s.
(c) Let si, for 1 ≤ i ≤ 8, be the input sequence consisting of a 1 in position i and 0 in position j , j ≠ i. Suppose we apply the DCT to si, zero the last three coefficients, and then apply the inverse DCT. Which i, 1 ≤ i ≤ 8, results in the smallest error in the ith place in the result? And in the largest error?