Implementing the JPEG file compression scheme Here's a rough outline of all the process required
- Convert color space from RGB to Y, Cb, Cr
- Subsample the Cb and Cr space
- Split image into smaller blocks
- Fourier Transform, more precisely Discrete Cosine Transform
- Mute higher frequency patterns
- Zig Zag scan on resultant matrix
- Run Length Encoding
- Huffmann Encoding
- Calculate Compression Ratio
Size of sub-image affects transform coding performance. Compression ability and computational complexity increases as sub-image size increases making it a double-edged sword. Most popular sub-image sizes are 8x8 and 16x16
-
Add a logger, to store intermediate results with timestamps, to trace execution flow.
-
Wrap this into a package
-
Containerize using Docker
-
Deploy on AWS (EC2 as a virtual server, store computational files on a S3 bucket)
-
Create API endpoint