bim10203 chapter 5: analog & digital...

31
BIM10203 Chapter 5: Analog & Digital Video

Upload: phungque

Post on 12-Jul-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

BIM10203

Chapter 5: Analog & Digital

Video

Page 2: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Motivation

Our greatest weakness lies in giving up.

The most certain way to succeed is

always to try just one more time.Thomas A. Edison

Page 3: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Analog & Digital Video

Unit objectives

• Explain the basic principles of video

• Introduce to analog and digital video

• Explain transformation from analog to digital video

• List video file standard/format

Page 4: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Basic Principles

Basic Principles

• Video-how it works?

– Sequence of frames…filmstrips

• Types of video signal

Video signal can be organized in 3 different ways:

- Component video, composite video, s-video

• Color models

– YUV, YIQ, YCbCr

Page 5: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Types of Video Signal• Component Video

– Higher-end video systems make use of three separate video signals for the red, green and blue image plane.

– Has 3 wires and connecters connecting devices to monitor.

– Not restricted to RGB, but most use it.

– Pro: Best color reproduction, as there is no ‘crosstalk’

– Cons: Require more bandwidth & good synchronization between signals

– Examples:

Page 6: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Types of Video Signal

• Composite Video– Color (chrominance) and

intensity (luminance) signals are mixed into a single carrier wave.

– Only use 1 wire, thus 1 connector at each end of cable; so video color signals are mixed, not sent separately. How about audio?

– Pro: use 1 wire only

– Con: Inference of signals is inevitable

– Example:

Page 7: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Types of Video Signal• S-Video

– Use 2 wires: 1 for chrominance and 1 for luminance signals

– Black & white information is crucial for visual perception-human are able to differentiate spatial resolution in grayscale image much better than for the color part of color images.

– Pro: Less crosstalk between the color information and the crucial gray-scale information

– Cons: Interference of signals is inevitable

– Example:

Page 8: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Color modelsVideo color transform- methods of

producing color derive largely from

older analog methods of coding color

for TV. Luminance is combined with

color information in a single signal

using a particular matrix transform

(YUV,YIQ or YCbrCr)

• YUV Color model– YUV coding was used for PAL

analog video

– Codes a luminance signal equal to Y’, chrominance (color differences to U,V)

– Color TV can be displayed on a black&white tv by using Y’ signal.

Page 9: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Color models

• YIQ Color model– Used in NTSC color TV

broadcasting

– Best correspond to actual human perceptual color sensitivities.

– Y’ is still the same in YUV, while I Q representing chrominance.

• YCbCr Color model– Used for component digital video.

– YCbCr transform is used in JPEG image compression and is closely related to YUV transform

– Y’is same, Cb Cr for chrominance.

Page 10: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

For high definition television, this is how it

works out:

RGB is the color model

Rec. 709 is the color space

Y’CbCr is the luma and chroma encoding system

The numbers in Y’CbCr tells you the kind of luma and chroma sampling used

4:2:0 and 4:2:2 both have equal luma values, but dissimilar chroma values

3:1:1 and 4:2:2 have dissimilar luma and chroma values

YUV colorspace is a bit unusual. The Y component determines the brightness of the color (referred to as luminance or luma), while the U and V components determine the color itself (the chroma). Y ranges from 0 to 1 (or 0 to 255 in digital formats), while 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). Some standards further limit the ranges so the out-of-bounds values indicate special information like synchronization.

Page 11: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Analog Video

• Analog Video– An analog signal is one

having a continuous set of values

– It samples a time-varying image

– An analog picture can be enlarged to any size without loss of quality of the images

– Examples: VCR, laser discs

Page 12: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Analog Video (cont.)

The above diagram shows an analog video signal. A Video is drawn from

left to right, top to bottom. Each scan is a single horizontal pass across

the screen. This is followed by a Horizontal Blanking Interval, where the

electron gun moves to the beginning of the next scan line. After every

scan line has been drawn, a Vertical Blanking Interval allows the electron

gun to move from the lower-right corner of the screen back to the upper-

left, and the process begins again.

Page 13: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Digital Video

• Digital Video– An digital signal is one having a set of discrete values

– Digital picture made up of pixel. If pixels are enlarged, total image will be less sharp.

– Pro: Storing video in digital device, direct access, ease of encryption, better tolerance to channel noise.

– Examples: Computer, HD TV

Page 14: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

From Analog to Digital• How to do it?

– Digitizing- converting the video signal to digital formation.

– From analog source -> Process (converting) -> digital output

– Most analog source is VCR.

– The better analog source produce better digital output

– Digitizing also depends on the speed of the processor

– The more memory the system has, the easier it is to capture and digitize video.

– Hardware needed: Hard drive, Video Capture board, CPU

Page 15: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

From Analog to Digital

Page 16: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

From Analog to Digital

What happens in digitizing phase?• Sampling

– Nyquist’s Law: states that to sample an analog signal in a

manner which permits you to reconstruct the original signal, you

must sample it at or above twice the maximum frequency of the

analog signal.

• Quantization

– In a digital world, you must specify a finite precision (generally in

bits) to represent a value. In order to convert an analog signal to

a digital one, the intensity values must be rounded to a quantum.

This is why a digitized signal loses most of its quality compared

to original, analog signal.

*Scaling- The analog video is shrinks to the target resolution.

Page 17: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

From Analog to Digital

Digitizing will take an analog signal (the black line above)

and convert into digital representation (the blue bars).

Each of these blue bars represents the intensity of the

signal at a point in time.

Page 18: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

List of video standard

Analog Video Standard Formats

• Each video format is clocked by half the frequency of the

AC power line (60Hz in US and 50Hz in Europe)

• NTSC (National Television Systems Committee) has

525 lines of resolution with a 30Hz frequency rate. It

is the most widely used standard.

• SECAM (Sequential Couleur Avec Memoire) is a

frequency-modulated signal that has 625 lines of

resolution and a 25Hz refresh rate. It is used in

France and Eastern Europe.

• PAL (Phase Alternating Line) is similar to SECAM

and is used in parts of Western Europe.

Page 19: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

List of video standard

Digital Video Formats

• Earlier days, digital was in form of composite,

then uses component.

• Chroma Subsampling (JPEG, MPEG)

• CIF (common intermediate format)-

compromise between NTSC and PAL

• HDTV- concept of wide screen with ratio

16:9 thus increase the visual field,

especially its width. Use progressive

scanning-scanning traces through a

complete picture row-wise for each time

interval.

*Interlace?-the odd number lines traces first,

then the even lines. Odd and even fields

make up one frame.

Page 20: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

List of video format

Digital Video File Formats

• Some of the formats:

• .avi

• .mpeg

• .mov

• .dat

Page 21: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Because human vision is wider than tall, television is rectangular, its

width is larger than its height.

The ratio of width to height is called the aspect ratio. For standard TV,

the aspect ratio is 4:3, giving a resolution of 700x525.

HDTV has 1000 scan lines and an aspect ratio of 16:9, giving a

resolution of 1778x1000.

Aspect ratio

Page 22: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

In calculating a video file, all of the above

factors must be taken into consideration.

For example, how much storage space

would a quarter screen color (24-bit)

video at 320 x 320, playing at 15 fps for

30 seconds with CD quality sound

(44.1kHz, 16-bit sampling) take up?

Video File Size

Page 23: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

1. Calculate the number of pixel (pixels amount)

2. With 24-bit color per pixel (bytes/pixel)

3. Playing at 15 fps (frame speed)

4. For 30 seconds (duration)

5. With CD quality sound (audio size)

6. Total storage (video + audio)

As equation:

(x amt * y bytes * z fps* t)/8+(a rate * b bytes * c channel * t)/8

Video File Size

Page 24: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Real Video Berhad. is going to develop a documentary for a short presentation in Geneva. The documentary will use 32 bit color at 320 x 320 resolutions, playing at 16 frame per second (fps) for 1 minute with CD audio quality (44.1 kHz, 16-bit sampling).

(a) Calculate:

- Pixel amount

- Audio size

- Video size

- Total storage file size (Audio + Video)

(b) Based on the total storage, calculate the file size if lossless

compression method is used.

Video File Size

Page 25: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Formula

Audio File Size the formula is as follows:

The answer will be in bytes

Where:

sampling rate is in Hz

Duration/time is in seconds

Quantization resolution is in bits (1 for 8 bits, 2 for 16

bits)

number of channels = 1 for mono, 2 for stereo, etc.

Page 26: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Formula

Audio Fle Size = (Rate x Duration x Resolution x

Number of channels) / 8

Video size = (Pixel amount x Durations in second x

bit color x fps)/8

Total storage file size = Video size + Audio File Size

Lossless compression method = Total storage file size

/ Lossless method ratio (Lossless method ratio = 2:1

for CD source)

Page 27: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Lossless compression

A compression technique that decompresses data back to its original form without any loss. The decompressed file and the original are identical. All compression methods used to compress text, databases and other business data are lossless. For example, the ZIP archiving technology (PKZIP, WinZip, etc.) is the most widely used lossless method (see zip file).

Lossless AudioAlthough compression methods used for audio and video are generally "lossy" and discard bits deemed unnecessary, there are lossless methods used to compress digital music files. FLAC, Apple Lossless (ALAC) and WMA Lossless are examples of lossless compression music formats. For example, they compress a music CD to less than its original size, but the resulting file is nowhere near as small as MP3 and AAC. However, no bits (no frequencies) are discarded.

Lossy compression technique that does not decompress digital databack to 100% of the original. Lossy methods can provide highdegrees of compression and result in smaller compressed files, butsome number of the original pixels, sound waves or video framesare removed forever. Examples are the widely used JPEG image,MPEG video and MP3 audio formats.

The greater the compression, the smaller the file. However, a highimage compression loss can be observed in photos printed verylarge, and people with excellent hearing can notice a hugedifference between MP3 music and high-resolution audio files(see audiophile). Typically, the moving frames of video can toleratea greater loss of pixels than still images.

Page 28: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Video File Size

1) Pixel amount = 320 x 320 = 102400 pixels

2) Audio size = (44,100 x 60 x 16 x 2)/8 = 84,672,000/8 = 10,584,000 bytes

3) Video size = (102,400 x 60 x 32 x 16)/8 = 3,145,728,000/8 = 393,216,000

bytes

4) Total storage file size = 393,216,000 + 10,584,000 = 403,800,000 bytes

5) If Lossless compression method is used,

Lossless method ratio = 2:1

So maximum file size = 403,800,000 bytes / 2

= 201,900,000 bytes

= 201.9 MB

Page 29: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

VIDEO CABLES COMPARISON

Page 30: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

Conclusion

Chapter summary

• Learned the basic principles of video

• Introduced to analog and digital video

• Learned transformation from analog to digital video

• Listed video file format

Page 31: BIM10203 Chapter 5: Analog & Digital Videofsktm2.uthm.edu.my/azizulzamri/v3/images/Lecture_Notes/BIM10203... · make up one frame. List of video format Digital Video File Formats

THANK YOU VERY MUCH