The last two questions for this project involved performing image compression on a color image. To do this, the image had to be separated into the three different colors, red, green, and blue.
From here, the new 8x8 blocks could be found, such that each one was different. These plots can be seen below:
The next part of the problem involved completing the above steps, but the RGB values had luminance and color difference coordinates. This involved carrying out the steps of part 1 for the coordinates separately, and then using JPEG quantization to recombine the color image. The luminance is defined as: \begin{align*} Y=0.299R+0.587G+0.114B \end{align*} While the color difference is defined as: \begin{align*} U=B-Y\\ V=R-Y\\ \end{align*} The code for this new change can be seen here. After this effect was changed, the three loss parameters(p=1,2,4) were again looked at, and the new \(Y_Q\) plots were produced. They can be seen below: -Y_Q images for 1, 2, 4- Once these images were produced, the inverse 2D-DCT was used again, and the image was put back together. The new compressed color image for each case can be seen below.