comp 319 lecture 02 introduction to multimedia comppguting
TRANSCRIPT
COMP 319 Lecture 02
Introduction to Multimedia Computingp g
Fiona Yan LiuDepartment of Computing
The Hong Kong Polytechnic University
Learning Outputs of Lecture 01Learning Outputs of Lecture 01
I d i l i di h l Introduction to multimedia technology What is multimedia History of multimedia technology History of multimedia technology Reference reading: Chapter 1
Introduction to html Introduction to html What is html Html document with web generation Reference reading: Chapter 1
Introduction to COMP319 http://www.comp.polyu.edu.hk/~csyliu/course/comp319/main.html
Lecture 02: Color Model and Human VisionSept. 11, 2014 2
Outline of Lecture 02Outline of Lecture 02
F d t l f i d t t ti Fundamentals of image data representation Standard image
Gray‐level image Gray level image Bitmap and bitplane
Color image Light and human vision Different color models 24‐bit color image and 8‐bit color image 24‐bit color image and 8‐bit color image Histogram and color lookup tables
Some popular image file formatsp p g Reference reading
Chapter 3 & Chapter 4
Lecture 02: Color Model and Human VisionSept. 11, 2014 3
Outline of Lecture 02Outline of Lecture 02
F d t l f i d t t ti Fundamentals of image data representation Standard image
Gray‐level image Gray level image Bitmap and bitplane
Color image Light and human vision Different color models 24‐bit color image and 8‐bit color image 24‐bit color image and 8‐bit color image Histogram and color lookup tables
Some popular image file formatsp p g Reference reading
Chapter 3 & Chapter 4
Lecture 02: Color Model and Human VisionSept. 11, 2014 4
Fundamentals of Image Data Representation
f l Images consist of pixels The smallest discrete component of an image on the screen
Image resolution The number of pixels in a digital image
Standard imagesg Illustrate algorithms and compare the performance Lena: for gray‐level image generallyg y g g y Baboon: for color image generally
Lecture 02: Color Model and Human VisionSept. 11, 2014 5
Standard ImagesStandard Images
Lena: Image Resolution is 256 * 256
Baboon: Image Resolution is 512* 512
Lecture 02: Color Model and Human VisionSept. 11, 2014 6
Outline of Lecture 02Outline of Lecture 02
F d t l f i d t t ti Fundamentals of image data representation Standard image
Graylevel image Gray level image Bitmap and bitplane
Color image Light and human vision Different color models 24‐bit color image and 8‐bit color image 24‐bit color image and 8‐bit color image Histogram and color lookup tables
Some popular image file formatsp p g Reference reading
Chapter 3 & Chapter 4
Lecture 02: Color Model and Human VisionSept. 11, 2014 7
Gray Level ImageGray‐Level Image
Image is represented using luminance information only 8‐bit gray‐level image
Each pixel has a gray value between 0 and 25524-bit color Image Gray Image
Lecture 02: Color Model and Human VisionSept. 11, 2014 8
Binary ImageBinary Image
Each pixel is stored as a single bit 0/1 Each pixel is stored as a single bit 0/1. Also referred as 1‐bit image Use for the pictures containing simple graphics or textp g p g p
Lecture 02: Color Model and Human VisionSept. 11, 2014 9
Bitmap of Gray level ImageBitmap of Gray‐level Image
The two‐dimensional array of pixel values that represent the images/graphicsp g /g p
Lecture 02: Color Model and Human VisionSept. 11, 2014 10
Bitplane of 8 bit imageBitplane of 8‐bit image
Bi l Bitplanes Consider the 8‐bit image as a set of 1‐bit bitplanesE h l i t f 1 bit t ti f th Each plane consists of a 1‐bit representation of the image
Lecture 02: Color Model and Human VisionSept. 11, 2014 11
Outline of Lecture 02Outline of Lecture 02
F d t l f i d t t ti Fundamentals of image data representation Standard image
Gray‐level image Gray level image Bitmap and bitplane
Color image Light and human vision Different color models 24‐bit color image and 8‐bit color image 24‐bit color image and 8‐bit color image Histogram and color lookup tables
Some popular image file formatsp p g Reference reading
Chapter 3 & Chapter 4
Lecture 02: Color Model and Human VisionSept. 11, 2014 12
Light and PrismLight and Prism
h l Light is an electromagnetic wave White light contains all the colors of a rainbow
Sir Isaac Newton's experiment
Lecture 02: Color Model and Human VisionSept. 11, 2014 13
Light and Spectral Power Distribution
Most light sources produce contributions over many wavelengths Most light sources produce contributions over many wavelengths SPD shows the relative amount of light energy
Spectral power distribution of daylight
Lecture 02: Color Model and Human VisionSept. 11, 2014 14
The Color of the LightThe Color of the Light
Th l f th li ht i h t i d b th l th The color of the light is characterized by the wavelength of the light
Short wavelengths produce a blue sensation, long g p , gwavelengths produce a red one
Spectral power distribution of daylight
Lecture 02: Color Model and Human VisionSept. 11, 2014 15
Human VisionHuman Vision
Humans cannot detect all light Visible light is an electromagnetic wave in the range g g g400 nm to 700 nm
Human vision is formedHuman vision is formed Sensor: Eye Most sensitive to red(R) green(G) and blue(B) Most sensitive to red(R), green(G), and blue(B).
Processor: Brain R G B R,G,B
R‐G, G‐B, and B‐R
Lecture 02: Color Model and Human VisionSept. 11, 2014 16
Human RetinaHuman Retina
f f d d Human retina consists of an array of rods and three kinds of cones
Rod Detect gray‐level information
Cones Three kinds of cones are used to detect R,G,B, , The proportions of R,G,B cones are 40:20:1
The eye is most sensitive to light in the middle The eye is most sensitive to light in the middle of the visible spectrum
Lecture 02: Color Model and Human VisionSept. 11, 2014 17
RGB Color ModelRGB Color Model
Th Three primaries Red, green and blue
Additive color model When two light beams impinge on a target, their colors addadd
Lecture 02: Color Model and Human VisionSept. 11, 2014 18
24 bit Color Image of RGB Model24‐bit Color Image of RGB Model24-bit color Image Red Channel
R 8‐bit
G 8 bit 8‐bit
B Blue Channel Green Channel
8bit
Lecture 02: Color Model and Human VisionSept. 11, 2014 19
24 bit Color Image24‐bit Color Image
Each pixel is represented by three bytes, usually RGB. Supports 256*256*256, totally 16.8‐million possible combined color.
Storage: for image resolution of 640*480, needs 921.6KB
Some 24‐bit color images are stored as 32‐bit imageimage Extra byte of data for special‐effect information
Lecture 02: Color Model and Human VisionSept. 11, 2014 20
Color Lookup Tables (CLTs)Color Lookup Tables (CLTs)
U i d d l i t d f 24 bit Use index or code value instead of 24‐bit color information for each pixelC l l k h bl k ll f ll Color lookup the table works well for small combinations
Lecture 02: Color Model and Human VisionSept. 11, 2014 21
Image HistogramImage Histogram
R f t th b bilit f ti f th i Refers to the probability mass function of the image intensities
5
6Original data: 4.2 3.4 0 4.5 4.2 1.7 6 3.8 3
The number of containers is equal to six
2
3
4
1
2
1 2 3 4 5 6 7 80
1
0 1 2 3 4 5 60
4The number of containers is equal to three
3
4
1
2
Lecture 02: Color Model and Human VisionSept. 11, 2014 22
1 2 30
8 bit Color Image8‐bit Color Image
Di id h RGB b i l lid i h Divide the RGB cube into equal slides in each dimension R: 3 bit; G: 3 bit; B: 2 bit; R: 3‐bit; G: 3‐bit; B: 2‐bit; Edge artifacts
24-bit color image 8-bit color image
Lecture 02: Color Model and Human VisionSept. 11, 2014 23
L*a*b* Color ModelL*a*b* Color Model
P l if Perceptual uniform Color differences a human
perceives as equal correspond to Euclidean distances
RGB color model is not perceptual uniformperceptual uniform
L*a*b* color model is perceptual uniform
L* l i L*: luminance a*: red/green balance b*: green/blue balanceg /
Lecture 02: Color Model and Human VisionSept. 11, 2014 24
RGB and CIE L*a*bRGB and CIE L*a*b
Lecture 02: Color Model and Human VisionSept. 11, 2014 25
HSV Color ModelHSV Color Model
A f l f Approximation of perceptual uniform Hue: position in the color spectrum Saturation: the vividness of a color Value: the brightness of the color Value: the brightness of the color
Lecture 02: Color Model and Human VisionSept. 11, 2014 26
YUV Color ModelYUV Color Model
B d i JPEG Be used in JPEG Y: luminance value
Luma Y’: (gamma‐corrected)(g ) U and V: chrominance
The difference between a color and a reference white at the same luminanceluminance
U = B’ – Y’ V = R’ –Y’
Lecture 02: Color Model and Human VisionSept. 11, 2014 27
Gamma CorrectionGamma Correction
’ l h d Human’s response is not linear to the driving voltage of display device
Lecture 02: Color Model and Human VisionSept. 11, 2014 28
YUV Color ModelYUV Color Model
Lecture 02: Color Model and Human VisionSept. 11, 2014 29
YC C color modelYCbCr color model
YC C color model is closely related to the YUV YCbCr color model is closely related to the YUV transformation Be used in MPEG Be used in MPEG
Lecture 02: Color Model and Human VisionSept. 11, 2014 30
YIQ Color ModelYIQ Color Model
YIQ is used in NTSC color TV broadcasting Y’ in YIQ is the same as in YUV I and Q are a rotated version of U and V
U and V are rotated by 330
Lecture 02: Color Model and Human VisionSept. 11, 2014 31
YIQ color modelYIQ color model
I and Q in YIQ model
U and V in YUV d lYUV model
Lecture 02: Color Model and Human VisionSept. 11, 2014 32
Subtractive Color ModelSubtractive Color Model
Addi i l d l Additive color model When two light beams impinge on a target, their colors addS bt ti l d l Subtractive color model For ink deposited on paper, opposite situation holds
RGB color model CMY color model
Lecture 02: Color Model and Human VisionSept. 11, 2014 33
CMY Color Model and CMYK Color Model
CMY color model consist of CMY color model consist of Cyan(C), Magenta(M) and Yellow(Y) Subtractive color primaries
Transformation from RGB to CMY The transformation is invertible
CMYK color model Add one color: real black Using black ink is cheaper and better than using the mixing colored
ink
Lecture 02: Color Model and Human VisionSept. 11, 2014 34
Outline of Lecture 02Outline of Lecture 02
F d t l f i d t t ti Fundamentals of image data representation Standard image
Gray‐level image Gray level image Bitmap and bitplane
Color image Light and human vision Different color models 24‐bit color image and 8‐bit color image 24‐bit color image and 8‐bit color image Histogram and color lookup tables
Some popular image file formatsp p g Reference reading
Chapter 3 & Chapter 4
Lecture 02: Color Model and Human VisionSept. 11, 2014 35
Some Popular Image File FormatsSome Popular Image File Formats
BMP BMP BitMap Mainly use RGB color modely
Gif Graphics Interchange Format
I t t f t b f it hi t i l ti t th WWW Important formats because of its historical connection to the WWW and HTML
PDF Portable Document Format Include compression
JPEG JPEG Joint Photographic Experts Group Currently the most important common file format
Lecture 02: Color Model and Human VisionSept. 11, 2014 36
Announcement of Further Arrangement
Lab Lab Thur. 16:30 – 17:20 PQ604B Tue. 9:30 – 10:20 PQ606
Quiz Quiz The first quiz will be next Thur. Sept. 18 8:30 – 9:00 Cover Lecture 1 ‐ 2
Form of the questions Form of the questions True or False Answer the questions Calculation
Lecture 02: Color Model and Human VisionSept. 11, 2014
Calculation
37