Skip to content

dalisyron/DCTCompression

Repository files navigation

DCTCompression

An image compression program written in python. This program uses Discrete Cosine Transform (DCT) and Quantization to reduce the image size. The algorithm is generally able to reduce image sizes by factor of 2-5. The program's GUI is implemented using tkinter. Threading was used to assure the program is responsive even while the image compression computation is performed. Preview

Usage

You need Python 3.6+ to run the program. First make sure you have all the requirements installed:

pip install -r requirements.txt

To run the program program use:

python main.py

You can then use the GUI to select and compress your image: Usage

Implementation

A discrete cosine transform (DCT) expresses a finite sequence of data points in terms of a sum of cosine functions oscillating at different frequencies. This is especially helpful in image compression because the human eye doesn’t sense the high frequency components that well. So we can use quantization to reduce or remove those changes without any noticable changes. image

About

Image compression based on DCT and quantization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages