Image Compression With DCT On Fpga: Dianfan Pan 31080151 Instructor: Mustafa Torun
Image Compression With DCT On Fpga: Dianfan Pan 31080151 Instructor: Mustafa Torun
DCT
on FPGA
Dianfan Pan
31080151
Instructor: Mustafa Torun
What is DCT?
The DCT, is often used in signal and
image processing, especially for lossy
data compression, because it has a
strong "energy compaction" property.
Most of the signal information tends to
be concentrated in a few low-
frequency components of the DCT.
DCT
8 low high
8 low DC AC AC AC AC AC AC AC
AC AC AC AC AC AC AC AC
AC AC AC AC AC AC AC AC
AC AC AC AC AC AC AC AC
AC AC AC AC AC AC AC AC
AC AC AC AC AC AC AC AC
AC AC AC AC AC AC AC AC
high AC AC AC AC AC AC AC AC
f(x,y)
or
f(x,y,t) Symbol
Mapper Quantizer
coder Compressed data
for storage
Encoder and transmission
Symbol Inverse
decoder mapper
Decoder
1-D DCT
2-D DCT
1D-DCT
A B BT CT C
1D-DCT Transpose 1D-DCT Transpose
Image Image
S to P to after S to P to after
Imag P S 1DCT P S 2DCT
e
RAM 1DCT RAM 1DCT RAM
After After
Quantize Qtz Zig-Zag Resort
Image r
after RAM RAM RAM
2DCT
Zig-Zag
Quantization
RAM RAM sequenc
matrix
e
Cod
After
e
Resort
RAM
RAM
Huffma
n RAM
Coder
Lengt
h
The original image
shift -128
After DCT
After Quantization
Sequence of coding
Zig-Zag Pattern
[-25 2 0 -3 -1 -7 1 -4 0 -3 1 0 5 0 2 0 0
-1 2 0 -1 0 0 0 -1 -1 0 0 0 0 … 0]
38 zeros
EOB
(End of Block)
[-25 2 0 -3 -1 -7 1 -4 0 -3 1 0 5 0 2 0 0
-1 2 0 -1 0 0 0 -1 -1 EOB]
Huffman
coding
Error
RMSerror = 6.7315
Reference
[1] Chen Pu-yue, “Fast 2-D DCT Algorithm and Its
Implementation Based On FPGA”, Nanjing University
of PLA of Technology.
[2] Li Li, “FPGA Implementation of 2-D DCT-based
Distributed Arithmetic”, Beijing University of Posts and
Telecommunications.
[3] JPEG, Wikipedia.
[4] DCT, Wikipedia.