Video Theory
Video Theory
1
What is Television?
What is Video?
3
Digital
The analog wave is sampled at some interval, and then turned into
numbers that are stored in the digital device
Light and sound are recorded not as an identical copy of the original
stimulus, but as discrete on-and-off pulses, zeros and ones, binary
digits.
5
Basic Image Formation
The individual pictures that make up video are “frames.”
6
Basic Image Formation
The individual pictures that make up video are “frames.”
The frames are comprised of millions of electrically excitable “pixels”
(picture elements)
7
LED (Light-Emitting Diode)
Basic Image Formation
The individual pictures that make up video are “frames.”
The frames are comprised of millions of electrically excitable “pixels”
(picture elements)
For color, each pixel is comprised of three parts (red, blue, green)
8
Basic Image Formation
The individual pictures that make up video are “frames.”
The frames are comprised of millions of electrically excitable “pixels” (picture
elements)
For color, each pixel is comprised of three dots (red, blue, green)
Individual images are drawn by scanning along these pixels from left to right, top
to bottom
9
Basic Image Formation
Scanning
http://youtu.be/zVS6QewZsi4
Basic Image Formation
Interlaced Scanning - Two fields comprise a frame.
11
Basic Image Formation
Interlaced Scanning
12
Misaligned fields
Basic Image Formation
Progressive Scanning (Computers and Most Digital Video)
Refresh Rate: Frames scanned per second.
13
Basic Image Formation
Progressive v Interlaced Scanning
14
Basic Image Formation
Progressive v Interlaced Scanning
15
Basic Image Formation
Standard Television
16
Basic Image Formation
18
Basic Image Formation
720p 1080p 19
Basic Image Formation
20
Basic Image Formation
21
Introduction to Digital Video
• Video is a stream of data composed of discrete frames,
containing both audio and pictures
• Continuous motion produced at a frame rate of 15 fps or
higher
• Traditional movies run at 24 fps
• TV standard in USA (NTSC) uses ≈ 30 fps
With digital video, four factors have to be kept in mind.
# Frame rate
# Colour Resolution
# Spatial Resolution
# Image Quality
22
Frame Rate
The standard for displaying any type of non-film video is 30 frames per second
(film is 24 frames per second). Additionally these frames are split in half (odd
lines and even lines), to form what are called fields.
When a television set displays its analogue video signal, it displays the odd
lines (the odd field) first. Then is displays the even lines (the even field).
Each pair forms a frame and there are 60 of these fields displayed every second
(or 30 frames per second). This is referred to as interlaced video.
Fragment of the "matrix" sequence (2 After processing the fragment on the left by the FRC filter
frames) the frame rate increased 4 times
Colour Resolution
This second factor is a bit more complex. Colour resolution refers
to the number of colours displayed on the screen at one time.
Computers deal with colour in an RGB (red-green-blue) format,
while video uses a variety of formats. One of the most common
video formats is called YUV.
The National Television Standards Committee ( NTSC) standard used in North America
and Japanese Television uses a 768 by 484 display.
The Phase Alternative system (PAL) standard for European television is slightly larger
at 768 by 576.
Fig. 1 Fig. 2
Image quality
The final objective is video that looks acceptable for your application.
For some this may be 1/4 screen, 15 frames per second (fps), at 8 bits
per pixel.
Other require a full screen (768 by 484), full frame rate video, at 24
bits per pixel (16.7 million colours).
Video Input Formats
AVI MPEG
ActiveMovie QuickTime
Cinepak RealVideo
Indeo Video for Windows
motion-JPEG XGA
27
Gamma Correction
• Gamma correction provides displaying an image accurately on a computer screen.
• Images which are not properly corrected can look either bleached out, or too dark.
• Trying to reproduce colors accurately also requires some knowledge of gamma.
• Varying the amount of gamma correction changes not only the brightness, but also
the ratios of red to green to blue.
Sample Input
Monitor
Output 28
YUV is a colour space typically used as part of a colour image pipeline. The
Y component determines the brightness of the colour, the U and V
components determines the actual colour itself. Y ranges from 0 to 1 (or 0
to 255 in digital formats), and U and V range from -0.5 to 0.5 (or -128 to
127 in signed digital form, or 0 to 255 in unsigned form).
YUV
YIQ
YCbCr
30
YUV
31
YUV
32
YUV
33
YUV
34
YUV
CIL:
35
YIQ
36
YIQ
37
Y component
I component
Q component
38
YCbCr
Y is the Luma component and Cb and Cr are the blue difference and red
difference Chroma component.
Used for digital video encoding digital camera.
YCbCr is used in JPEG and MPEG.
39
YCbCr
40
Color Space – Comparison
Color Color Primary Used for Pros and
space mixing parameters cons
RGB Additive Red, Easy but wasting
Green, Blue bandwidth
CMYK Subtractive Cyan, Magenta, Printer Works in pigment
Yellow, Black mixing
YCbCr additive Y(luminance), Video encoding, Bandwidth efficient
YPbPr Cb(blue chroma), digital camera
Cr(red chroma)
YUV additive Y(luminance), Video encoding Bandwidth efficient
U(blue chroma), for PAL
V(red chroma)
42
Component Video
Make use of three separate signals for red green and blue
image plane.(Component Video)
This kind of system has three wires (Connectors) for
connecting camera or other devices.
Color signal not restricted to always RGB
We can form three signal via a luminance-chrominance
transformation (YIQ or YUV)
There are no crosstalk between three different channels.
43
Component Video
44
Composite Video
Color(chrominance) and intensity(Luminance) signal are
mixed into single carrier wave.
Chrominance is a composite of two color component(I and Q
or U and V).
In NTSC TV, I and Q combine into composite chrome signal.
When connecting to TV or VCR, composite video uses one wire
and video color signals are mixed, not sent separately.
45
S- Video
S-Video uses two wires: One for luminance and other for and other for
composite chrominance.
There is less crosstalk.
46
Digital Video Standards
Parameter Value
48
PAL
PAL stands for Phase Alternate Lines
49
Perplexing
NTSC System
123 …
123 …
480 480
1 2 3 … 640 1 2 3 … 720
Analog to digital CCIR 601 standard
Pixels are square Pixels are not square
50
CCIR 601 Sampling
Y samples
CB and CR samples
51
Introduction to Video Compression
A video consist of time-ordered sequence of frames(Images).
An obvious solution to video compression would be predictive coding based on
previous frame.
Exploit spatial redundancy within frames (like JPEG: transforming, quantizing,
variable length coding)
Exploit temporal redundancy between frames
52
Compression in the time domain
difference between consecutive frames is often small
remove inter-frame redundancy
sophisticated encoding, relatively fast decoding
53
Difference Frames
54
Motion Estimation
55
Motion Estimation
56
Motion Compensation
Divide each frame into macroblocks of 16 16 pixels
Predict where the corresponding macroblock in next frame
Try all possible displacements within a limited range
Choose the best match
Construct difference frame by subtracting each macroblock from its
predicted counterpart
Keep the motion vectors describing the predicted displacement of
macroblocks between frames
57
Picture Type
I (intra) pictures
Code without reference to other pictures
Low compression rate
P (predicted) pictures
Code using motion compensated prediction from a past I or P picture
Higher compression rate than I picture
B (bidirectional-predicted) pictures
Code bidirectional interpolation between the I or P picture which
preceded & followed them
Highest compression rate
B B B B B B B B
01 02 03 04 05 06 11 12 13 14 15 16 21
I P I P I
B B B B B B B B
01 04 02 03 11 05 06 14 12 13 21 15 16