Академический Документы
Профессиональный Документы
Культура Документы
It includes
Unlike audio data image data is defined over spatial domain, hence a DCT is applied to
reduce the high frequency contents of the spatial domain. Generally an image contains a
spatial redundancy i.e. similar image data is repeated for successive pixels. Such set of
pixels data is descretized by using DCT.
Basic Idea:
Block Diagram for Jpeg Compression
JPEG works for both color and grayscale images.Int he case of color images, such as YIQ or
YUV the Encode works on each component separately, using the same routines. If the source
image is in a different color format, the encoder performs a color-space conversion to YIQ or
YUV .
2D Each image is divided into 8X8 blocks. DCT is applied to each block image f(i,j), with output
being the DCT coefficients F(u,v) for each block.The choice of a small block size in JPEG is a
compromise reached by the committee:a number larger than 8 would have made accuracy at low
frequencies better, but using 8 makes the DCT computation very fast.It isolates the each block
from its neighbouring context.It makes image choppy(blocky) when the user specifies high
compression ratio.
3.Quantization and Compression: The quantization step in JPEG is aimed at reducing the total
number of bits needed for a compressed image. It consists of simple dividing each entry in the
frequency space block by an integer, than rounding
Compression:
Quantized values are read from the table and redundant 0s are removed.
F(u,v) represents a DCT coefficient, Q(u,v) is a quantization matrix" entry, and ^ F(u,v)
represents the quantized DCT coefficients which JPEG will use in the succeeding entropy coding
RLC on AC coefficients
make to hit a long run of zeros: a zig-zag scan used to turn the 8X8 matrix
into a 64-vector.
5. Entropy coding:
The resultant code after Zig-Zag scan will undergo an Entropy coding. It uses Huffman coding
and supports only 8-bit pixel in the original images.
A video can be viewed as a sequence of images in the temporal dimension. Since the frame rate
of the video is often relatively high (15 frames per second) and the camera parameters (focal
length, position, viewing angle) usually do not change rapidly between frames, the contents of
the consecutive frames are usually similar, unless certain objects in the scene move extremely
fast. In other words the video has temporal redundancy.
Temporal redundancy is often significant and it is exploited, so that not every frame of the video
needs to be code independently as a new image. Instead the difference between the current frame
end other frames in the sequence is coded. if redundancy between them is great enough, the
difference images could consists mainly of small values and low entropy, which is good for
compression.
The simplistic way of deriving the difference image is to subtract one image from the other
(pixel by pixel), such an approach is ineffective in yielding a high compression ratio. Since the
main cause of the difference between frames is cameras and/or object motion, these motion
generators can be compensated by detecting the displacement of corresponding pixels or regions
in these frames and measuring their differences. Video compression algorithms that adopt this
approach are said to be based on motion compensation.
It includes
The current image is referred to as the Target frame A match is sought between the macro block
under consideration in the Target frame and the most similar macro block in previous and/or
future frames[referred as reference frame].In that sense, Target macro block is predicted from the
Reference macro blocks.
The displacement for the reference macro block to the target macro block is called a motion
vector MV. If a reference frame is previous frame to Target frame it is called forward prediction.
If a reference frame is a future frame to Target frame it is called as Back ward prediction. The
difference of the two corresponding macro blocks is the prediction error.
For video compression based on motion compensation, after the first frame, only the motion
vectors and difference macro blocks need to be coded, since they are sufficient for the decoder to
regenerate all macro blocks in subsequent frames.