JPEG image compression

You can compress color (RGB) images using this function. it relies on the well-known JPEG algorithm.
305 Downloads
Updated 7 Jan 2023

View License

JPEG Algorithm:
0. Loading and initializing the raw image
  1. Convert RGB image to YIQ or YCbCr image
  2. Down-sampling the image
  3. Forward Discrete Cosine Transform (DCT)
  4. Quantization
  5. Huffman Encoding: Compressed data
  6. Decoding
  7. De-quantization
  8. Inverse Discrete Cosine Transform (IDCT)
  9. Up-sampling
  10. Convert YIQ to RGB image: Compressed image

Cite As

Soroush Mirmobini (2026). JPEG image compression (https://ch.mathworks.com/matlabcentral/fileexchange/122932-jpeg-image-compression), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2022b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
1.0.0