SlideShare a Scribd company logo
1 of 22
Multi Media 3
Images and Color
In the name of God
Mohammad Savargiv
2
Images and Color
Multimedia Systems (Module 1 Lesson 2)
Summary:
• Basic concepts
underlying Images
• Popular Image File
formats
• Human perception of
color
• Various Color Models in
use and the idea behind
them
Sources:
• My Research Notes
• Dr. Ze-Nian Li’s course
material at:
http://www.cs.sfu.ca/CourseCentral/365/li/
• Follow this link for a
great read on color:
http://www.adobe.com/support/techguides/color/c
olortheory/
3
Graphics: Terminology
• Pixels -- picture elements in digital images
• Image Resolution -- number of pixels in a digital image
(Higher resolution always yields better quality.)
– width x height (e.g., 640X480)
– Most common Aspect ratio: 3:4 (lines:columns)
– Dots (pixels) per inch, dpi or ppi (e.g., 72 dpi)
• Bit-Map -- a representation for the graphic/image data in
the same manner as they are stored in video memory.
• Bits/pixel – also contributes to the quality of the image
4
Monochrome vs. Grayscale
Monochrome:
r Each pixel is stored as a
single bit (0 or 1)
r A 640 x 480 monochrome
image requires 37.5 KB of
storage.
Grayscale:
• Each pixel is usually stored
as a byte (value between 0
to 255)
• A 640 x 480 grayscale image
requires over 300 KB of
storage.
6
Color Images (24 vs. 8 bit)
24-bit:
r Each pixel is represented
by three bytes (e.g., RGB)
r Supports 256 x 256 x 256
possible combined colors
(16,777,216)
r A 640 x 480 24-bit color
image would require 921.6
KB of storage
r Many 24-bit color images
are stored as 32-bit
images, the extra byte of
data for each pixel is used
to store an alpha value
representing special effect
information
8-bit:
• One byte for each pixel
• Supports 256 out of the
millions colors possible,
acceptable color quality
• Requires Color Look-Up
Tables (LUTs) -- Pallete
• A 640 x 480 8-bit color
image requires 307.2 KB of
storage (the same as 8-bit
grayscale)
7
24-bit color
(60KB jpeg)
8-bit color
(30KB gif)
8
System Independent Formats
GIF(GIF87a,GIF89a):
• Graphics Interchange
Format (GIF) devised by the
UNISYS Corp. and
Compuserve, initially for
transmitting graphical
images over phone lines via
modems.
• Uses the Lempel-Ziv Welch
algorithm (compression).
• Supports only 8-bit (256)
color images.
• Supports interlacing
• GIF89a supports simple
animation
JPEG:
• A standard for photographic
image compression created
by the Joint Photographics
Experts Group
• Takes advantage of
limitations in the human
vision system to achieve
high rates of compression
• Lossy compression which
allows user to set the
desired level of
quality/compression
9
…Contd
TIFF:
• Tagged Image File Format
(TIFF), stores many different
types of images (e.g.,
monochrome, grayscale, 8-bit &
24-bit RGB, etc.)
• Developed by the Aldus Corp. in
the 1980's and later supported
by Microsoft
• TIFF is a lossless format (when
not utilizing the new JPEG tag
which allows for JPEG
compression)
• It does not provide any major
advantages over JPEG and is
not as user-controllable it
appears to be declining in
popularity
Graphics Animation Files:
• FLC -- main animation or
moving picture file format,
originally created by Animation
Pro
• FLI -- similar to FLC
• GL -- better quality moving
pictures, usually large file sizes
Postscript/ PDF:
• A typesetting language which
includes text as well as
vector/structured graphics and
bit-mapped images
• Used in several popular
graphics programs
• Does not provide compression,
files are often large
10
System Dependent Formats
Windows(BMP):
• A system standard graphics file
format for Microsoft Windows
• It is capable of storing 24-bit
bitmap images
• Used in PC Paintbrush and
other programs
Macintosh(PAINT, PICT):
• PAINT was originally used in
MacPaint program, initially only
for 1-bit monochrome images.
• PICT format is used in
MacDraw (a vector based
drawing program) for storing
structured graphics
X-windows(XBM):
• Primary graphics format for the
X Window system
• Supports 24-bit color bitmap
• Many public domain graphic
editors, e.g., xv
• Used in X Windows for storing
icons, etc.
11
PNG: The Future
• The Portable Network Graphics (PNG) format was designed to replace
the older and simpler GIF format and, to some extent, the much more
complex TIFF format.
• Advantages over GIF:
– Alpha channels (variable transparency)
Also known as a mask channel, it is simply a way to associate
variable transparency with an image.
– Gamma correction (cross-platform control of image brightness)
– Two-dimensional interlacing (a method of progressive display)
GIF uses 1-D interlacing. (see the difference in the example at
http://data.uta.edu/~ramesh/multimedia/examples/interlacing.html )
– Better Compression (5-25% better)
• Features:
– Supports three main image types: truecolor, grayscale and palette-
based (``8-bit''). JPEG only supports the first two; GIF only the third.
• Shortcomings:
– No Animation
12
Color in Images and Video
Basics of Color
• Light and Spectra
– Visible light is an electromagnetic wave in the 400 nm - 700
nm range.
m Most light we see is not one wavelength, it's a
combination of many wavelengths.
13
Basics of Color (…Contd)
• The Human Retina
– The eye functions on the same principle as a camera
– Each neuron is either a rod or a cone.
– The rods contain the elements that are sensitive to light intensities. Rods
are not sensitive to color.
– Cones come in 3 types: red, green and blue. Each responds differently to
various frequencies of light. The following figure shows the spectral-
response functions of the cones and the luminous-efficiency function of the
human eye
14
Cones and Color
• The cones provide humans with vision during the daylight and
are believed to be separated into three types, where each type
is more sensitive to a particular wavelength
• The color signal to the brain comes from the response of the 3
cones to the spectra being observed. That is, the signal consists
of 3 numbers:
where E is the light and S is the sensitivity function
15
Color Composition
• A color can be specified as the sum of three colors. So colors
form a 3 dimensional vector space.
• The following figure shows the amounts of three primaries
needed to match all the wavelengths of the visible spectrum.
16
Color Models for Images
RGB Additive Model
• CRT displays have three phosphors
(RGB) which produce a combination
of wavelengths when excited with
electrons
• A color image is a 2-D array of
(R,G,B) integer triplets. These triplets
encode how much the corresponding
phosphor should be excited in devices
such as a monitor.
CMY Subtractive Model
• Cyan, Magenta, and Yellow
(CMY) are complementary
colors of RGB.
• CMY model is mostly used in
printing devices where the
color pigments on the paper
absorb certain colors (e.g., no
red light is reflected from cyan
ink).
Blue
Blue
Cyan
Cyan
Red
Red
Yellow
Yellow
Green
Green
Magenta
Magenta
Black(0,0,0) White(0,0,0)
White(1,1,1)
Black(1,1,1)
17
Color Models for Video
YUV Model
• Human perception is more sensitive to
luminance (brightness) than chrominance
(color). Therefore, instead of separating
colors, one can separate the brightness
info. from the color info.
• Y is luminance
– Y = 0.299R + 0.587G + 0.114B
• Chrominance is defined as the difference
between a color and a reference white at
the same luminance. It can be represented
by U and V -- the color differences.
– U = B - Y
– V = R - Y
• Eye is most sensitive to Y. Therefore, any
error in the resolution of the luminance (Y)
is more important than the chrominance
(U,V) values.
• In PAL, 5 (or 5.5) MHz is allocated to Y, 1.3
MHz to U and V.
YIQ Model
• Although U and V nicely define the
color differences, they do not align
with the desired human perceptual
color sensitivities. Hence, I and Q
are used instead.
– I = 0.74(R - Y) - 0.27(B - Y) =
0.596R - 0.275G - 0.321B
– Q = 0.48(R - Y) + 0.41(B - Y) =
0.212R - 0.523G + 0.311B
• YIQ is used in NTSC color TV
broadcasting, it is downward
compatible with TV where only Y is
used.
• Eye is most sensitive to Y, next to I,
next to Q. In NTSC broadcast TV,
4.2 MHz is allocated to Y, 1.5 MHz
to I, 0.55 MHz to Q.
18
Color Models for Video (…Contd)
YCbCr Color Model
• The YCbCr model is closely related to the YUV, it is a scaled and
shifted YUV.
– Cb = ((B - Y)/ 2) + 0.5
– Cr = ((R - Y) / 1.6) + 0.5
• The chrominance values in YCbCr are always in the range of 0
to 1.
• YCbCr is used in JPEG and MPEG.
19
Summary: Color
• Color images are encoded as triplets of values.
• RGB is an additive color model that is used for light-emitting
devices, e.g., CRT displays. CMY is a subtractive model that is used
often for printers
• Sometimes, an alternative CMYK model (K stands for Black) is used
in color printing (e.g., to produce darker black than simply mixing
CMY).
K := min (C, M, Y); C := C – K; M := M – K; Y := Y - K.
• Two common color models in imaging are RGB and CMY, two
common color models in video are YUV and YIQ.
• YUV uses properties of the human eye to prioritize information. Y is
the black and white (luminance) image, U and V are the color
difference (chrominance) images. YIQ uses similar idea.
20
Types of Video Signals
• Component video -- each primary is sent as a separate video
signal.
– The primaries can either be RGB or a luminance-chrominance
transformation of them (e.g., YIQ, YUV).
– Best color reproduction
– Requires more bandwidth and good synchronization of the three
components
• Composite video -- color (chrominance) and luminance signals
are mixed into a single carrier wave.
– Some interference between the two signals is inevitable.
• S-Video (Separated video, e.g., in S-VHS) -- a compromise
between component analog video and the composite video. It
uses two lines, one for luminance and another for composite
chrominance signal.
21
Analog Video
Analog video is represented as a continuous (time varying) signal; Digital
video is represented as a sequence of digital images
NTSC Video
m 525 scan lines per frame, 30 fps
(33.37 msec/frame).
m Interlaced, each frame is divided
into 2 fields, 262.5 lines/field
m 20 lines reserved for control
information at the beginning of
each field
m So a maximum of 485 lines of
visible data
• Laserdisc and S-VHS have actual
resolution of ~420 lines
• Ordinary TV -- ~320 lines
• Each line takes 63.5 microseconds
to scan.
m Color representation:
• Uses YIQ color model.
PAL (SECAM) Video
m 625 scan lines per frame, 25
frames per second (40
msec/frame)
m Interlaced, each frame is divided
into 2 fields, 312.5 lines/field
m Color representation:
m Uses YUV color model
22
Frame Rate and Interlacing
• Persistence of vision: The human eye retains an image for a
fraction of a second after it views the image. This property is
essential to all visual display technologies.
– The basic idea is quite simple, single still frames are presented at
a high enough rate so that persistence of vision integrates these
still frames into motion.
• Motion pictures originally set the frame rate at 16 frames per
second. This was rapidly found to be unacceptable and the
frame rate was increased to 24 frames per second. In Europe,
this was changed to 25 frames per second, as the European
power line frequency is 50 Hz.
• When NTSC television standards were introduced, the frame
rate was set at 30 Hz (1/2 the 60 Hz line frequency). Movies
filmed at 24 frames per second are simply converted to 30
frames per second on television broadcasting.
23
Frame Rate and Interlacing
• For some reason, the brighter the still image presented to the
viewer, the shorter the persistence of vision. So, bright pictures
require more frequent repetition.
• If the space between pictures is longer than the period of
persistence of vision -- then the image flickers. Large bright
theater projectors avoid this problem by placing rotating
shutters in front of the image in order to increase the repetition
rate by a factor of 2 (to 48) or three (to 72) without changing
the actual images.
– Unfortunately, there is no easy way to "put a shutter" in front of a
television broadcast! Therefore, to arrange for two "flashes" per
frame, the flashes are created by interlacing.
• With interlacing, the number of "flashes" per frame is two, and
the field rate is double the frame rate. Thus, NTSC systems
have a field rate of 59.94 Hz and PAL/SECAM systems a field
rate of 50 Hz.

More Related Content

Similar to MM3.ppt

Chapter 3- Media Representation and Formats.ppt
Chapter 3- Media Representation and Formats.pptChapter 3- Media Representation and Formats.ppt
Chapter 3- Media Representation and Formats.pptVasanthiMuniasamy2
 
Chapter 3 - Fundamental Concepts in Video and Digital Audio.ppt
Chapter 3 - Fundamental Concepts in Video and Digital Audio.pptChapter 3 - Fundamental Concepts in Video and Digital Audio.ppt
Chapter 3 - Fundamental Concepts in Video and Digital Audio.pptBinyamBekele3
 
To Understand Video
To Understand VideoTo Understand Video
To Understand Videoadil raja
 
Ch2
Ch2Ch2
Ch2teba
 
Graphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesGraphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesDIPIKA83
 
06 cie552 image_manipulation
06 cie552 image_manipulation06 cie552 image_manipulation
06 cie552 image_manipulationElsayed Hemayed
 
الوسائط المتعددة Multimedia تاج
الوسائط المتعددة  Multimedia تاجالوسائط المتعددة  Multimedia تاج
الوسائط المتعددة Multimedia تاجmaaz hamed
 
Introduction to computer graphics
Introduction to computer graphics Introduction to computer graphics
Introduction to computer graphics Priyodarshini Dhar
 
Overview of graphics systems.ppt
Overview of graphics systems.pptOverview of graphics systems.ppt
Overview of graphics systems.pptMalleshBettadapura1
 
Scct2013 topic 3_graphics
Scct2013 topic 3_graphicsScct2013 topic 3_graphics
Scct2013 topic 3_graphicsAnies Syahieda
 
Prinsip gambar digital
Prinsip gambar digitalPrinsip gambar digital
Prinsip gambar digitalOno Trader
 
Introduction to computer graphics and multimedia
Introduction to computer graphics and multimediaIntroduction to computer graphics and multimedia
Introduction to computer graphics and multimediaShweta Shah
 
CS101- Introduction to Computing- Lecture 33
CS101- Introduction to Computing- Lecture 33CS101- Introduction to Computing- Lecture 33
CS101- Introduction to Computing- Lecture 33Bilal Ahmed
 
Dip unit-i-ppt academic year(2016-17)
Dip unit-i-ppt academic year(2016-17)Dip unit-i-ppt academic year(2016-17)
Dip unit-i-ppt academic year(2016-17)RagavanK6
 
Graphical Programming
Graphical ProgrammingGraphical Programming
Graphical ProgrammingGaditek
 
Chapter 3 : IMAGE
Chapter 3 : IMAGEChapter 3 : IMAGE
Chapter 3 : IMAGEazira96
 

Similar to MM3.ppt (20)

Chapter 3- Media Representation and Formats.ppt
Chapter 3- Media Representation and Formats.pptChapter 3- Media Representation and Formats.ppt
Chapter 3- Media Representation and Formats.ppt
 
Chapter 3 - Fundamental Concepts in Video and Digital Audio.ppt
Chapter 3 - Fundamental Concepts in Video and Digital Audio.pptChapter 3 - Fundamental Concepts in Video and Digital Audio.ppt
Chapter 3 - Fundamental Concepts in Video and Digital Audio.ppt
 
To Understand Video
To Understand VideoTo Understand Video
To Understand Video
 
CLASS 1.1.pptx
CLASS 1.1.pptxCLASS 1.1.pptx
CLASS 1.1.pptx
 
Ch2
Ch2Ch2
Ch2
 
Graphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesGraphics Primitives and CG Display Devices
Graphics Primitives and CG Display Devices
 
ch1ip.ppt
ch1ip.pptch1ip.ppt
ch1ip.ppt
 
06 cie552 image_manipulation
06 cie552 image_manipulation06 cie552 image_manipulation
06 cie552 image_manipulation
 
الوسائط المتعددة Multimedia تاج
الوسائط المتعددة  Multimedia تاجالوسائط المتعددة  Multimedia تاج
الوسائط المتعددة Multimedia تاج
 
COM2304: Color and Color Models
COM2304: Color and Color ModelsCOM2304: Color and Color Models
COM2304: Color and Color Models
 
Introduction to computer graphics
Introduction to computer graphics Introduction to computer graphics
Introduction to computer graphics
 
Overview of graphics systems.ppt
Overview of graphics systems.pptOverview of graphics systems.ppt
Overview of graphics systems.ppt
 
VIDEO CODECS
VIDEO CODECSVIDEO CODECS
VIDEO CODECS
 
Scct2013 topic 3_graphics
Scct2013 topic 3_graphicsScct2013 topic 3_graphics
Scct2013 topic 3_graphics
 
Prinsip gambar digital
Prinsip gambar digitalPrinsip gambar digital
Prinsip gambar digital
 
Introduction to computer graphics and multimedia
Introduction to computer graphics and multimediaIntroduction to computer graphics and multimedia
Introduction to computer graphics and multimedia
 
CS101- Introduction to Computing- Lecture 33
CS101- Introduction to Computing- Lecture 33CS101- Introduction to Computing- Lecture 33
CS101- Introduction to Computing- Lecture 33
 
Dip unit-i-ppt academic year(2016-17)
Dip unit-i-ppt academic year(2016-17)Dip unit-i-ppt academic year(2016-17)
Dip unit-i-ppt academic year(2016-17)
 
Graphical Programming
Graphical ProgrammingGraphical Programming
Graphical Programming
 
Chapter 3 : IMAGE
Chapter 3 : IMAGEChapter 3 : IMAGE
Chapter 3 : IMAGE
 

Recently uploaded

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 

MM3.ppt

  • 1. Multi Media 3 Images and Color In the name of God Mohammad Savargiv
  • 2. 2 Images and Color Multimedia Systems (Module 1 Lesson 2) Summary: • Basic concepts underlying Images • Popular Image File formats • Human perception of color • Various Color Models in use and the idea behind them Sources: • My Research Notes • Dr. Ze-Nian Li’s course material at: http://www.cs.sfu.ca/CourseCentral/365/li/ • Follow this link for a great read on color: http://www.adobe.com/support/techguides/color/c olortheory/
  • 3. 3 Graphics: Terminology • Pixels -- picture elements in digital images • Image Resolution -- number of pixels in a digital image (Higher resolution always yields better quality.) – width x height (e.g., 640X480) – Most common Aspect ratio: 3:4 (lines:columns) – Dots (pixels) per inch, dpi or ppi (e.g., 72 dpi) • Bit-Map -- a representation for the graphic/image data in the same manner as they are stored in video memory. • Bits/pixel – also contributes to the quality of the image
  • 4. 4 Monochrome vs. Grayscale Monochrome: r Each pixel is stored as a single bit (0 or 1) r A 640 x 480 monochrome image requires 37.5 KB of storage. Grayscale: • Each pixel is usually stored as a byte (value between 0 to 255) • A 640 x 480 grayscale image requires over 300 KB of storage.
  • 5. 6 Color Images (24 vs. 8 bit) 24-bit: r Each pixel is represented by three bytes (e.g., RGB) r Supports 256 x 256 x 256 possible combined colors (16,777,216) r A 640 x 480 24-bit color image would require 921.6 KB of storage r Many 24-bit color images are stored as 32-bit images, the extra byte of data for each pixel is used to store an alpha value representing special effect information 8-bit: • One byte for each pixel • Supports 256 out of the millions colors possible, acceptable color quality • Requires Color Look-Up Tables (LUTs) -- Pallete • A 640 x 480 8-bit color image requires 307.2 KB of storage (the same as 8-bit grayscale)
  • 7. 8 System Independent Formats GIF(GIF87a,GIF89a): • Graphics Interchange Format (GIF) devised by the UNISYS Corp. and Compuserve, initially for transmitting graphical images over phone lines via modems. • Uses the Lempel-Ziv Welch algorithm (compression). • Supports only 8-bit (256) color images. • Supports interlacing • GIF89a supports simple animation JPEG: • A standard for photographic image compression created by the Joint Photographics Experts Group • Takes advantage of limitations in the human vision system to achieve high rates of compression • Lossy compression which allows user to set the desired level of quality/compression
  • 8. 9 …Contd TIFF: • Tagged Image File Format (TIFF), stores many different types of images (e.g., monochrome, grayscale, 8-bit & 24-bit RGB, etc.) • Developed by the Aldus Corp. in the 1980's and later supported by Microsoft • TIFF is a lossless format (when not utilizing the new JPEG tag which allows for JPEG compression) • It does not provide any major advantages over JPEG and is not as user-controllable it appears to be declining in popularity Graphics Animation Files: • FLC -- main animation or moving picture file format, originally created by Animation Pro • FLI -- similar to FLC • GL -- better quality moving pictures, usually large file sizes Postscript/ PDF: • A typesetting language which includes text as well as vector/structured graphics and bit-mapped images • Used in several popular graphics programs • Does not provide compression, files are often large
  • 9. 10 System Dependent Formats Windows(BMP): • A system standard graphics file format for Microsoft Windows • It is capable of storing 24-bit bitmap images • Used in PC Paintbrush and other programs Macintosh(PAINT, PICT): • PAINT was originally used in MacPaint program, initially only for 1-bit monochrome images. • PICT format is used in MacDraw (a vector based drawing program) for storing structured graphics X-windows(XBM): • Primary graphics format for the X Window system • Supports 24-bit color bitmap • Many public domain graphic editors, e.g., xv • Used in X Windows for storing icons, etc.
  • 10. 11 PNG: The Future • The Portable Network Graphics (PNG) format was designed to replace the older and simpler GIF format and, to some extent, the much more complex TIFF format. • Advantages over GIF: – Alpha channels (variable transparency) Also known as a mask channel, it is simply a way to associate variable transparency with an image. – Gamma correction (cross-platform control of image brightness) – Two-dimensional interlacing (a method of progressive display) GIF uses 1-D interlacing. (see the difference in the example at http://data.uta.edu/~ramesh/multimedia/examples/interlacing.html ) – Better Compression (5-25% better) • Features: – Supports three main image types: truecolor, grayscale and palette- based (``8-bit''). JPEG only supports the first two; GIF only the third. • Shortcomings: – No Animation
  • 11. 12 Color in Images and Video Basics of Color • Light and Spectra – Visible light is an electromagnetic wave in the 400 nm - 700 nm range. m Most light we see is not one wavelength, it's a combination of many wavelengths.
  • 12. 13 Basics of Color (…Contd) • The Human Retina – The eye functions on the same principle as a camera – Each neuron is either a rod or a cone. – The rods contain the elements that are sensitive to light intensities. Rods are not sensitive to color. – Cones come in 3 types: red, green and blue. Each responds differently to various frequencies of light. The following figure shows the spectral- response functions of the cones and the luminous-efficiency function of the human eye
  • 13. 14 Cones and Color • The cones provide humans with vision during the daylight and are believed to be separated into three types, where each type is more sensitive to a particular wavelength • The color signal to the brain comes from the response of the 3 cones to the spectra being observed. That is, the signal consists of 3 numbers: where E is the light and S is the sensitivity function
  • 14. 15 Color Composition • A color can be specified as the sum of three colors. So colors form a 3 dimensional vector space. • The following figure shows the amounts of three primaries needed to match all the wavelengths of the visible spectrum.
  • 15. 16 Color Models for Images RGB Additive Model • CRT displays have three phosphors (RGB) which produce a combination of wavelengths when excited with electrons • A color image is a 2-D array of (R,G,B) integer triplets. These triplets encode how much the corresponding phosphor should be excited in devices such as a monitor. CMY Subtractive Model • Cyan, Magenta, and Yellow (CMY) are complementary colors of RGB. • CMY model is mostly used in printing devices where the color pigments on the paper absorb certain colors (e.g., no red light is reflected from cyan ink). Blue Blue Cyan Cyan Red Red Yellow Yellow Green Green Magenta Magenta Black(0,0,0) White(0,0,0) White(1,1,1) Black(1,1,1)
  • 16. 17 Color Models for Video YUV Model • Human perception is more sensitive to luminance (brightness) than chrominance (color). Therefore, instead of separating colors, one can separate the brightness info. from the color info. • Y is luminance – Y = 0.299R + 0.587G + 0.114B • Chrominance is defined as the difference between a color and a reference white at the same luminance. It can be represented by U and V -- the color differences. – U = B - Y – V = R - Y • Eye is most sensitive to Y. Therefore, any error in the resolution of the luminance (Y) is more important than the chrominance (U,V) values. • In PAL, 5 (or 5.5) MHz is allocated to Y, 1.3 MHz to U and V. YIQ Model • Although U and V nicely define the color differences, they do not align with the desired human perceptual color sensitivities. Hence, I and Q are used instead. – I = 0.74(R - Y) - 0.27(B - Y) = 0.596R - 0.275G - 0.321B – Q = 0.48(R - Y) + 0.41(B - Y) = 0.212R - 0.523G + 0.311B • YIQ is used in NTSC color TV broadcasting, it is downward compatible with TV where only Y is used. • Eye is most sensitive to Y, next to I, next to Q. In NTSC broadcast TV, 4.2 MHz is allocated to Y, 1.5 MHz to I, 0.55 MHz to Q.
  • 17. 18 Color Models for Video (…Contd) YCbCr Color Model • The YCbCr model is closely related to the YUV, it is a scaled and shifted YUV. – Cb = ((B - Y)/ 2) + 0.5 – Cr = ((R - Y) / 1.6) + 0.5 • The chrominance values in YCbCr are always in the range of 0 to 1. • YCbCr is used in JPEG and MPEG.
  • 18. 19 Summary: Color • Color images are encoded as triplets of values. • RGB is an additive color model that is used for light-emitting devices, e.g., CRT displays. CMY is a subtractive model that is used often for printers • Sometimes, an alternative CMYK model (K stands for Black) is used in color printing (e.g., to produce darker black than simply mixing CMY). K := min (C, M, Y); C := C – K; M := M – K; Y := Y - K. • Two common color models in imaging are RGB and CMY, two common color models in video are YUV and YIQ. • YUV uses properties of the human eye to prioritize information. Y is the black and white (luminance) image, U and V are the color difference (chrominance) images. YIQ uses similar idea.
  • 19. 20 Types of Video Signals • Component video -- each primary is sent as a separate video signal. – The primaries can either be RGB or a luminance-chrominance transformation of them (e.g., YIQ, YUV). – Best color reproduction – Requires more bandwidth and good synchronization of the three components • Composite video -- color (chrominance) and luminance signals are mixed into a single carrier wave. – Some interference between the two signals is inevitable. • S-Video (Separated video, e.g., in S-VHS) -- a compromise between component analog video and the composite video. It uses two lines, one for luminance and another for composite chrominance signal.
  • 20. 21 Analog Video Analog video is represented as a continuous (time varying) signal; Digital video is represented as a sequence of digital images NTSC Video m 525 scan lines per frame, 30 fps (33.37 msec/frame). m Interlaced, each frame is divided into 2 fields, 262.5 lines/field m 20 lines reserved for control information at the beginning of each field m So a maximum of 485 lines of visible data • Laserdisc and S-VHS have actual resolution of ~420 lines • Ordinary TV -- ~320 lines • Each line takes 63.5 microseconds to scan. m Color representation: • Uses YIQ color model. PAL (SECAM) Video m 625 scan lines per frame, 25 frames per second (40 msec/frame) m Interlaced, each frame is divided into 2 fields, 312.5 lines/field m Color representation: m Uses YUV color model
  • 21. 22 Frame Rate and Interlacing • Persistence of vision: The human eye retains an image for a fraction of a second after it views the image. This property is essential to all visual display technologies. – The basic idea is quite simple, single still frames are presented at a high enough rate so that persistence of vision integrates these still frames into motion. • Motion pictures originally set the frame rate at 16 frames per second. This was rapidly found to be unacceptable and the frame rate was increased to 24 frames per second. In Europe, this was changed to 25 frames per second, as the European power line frequency is 50 Hz. • When NTSC television standards were introduced, the frame rate was set at 30 Hz (1/2 the 60 Hz line frequency). Movies filmed at 24 frames per second are simply converted to 30 frames per second on television broadcasting.
  • 22. 23 Frame Rate and Interlacing • For some reason, the brighter the still image presented to the viewer, the shorter the persistence of vision. So, bright pictures require more frequent repetition. • If the space between pictures is longer than the period of persistence of vision -- then the image flickers. Large bright theater projectors avoid this problem by placing rotating shutters in front of the image in order to increase the repetition rate by a factor of 2 (to 48) or three (to 72) without changing the actual images. – Unfortunately, there is no easy way to "put a shutter" in front of a television broadcast! Therefore, to arrange for two "flashes" per frame, the flashes are created by interlacing. • With interlacing, the number of "flashes" per frame is two, and the field rate is double the frame rate. Thus, NTSC systems have a field rate of 59.94 Hz and PAL/SECAM systems a field rate of 50 Hz.