This project implements a JPEG-like image compression algorithm in C++. It demonstrates the basic principles of JPEG compression, including color space conversion, discrete cosine transform (DCT), quantization, and run-length encoding.
- RGB to YCbCr color space conversion (ITU-R BT.601 standard)
- Image splitting into 8x8 MacroBlocks
- Discrete Cosine Transform (DCT) on MacroBlocks
- Quantization of DCT coefficients
- Zig-zag scanning of quantized coefficients
- Run-length encoding of zig-zag scanned data
- Clone the repository:
git clone https://github.com/yourusername/jpeg-like-compression.git
- Navigate to the project directory:
cd jpeg-like-compression
- Compile the project (assuming you have a C++ compiler and CMake installed):
mkdir build && cd build cmake .. make
- Color Space Conversion: RGB to YCbCr using ITU-R BT.601 standard.
- Block Splitting: Image is split into 8x8 pixel blocks.
- DCT: Each block undergoes Discrete Cosine Transform.
- Quantization: DCT coefficients are quantized to reduce data.
- Zig-zag Scanning: Quantized coefficients are reordered.
- Run-length Encoding: Final step to compress the data.
- Add Decoder
- Rewrite the process in CUDA