代写assignment | CG代写 | Computer Graphics – CMPUT 206 INTRO TO DIGITAL IMAG PROCESS

CMPUT 206 INTRO TO DIGITAL IMAG

代写assignment | CG代写 | Computer Graphics – 该题目是值得借鉴的图片处理, CG 方面的assignment代写的题目

ass代做 assignment代写 代写assignment

/ assignment 5: JPEG encoding and decoding

CMPUT 206 LEC B1 – Winter 2023 – INTRO TO DIGITAL IMAGE PROCESS

Assignment 5: JPEG encoding and decoding

Note that we reserve the right to ask for a viva based on your solutions. In such a case, you would need to convince the TA that you submitted your own work or at least understand it to some degree.

**In this assignment, ** you will implement a simplified version of the JPEG encoder and decoder. You can read about JPEG compression here and here.

Part I (60%) : JPEG encoding
Part II (40%) : JPEG decoding

Introduction:

The JPEG compression pipeline reduces the amount of data required to represent an image while minimizing the loss of perceptual quality. The major steps in the JPEG compression pipeline are as follows:

  1. **Image segmentation: ** The input grayscale image is divided into 8×8 blocks of pixels.
  2. **Discrete Cosine Transform (DCT): ** For each block, a 2D Discrete Cosine Transform (DCT) is applied, which converts the pixel values in the block into a set of frequency coefficients that represent the spatial frequency components of the image within that block.
  3. **Quantization: ** The frequency coefficients are then quantized, which means they are divided by a quantization matrix. This process reduces the coefficients’ precision and introduces some information loss. The quantization step is where most of the compression occurs.
  4. **Encoding: ** The quantized coefficients are then encoded using a lossless compression algorithm, such as Huffman encoding (beyond the scope of the syllabus). This step further reduces the amount of data required to represent the image.
  5. **Decoding: ** To reconstruct the image, the encoded data is decoded, and the quantized coefficients are multiplied by the original quantization matrix to obtain the approximate original frequency coefficients.
  6. **Inverse DCT: ** Finally, an inverse 2D DCT is applied to each block to obtain the reconstructed grayscale image.

You are provided with one source file called A5_submission.py . You need to complete the functions and parts indicated in the source file. These have been marked with "TODO". You can add any other functions or other code you want to use but they must all be in the same file. You need to submit **only ** the completed A5_submission.py.

NOTE: The notebook includes a Zig-zag section at the very beginning (which should NOT be altered) that contains two functions for zig-zag and inverse zig-zag scanning of an image.

Part 1 (60%): JPEG encoding

In this part, you will implement a JPEG encoder. Download this image as your input. You need to complete all the TODOs in this section. A5_submission.py has explanations of what you need to write.

The JPEG encoder section has three major steps:

  1. Creating a 2D discrete cosine transform (DCT) function called dct2D
  2. Quantization: Process of removing the high-frequency data. You can read more about quantization here. NOTE: Refer to this PDF and use Fig. 10 (c) (Page 12) as your quantization matrix
  3. Degree of compression

Expected outputs:

Part 2 (40%): JPEG decoding

In this part, you will implement a JPEG decoder. Download this image as your input. You need to complete all the TODOs in this section. A5_submission.py has explanations of what you need to write. The JPEG decoder section has two major steps:

  1. Creating a 2D discrete cosine transform (DCT) function called idct2D
  2. De-quantization

Expected outputs:

Submission status

Attempt number This is attempt 1 ( 1 attempts allowed ).
Submission status No attempt
Grading status Not graded
Time remaining 11 days 8 hours
Help
Email
Last modified -
Submission

comments Comments (0)

Add submission
You have not made a submission yet.