Basis functions in DCT I'm new to Discrete Cosine Transform (DCT) and I have a question relating to basis functions.
In DCT, basis functions are defined by:

$$\alpha_p\alpha_q\cos\frac{\pi
\left(2m+1\right)p}{2M}\cos\frac{\pi
\left(2n+1\right)q}{2N},\quad \begin{align}0&amp;\leq p\leq M-1\\0&amp;\leq q\leq N-1\end{align}$$

If $M = N = 64$, we'll have $64$ basis functions. These functions have two variables including $p$ and $q$. Now, to verify, I take the first basis function with $m = n = 0$. Clearly, this function changes with different values of $p$ and $q$. Why it's drawn with same color in the following image (the upper left gray square)?
Because the upper left square would correspond to values of $p=0$ and $q=0$, and $cos(\alpha) = 1 $ if $\alpha=0$, so you get a constant term, that is why it is all gray.
Basically as you increment $p$ and $q$ you get basis images that oscillate more either in vertical or horizontal directions.