Final Project for Digital Image Class
Language: Python3
Operating System(s): Debian Buster (linux bash shell on Windows), & Ubuntu 20.04 LTS (and maybe MX Linux 19.1)
Editors: Emacs, Vim, & Nano
Due May 12th 11 AM
Objective: develop a DCT-based image compression system.
The system will have the following modules:
Encoder:
- 8*8 DCT transform of the image (to be implemented by yourself);
- Uniform quantization;
- Zig-zag scan (use a table) and run-level coding;
- Size + amplitude representation of the non-zero coefficients;
- Use Huffman coder (to be provided by MATLAB) to encode run-size sequence; Do binary representation of the amplitude.
- Calculate the bit rate of the compressed image.
Decoder:
- Inverse quantization;
- Inverse run-level coding and zig-zag scan.
- Inverse DCT;
- Compute the PSNR of the reconstructed image;
Use this (Linux) command to encode the image:
python3 encode_image.py <image from images/ directory>
And you can decode it back. This will also gives you PSNR result of two images as well.:
python3 decode_image.py
Images used in this project came from Unsplash, Creative Commons, Wikicommons, and Reddit.
directories with "640" tag contain images of 640x640 size.
images/
├── 640-jpeg
│ ├── butterfly.jpeg
│ ├── empress.jpeg
│ ├── lithograph.jpeg
│ ├── purpleFlower.jpeg
│ └── sunflower.jpeg
├── 640-png
│ ├── giant.png
│ ├── lithograph.png
│ ├── robinWilliams.png
│ ├── rose.png
│ └── woman.png
├── analog_1.jpg
├── analog_2.jpg
├── analog_3.jpg
├── fanart_1.jpeg
├── fanart_2.jpeg
├── fanart_3.jpeg
├── jpeg
│ ├── comic.jpeg
│ ├── dog_cat.jpeg
│ ├── robot.jpeg
│ ├── twoDogsAndWoman.jpeg
│ └── twoWomen.jpeg
└── png
├── couchCat.png
├── holo.png
├── owlHat.png
├── SansUndertale.png
└── scifi_cover.png