Here, we symbolically represent the image using a 2×3 matrix with 6 pixels.
First, we reshape the matrix or flatten it into a vector.
When calculating the first principal component (PC) value of this image, we use arrows pointing to a single component to represent the weighted sum, just like before.
In the same way, we obtain the second and third PC values for this image.
Now we are ready to reconstruct the image using the PC values.
Previously, our reconstruction method, as shown in the bottom-right corner, used PCs as weights and performed a weighted sum of the PC weights.
Essentially, this is about calculating the reconstructed pixel value in the image using a weighted sum of the PC values.
Using the same method, we can calculate the pixel values of the reconstructed image.
In this way, we obtain the output of the model, which is the reconstructed image.