HW3 solution

advertisement
bEE4414 Multimedia Communication System II, Fall 2005, Yao Wang
Homework 3 Solution (Video digitization, format conversion)
___________________________________________________________________________________
1. What are the factors considered when choosing the sampling rate for digitizing a raster video?
First, the sampling rate must be at least twice of the signal bandwidth to avoid the aliasing. Second,
the sampling interval should be such that the line interval is a integer multiple of the sampling
interval. This way, the samples in different lines will align vertically. This means that the sampling
frequency should be multiples of the line frequency. Finally, it is beneficial to have the same data
rate for a digital video converted from NTSC and PAL/SECOM analog video. These considerations
lead to the following selection: fs=858 fl(NTSC)=864 fl (PAL/SECOM) = 13.5 MHz.
2. Why is that we can and want to sample chrominance components at a lower sampling rate than
luminance? What are the differences between the color formats 4:4:4, 4:2:2, 4:1:1, 4:2:0?
We can sample chrominance components at a lower spatial resolution because 1) Chrominance
components have lower bandwidth than luminance signal, and 2) the human eye is less sensitive to
changes in chrominance than that in luminance. With 4:4:4, for every 4 Y pixels in a line, there are
4 Cb pixels and 4 Cr pixels. With 4:2:2, for every 4 Y pixels, there are 2 Cb pixels, 2 Cr pixels.
Horizontal sampling rate is half, but vertical sampling rate is the same. With 4:1:1, for every 4 Y
pixels, there are 1 Cb pixel, 1 Cr pixel. Horizontal sampling rate is a quarter of Y, but vertical
sampling rate is the same. With 4:2:0, for every 4(=2x2) Y pixels in two lines, there are 1 Cb pixel,
and 1 Cr pixel. Both horizontal and vertical sampling rates are half of those for Y.
3. The figure below show two interlaced video frames.
a. Generate the field data associated with each frame.
b. Deinterlace field 1 of frame 2 using field averaging. Write down the deinterlaced field.
c. Now try line averaging. Write down the deinterlaced field.
d. Now try field and line averaging. Write down the deinterlaced field.
e. For this simple example, which method is better?
f. In general, what are the pros and cons of different methods?
100
100
200
100
100
100
100
200
200
100
100
200
100
100
200
100
100
100
100
200
200
100
100
200
100
100
200
100
100
100
Frame 1
Frame 2
The field data are as follows:
100
100
200
100
100
200
100
100
200
field 1 of frame 1
100
200
200
100
200
200
field 2 of frame1
100
100
100
100
100
100
100
100
100
100
100
200
100
100
200
field 1 of frame2
field 2 of frame2
The deinterlaced field 1 of frame 2 by field averaging, line averaging and line and field averaging are as follows,
100
100
100
100
100
100
100
100
100
100
150
200
100
100
100
100
125
150
100
100
100
100
100
100
100
100
100
100
150
200
100
100
100
100
125
150
100
100
100
100
100
100
100
100
100
field averaging
line averaging
field and line averaging
For this problem, line averaging is better because there is a vertical line moving horizontally between
fields. In general, line averaging is between for moving edges. Field averaging is better for stationary
regions. Line and field averaging yields a better result overall, when a picture contains both moving and
stationary regions.
4. The course website provides a sample matlab script that implements different deinterlacing
methods. Go through the code to try to understand the operations involved.
5. Optional: use the sample deinterlacing matlab code on some test sequences and observe
differences of different deinterlacing method.
Download