# High Dimensional Spaces for Images

Can anyone explain why pictures are not considered 2D, but rather high dimensional? Especially with regards to CV and AI.

But from a machine learning perspective, we can think of a picture as a point in a high-dimensional space. In particular, suppose we have a greyscale picture that is $m\times n$ pixels, i.e., $m$ pixels wide and $n$ pixels high. Then there are a total of $mn$ pixels in the image. Each pixel has a greyscale intensity, which we can think of as a real number in the interval $[0,1]$. Therefore, we can think of the picture as being a collection of $mn$ real numbers. In other words, the picture can be treated as a $mn$-dimensional vector -- as an element of $\mathbb{R}^{mn}$. Thus, any particular picture can be thought of as an element of a high-dimensional space.
(A color image can be thought of as an element of $\mathbb{R}^{3mn}$: for each pixel, we have three numbers, corresponding to the intensity in the red, green, and blue channels.)