Image Transforms: DCT
It is well known that LTI operators may be implemented in the Fourier
transform domain, leading to computational efficiencies. The energy
compaction property of transforms such as the discrete Fourier transform
(DFT), discrete cosine transform (DCT) or discrete wavelet transform (DWT)
plays an important role in many image/video compression techniques. Here
we demonstrate image compression using the DCT transform.
Here we take the block cosine transform of the head image. The blocks are
non-overlapping, of dimensions 8x8.
![[Graphics:Images/Jankowski_ImageProcessing_gr_64.gif]](Images/In36_gr_1.gif)
Here we show a fragment of the head image and the DCT coefficients.
![[Graphics:Images/Jankowski_ImageProcessing_gr_65.gif]](Images/Jankowski_ImageProcessing_gr_65.gif)
![[Graphics:Images/Jankowski_ImageProcessing_gr_66.gif]](Images/Jankowski_ImageProcessing_gr_66.gif)
We now retain cosine coefficients located in a low-frequency zone of each
block. We then use the inverse DCT to calculate an approximation to the
original image. Here is a typical zonal mask.
![[Graphics:Images/Jankowski_ImageProcessing_gr_67.gif]](Images/In38_gr_1.gif)
![[Graphics:Images/Jankowski_ImageProcessing_gr_68.gif]](Images/Jankowski_ImageProcessing_gr_68.gif)
![[Graphics:Images/Jankowski_ImageProcessing_gr_69.gif]](Images/Jankowski_ImageProcessing_gr_69.gif)
![[Graphics:Images/Jankowski_ImageProcessing_gr_70.gif]](Images/Jankowski_ImageProcessing_gr_70.gif)
![[Graphics:Images/Jankowski_ImageProcessing_gr_71.gif]](Images/Jankowski_ImageProcessing_gr_71.gif)
The compression capabilities of the DCT are clearly
visible. Using only 23% of the image's total energy, the
reconstructed image is a reasonable approximation of the original. The
error signal is on the farthest right. The approximation is guaranteed to improve as the number of
coefficients is increased.
Further reading
User's Guide: Sections 8.4, 8.7.
Function Index: BlockProcessing, DiscreteCosineTransform, InverseDiscreteCosineTransform, RawImageData.
|