Question: Please code this in Julia. 3 . ( Compressing a Grayscale Image ) Download the file 'lion.jpg ' , and import it into Julia using
Please code this in Julia. Compressing a Grayscale Image Download the file 'lion.jpg and import it into Julia using 'imgloadlionjpg Convert the image into a grayscale image with 'imgGray.img Then convert the image into a matrix A
a After level shifting the matrix, and applying the DCT to each x block, apply a low pass filter by letting yi j whenever i pm j geq Use the Inverse DCT and then undo the level shifting to construct an approximation matrix barA Compare the compressed image with the original image.
b Construct another approximation matrix overlinebarA by using the singular value decomposition to compute a rank approximation of A Repeat with a rank approximation. Compare both compressed images with the original image.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
