Question: Exercise 1: DCT Based Compression In this exercise, we will perform DCT based compression. For this aim, we will first calculate the DCT coefficients of

 Exercise 1: DCT Based Compression In this exercise, we will perform

Exercise 1: DCT Based Compression In this exercise, we will perform DCT based compression. For this aim, we will first calculate the DCT coefficients of an image and remove the high frequency components. Input Image Output DCT Zigzag Mask Inverse Zigzag IDCT Image Figure 1: Block diagram of the given exercise. 1) Load the Lena image file by using imread function. 2) Carry out the Forward DCT on the subblocks of image with size 8 x 8. You may use dct2.m and blockproc.m as in the following code. B = 8; fun = @(block_struct) dct2 (block_struct.data); dct_transform = blockproc (img_org, [B, B], fun); 3) You can use ZigzagMtx2Vector.m that is provided to you to perform zigzag scanning 4) Try to remove higher frequency components by using a mask matrix consisting of l's at the lower frequencies and 0's in the higher frequencies. 5) Use Vector2ZigzagMtx.m for iZigzag. 6) Perform inverse DCT to obtain the output image. 7) Display the input and the output images in a single figure. 8) Perform this experiment by removing %15, %45 and %85 of the DCT coefficients. Exercise 1: DCT Based Compression In this exercise, we will perform DCT based compression. For this aim, we will first calculate the DCT coefficients of an image and remove the high frequency components. Input Image Output DCT Zigzag Mask Inverse Zigzag IDCT Image Figure 1: Block diagram of the given exercise. 1) Load the Lena image file by using imread function. 2) Carry out the Forward DCT on the subblocks of image with size 8 x 8. You may use dct2.m and blockproc.m as in the following code. B = 8; fun = @(block_struct) dct2 (block_struct.data); dct_transform = blockproc (img_org, [B, B], fun); 3) You can use ZigzagMtx2Vector.m that is provided to you to perform zigzag scanning 4) Try to remove higher frequency components by using a mask matrix consisting of l's at the lower frequencies and 0's in the higher frequencies. 5) Use Vector2ZigzagMtx.m for iZigzag. 6) Perform inverse DCT to obtain the output image. 7) Display the input and the output images in a single figure. 8) Perform this experiment by removing %15, %45 and %85 of the DCT coefficients

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!