2-D DCT/IDCT for JPEG Compression
to understand the Algorithm go to matlab help in page dct2 and idct2 to get the mathematical expression
for M = N = 8, we can calculate the most of hard values and save it as LUTs to speed up the execution
now compare our special 8X8 functions with the internal general functions
use this code:
A = int32(100*rand(8,8));
tic;for i = 1 : 1000 IDCT_8X8(DCT_8X8(A));end;toc;
tic;for i = 1 : 1000 idct2(dct2(A));end;toc;
i had built the general functions too, but with low speed
Cite As
Ahmed Samieh (2025). 2-D DCT/IDCT for JPEG Compression (https://www.mathworks.com/matlabcentral/fileexchange/15494-2-d-dct-idct-for-jpeg-compression), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Image Processing Toolbox > Import, Export, and Conversion >
- Signal Processing > Wavelet Toolbox > Denoising and Compression >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | include BSD License |