###### Activity3.3.3

We will explore the influence that the Fourier coefficients have on the vector $$\xvec\text{.}$$

FOURIER-COEFFS

1. Describe the effect on the vector $$\xvec$$ when you vary $$F_0\text{.}$$

2. Now observe the effect on $$\xvec$$ when $$F_3$$ and $$F_7$$ are varied. Compare the effect of $$F_0\text{,}$$ $$F_3\text{,}$$ and $$F_7\text{.}$$

3. If the vector $$\xvec$$ shows only small variations, what would you expect to be true of the Fourier coefficients $$F_j\text{?}$$

4. The Sage cell below will construct the vector $$C_{\bcal}\text{,}$$ which is denoted C, and its inverse $$C_{\bcal}^{-1}\text{,}$$ which is denoted Cinv. Evaluate this Sage cell and notice that it prints the matrix $$C_{\bcal}^{-1}\text{.}$$

Now look at the form of $$C_{\bcal}^{-1}$$ and explain why $$F_0$$ is the average of the luminance values in the vector $$\xvec\text{.}$$

5. The Sage cell below defines the vector $$\xvec\text{,}$$ which is the vector of luminance values in the first column, as seen in FigureĀ 3.3.6. Use the cell below to find the vector $$\fvec$$ of Fourier coefficients $$F_0,F_1,\ldots,F_7\text{.}$$ If you have evaluated the cell above, you will still be able to refer to C and Cinv in this cell.

Write the Fourier coefficients and discuss the relative sizes of the coefficients.

6. We see that the coefficients $$F_6$$ and $$F_7\text{,}$$ which correspond to rapid variations in the luminance values, are quite small. Let's see what happens when we ignore them. Form a new vector of Fourier coefficients by rounding the coefficients to the nearest integer and setting $$F_6$$ and $$F_7$$ to zero. This is an approximation to $$\fvec\text{,}$$ the vector of Fourier coefficients. Use the approximation to $$\fvec$$ to form an approximation of the vector $$\xvec\text{.}$$

How much does your approximation differ from the actual vector $$\xvec\text{?}$$

7. When we ignore the Fourier coefficients corresponding to rapidly varying basis elements, we see that the vector $$\xvec$$ that we reconstruct is very close to the original one. In fact, the luminance values in the approximation differ by at most one or two from the actual luminance values. Our eyes are not sensitive enough to detect this difference.

So far, we have concentrated on only one column in our $$8\times8$$ block of luminance values. Let's now consider all of the columns. The following Sage cell defines a matrix called luminance, which is the $$8\times8$$ matrix of luminance values. Find the $$8\times8$$ matrix $$F$$ whose columns are the Fourier coefficients of the columns of luminance values.

8. Notice that the first row of this matrix consists of the Fourier coefficient $$F_0$$ for each of the columns. Just as we saw before, the entries in this row do not change significantly as we move across the row. In the Sage cell below, write these entries in the vector $$\yvec$$ and find the corresponding Fourier coefficients.

in-context