SlideShare a Scribd company logo
1 of 44
COMPUTER GRAPHICS & IMAGE PROCESSING
COM2304
Color and Color Models
K.A.S.H.Kulathilake
B.Sc. (Hons) IT (SLIIT), MCS (UCSC), M.Phil (UOM), SEDA(UK)
Rajarata University of Sri Lanka
Faculty of Applied Sciences
Department of Physical Sciences
Learning Outcomes
COM2304 - Computer Graphics & Image
Processing
• At the end of this lecture, you should be able
to;
– identify color formation and how color visualize.
– describe primary and secondary colors.
– describe display on CRT and LCD.
– comprehend RGB, CMY, CMYK and HSI color
models.
– discuss the components of the graphic systems.
– discuss computer display standards.
Color Fundamentals
COM2304 - Computer Graphics & Image
Processing
The colors that humans and some other animals
perceive in an object are determined by the nature of
the light reflected from the object.
Color Fundamentals (cont…)
COM2304 - Computer Graphics & Image
Processing
• Visualizing color
Green objects reflect
light with wavelengths
primarily in the 500 to
570 nm range while
absorbing most of the
energy at other
wavelengths
Colours
Absorbed
Color Fundamentals (cont…)
• Primary colors
– Based on the absorption characteristics of the
human eye, colors are seen as variable
combination of RED (R), GREEN (G) and BLUE(B).
– It is important to keep in mind that having three
specific primary color wavelengths for the purpose
of standardization does not mean that these three
RGB components acting alone can generate all
spectrum colors.
COM2304 - Computer Graphics & Image
Processing
Color Fundamentals (cont…)
COM2304 - Computer Graphics & Image
Processing
Mixing the three
primaries, or a
secondary with its
opposite primary color,
in the right intensities
produces white light.
Color Fundamentals (cont…)
• Characteristics used to distinguish one color
from another;
– Brightness: embodies the achromatic notion of
intensity.
– Hue: it is an attribute associated with the
dominant wavelength of the mixture. It represents
dominant color as perceived by an observer.
– Saturation: it refers to the relative purity or the
amount of white light mixed with a hue. The pure
spectrum colors are fully saturated.
COM2304 - Computer Graphics & Image
Processing
Color Fundamentals (cont…)
• Hue and saturation taken together are called
chromaticity, and, therefore, a color may be
characterized by its brightness and chromaticity.
• The amounts of red, green and blue needed to
form any particular color are called the
tristimulus values and are denoted, X,Y and Z.
• A color is then specified by its trichromatic
coefficients which means;
x+y+z = 1
COM2304 - Computer Graphics & Image
Processing
Color Models
• The purpose of the color model is to facilitate
the specification of colors in some standard,
generally accepted way.
• A color model is a specification of a coordinate
system and a subspace within that system
where each color is represented by a single
point.
COM2304 - Computer Graphics & Image
Processing
Color Models (cont…)
• RGB Color Model
– In this model, each color appears in its primary spectral components
of red, green and blue.
– This model is based on Cartesian coordinate system.
– All values of R,G and B are assumed to be in the range [0,1].
COM2304 - Computer Graphics & Image
Processing
Color Models (cont…)
– Image represented in the RGB color model
consists of three component images, one for each
primary color.
– When fed into an RGB monitor, these three
images combine on the screen to produce a
composite color image.
COM2304 - Computer Graphics & Image
Processing
Color Models (cont…)
– The number of bites used to represent each pixel
in RGB space is called the pixel depth.
– Full color image (24- bit RGB color image): RGB
image in which each of the red, green and blue
images is an 8-bit image.
– The total number of colors in a 24 bit RGB image is
(28)3 = 16,777,216.
COM2304 - Computer Graphics & Image
Processing
Color Models (cont…)
• CMY Color Model
– This stands for Cyan-Magenta-Yellow and is used
for hardcopy devices.
– In contrast to color on the monitor, the color in
printing acts subtractive and not additive.
– A printed color that looks red absorbs the other
two components G and B and reflects R.
– Thus its (internal) color is G+B=CYAN.
– Similarly R+B=MAGENTA and R+G=YELLOW.
COM2304 - Computer Graphics & Image
Processing
Color Models (cont…)
– Thus the C-M-Y coordinates are just the
complements of the R-G-B coordinates:
– If we want to print a red looking color (i.e. with R-
G-B coordinates (1,0,0)) we have to use C-M-Y
values of (0,1,1).
– Note that M absorbs G, similarly Y absorbs B and
hence M+Y absorbs all except R.
COM2304 - Computer Graphics & Image
Processing
Color Models (cont…)
• The CMYK Color Model
– Black (0,0,0) corresponds to (C,M,Y) =
(1,1,1) which should in principle absorb R,G, and
B.
– But in practice this will appear as some dark gray.
– So in order to be able to produce better contrast
printers often use black as 4th color.
– This is the CMYK-model.
– Its coordinates are obtained from that of the CMY
COM2304 - Computer Graphics & Image
Processing
Color Models (cont…)
COM2304 - Computer Graphics & Image
Processing
http://www.rapidtables.com/convert/color/rgb-to-cmyk.htm
Color Models (cont…)
COM2304 - Computer Graphics & Image
Processing
http://www.rapidtables.com/convert/color/cmyk-to-rgb.htm
Color Models (cont…)
COM2304 - Computer Graphics & Image
Processing
Color Models (cont…)
• The HSI Color Model
– HSI stands for Hue, Saturation and Intensity
(Brightness)
– Hue is a color attribute that describes a pure color.
– Saturation gives a measure of the degree to which
a pure color is diluted by white light.
– Intensity means the gray level
COM2304 - Computer Graphics & Image
Processing
Color Models (cont…)
COM2304 - Computer Graphics & Image
Processing
Color Models (cont…)
– The Hue component describes the color itself in
the form of an angle between [0,360] degrees.
• 0 degree mean red, 120 means green 240 means blue.
60 degrees is yellow, 300 degrees is magenta.
– The Saturation component signals how much the
color is polluted with white color.
• The range of the S component is [0,1].
– The Intensity range is between [0,1].
• The value 0 means black, 1 means white.
COM2304 - Computer Graphics & Image
Processing
Color Models (cont…)
– Why HSI widely used in machine vision
applications?
• In the HSI color model we can easily extract colors and
completely ignore saturation and light if required
COM2304 - Computer Graphics & Image
Processing
The Components of a Graphic System
• Graphic system consists of display processor,
display-processor memory, frame buffer, video
controller, and input/output devices.
COM2304 - Computer Graphics & Image
Processing
The Components of a Graphic System
(Cont…)
• Display Processor:
– Purpose: frees the CPU for the graphics routine task.
– Major task: digitizes a picture definition given in an
application program into a set of pixel values for
storage in the frame buffer.
– This digitization process is called scan conversion.
– Straight lines and other geometric objects are scan
converted into a set of discrete points, corresponding
to screen pixel locations.
COM2304 - Computer Graphics & Image
Processing
The Components of a Graphic System
(Cont…)
• Characters can be defined with rectangular pixel grids, or they
can be defined with outline shapes. The array size for
character grids can vary from about 5x7 to 9x12 or more for
higher quality displays.
COM2304 - Computer Graphics & Image
Processing
The Components of a Graphic System
(Cont…)
• A character grid is displayed by superimposing
the rectangular grid pattern into the frame
buffer at a specified coordinate position.
• For characters that are defined as outlines,
the shapes are scanned converted into the
frame buffer by locating the pixels positions
closest to the outline.
COM2304 - Computer Graphics & Image
Processing
The Components of a Graphic System
(Cont…)
• Frame Buffer:
– Each screen pixel corresponds to a particular entry in a 2D array
residing in memory.
– This memory is called a frame buffer or a bit map.
– The number of rows in the frame buffer equals to the number of
raster lines on the display screen.
– The number of columns in this array equals to the number of pixels on
each raster line.
– The term pixel is also used to describe the row and the column
location in the frame buffer array that corresponds to the screen
location.
– A 512x512 display screen requires 262144 pixel memory locations.
COM2304 - Computer Graphics & Image
Processing
The Components of a Graphic System
(Cont…)
• Whenever we wish to
display a pixel on the
screen, a specific value is
placed into the
corresponding memory
location in the frame
buffer array.
• Each screen pixel’s location
and corresponding
memory’s location in the
frame buffer is accessed by
nonnegative integer
coordinate pair (x, y).
COM2304 - Computer Graphics & Image
Processing
The Components of a Graphic System
(Cont…)
• In a color raster system:
– The number of color choices available depends on
the amount of storage provided per pixel in the
frame buffer.
• Color-information can be stored in the frame
buffer in two ways:
– Direct Storage Scheme:
• Store color codes directly in the frame buffer.
– Color Tables Scheme:
• Put the color codes in a separate table and use pixel values as
an index into the table.
COM2304 - Computer Graphics & Image
Processing
The Components of a Graphic System
(Cont…)
• Direct storage scheme:
– The corresponding binary value of the color is placed in the
frame buffer.
– Minimum number of colors:
• 3 bits of storage per pixel:
– Each bit controls the intensity level (either on or off) of the corresponding electron gun in the
monitor.
• Eight colors can be provided.
– Adding more bits per pixel to the frame buffer increases the
number of color choices.
– Eg:
• 6 bits per pixel:
– 2 bits can be used for each gun.
– 4 different intensity settings for each color guns.
– Total of 64 color values for each screen pixel.
COM2304 - Computer Graphics & Image
Processing
The Components of a Graphic System
(Cont…)
• Color Tables:
– Used to reduce frame-buffer storage requirements.
– Color values are stored in a color lookup table (or video lookup
table).
– Frame-buffer values are used as indices into the color lookup table.
COM2304 - Computer Graphics & Image
Processing
Color Lookup Table
0
1
2
3
4
5
6
7
4 3 0 2
1 7 4 5
3 7 6 5
2 2 1 1
Frame Buffer Image
The Components of a Graphic System
(Cont…)
• Video controller
– It is used to control the operation of the display device
(Monitor/Screen).
– Video controller accesses the frame buffer to refresh
the screen.
– After cycling through all pixels along the bottom scan
line (y=0), the video controller resets the registers to
the first pixels position on the top scan line and the
refresh process starts over.
– The screen must be refreshed at a rate of at least 60
frames per second.
COM2304 - Computer Graphics & Image
Processing
The Components of a Graphic System
(Cont…)
COM2304 - Computer Graphics & Image
Processing
Computer Display Standard
• Various computer display standards or display
modes have been used in the history of the
personal computer.
• They are often a combination of;
– Display resolution: specified as the width and
height in pixels,
– Color depth: measured in bits, and
– Refresh rate: expressed in hertz.
COM2304 - Computer Graphics & Image
Processing
Computer Display Standard (Cont…)
• A computer image is usually represented as a discrete
grid of pixels.
• The number of pixels determines the resolution of the
image.
• Typical resolutions range from 320x200 to 2000x1500
• The color depth: is the number of distinct colors that
can be represented by a pixel depends on the number
of bits per pixel (bpp).
• A 1 bpp image uses 1 bit for each pixel, so each pixel
can be either on or off.
COM2304 - Computer Graphics & Image
Processing
Computer Display Standard (Cont…)
• Each additional bit doubles the number of colors available,
so a 2 bpp image can have 4 colors, and a 3 bpp image can
have 8 colors:
 1 bpp, 21 = 2 colors (monochrome)
 2 bpp, 22 = 4 colors
 3 bpp, 23 = 8 colors
 ...
 8 bpp, 28 = 256 colors
 16 bpp, 216 = 65,536 colors (High color )
 24 bpp, 224 ≈ 16.7 million colors (True color)
COM2304 - Computer Graphics & Image
Processing
Computer Display Standard (Cont…)
• Highcolor, usually meaning 16 bpp, normally has five bits
for red and blue, and six bits for green, as the human eye is
more sensitive to errors in green than in the other two
primary colors.
• For applications involving transparency, the 16 bits may be
divided into five bits each of red, green, and blue, with one
bit left for transparency.
• A 24-bit depth allows 8 bits per component.
• On some systems, 32-bit depth is available: this means that
each 24-bit pixel has an extra 8 bits to describe its opacity
(for purposes of combining with another image).
COM2304 - Computer Graphics & Image
Processing
Display Devices
• Display on CRT
COM2304 - Computer Graphics & Image
Processing
Large array of
triangular dot
patterns of
electron sensitive
phosphor.
When exited,
each dot in
the triad
produces light
in one of the
primary colors
Display Devices (cont…)
• Display on LCD
– LCDs use properties of
polarized light to block
or pass light through the
LCD screen and, in the
case of active matrix
display technology, thin
film transistors are used
to provide the proper
signals to address each
pixels on the screen.
COM2304 - Computer Graphics & Image
Processing
COM2304 - Computer Graphics & Image
Processing
COM2304 - Computer Graphics & Image
Processing
Reference
• Chapter 06 of Gonzalez, R.C., Woods, R.E.,
Digital Image Processing, 3rd ed. Addison-
Wesley Pub.
COM2304 - Computer Graphics & Image
Processing
Learning Outcomes Revisit
• Now, you should be able to;
– identify color formation and how color
visualize.
– describe primary and secondary colors.
– describe display on CRT and LCD.
– comprehend RGB, CMY, CMYK and HSI color
models.
– discuss the components of the graphic
systems.
– discuss computer display standards.
COM2304 - Computer Graphics & Image
Processing
QUESTIONS ?
Next Lecture – Intensity Transformation and Spatial Filtering – I
COM2304 - Computer Graphics & Image
Processing

More Related Content

What's hot

10 color image processing
10 color image processing10 color image processing
10 color image processingbabak danyal
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processingkiruthiammu
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image FundamentalsA B Shinde
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: BasicsA B Shinde
 
digital image processing
digital image processingdigital image processing
digital image processingAbinaya B
 
Image processing SaltPepper Noise
Image processing SaltPepper NoiseImage processing SaltPepper Noise
Image processing SaltPepper NoiseAnkush Srivastava
 
Arithmetic coding
Arithmetic codingArithmetic coding
Arithmetic codingVikas Goyal
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing PresentationRevanth Chimmani
 
Lecture 4 Relationship between pixels
Lecture 4 Relationship between pixelsLecture 4 Relationship between pixels
Lecture 4 Relationship between pixelsVARUN KUMAR
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringShajun Nisha
 
IMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESVicky Kumar
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restorationMd Shabir Alam
 
Image feature extraction
Image feature extractionImage feature extraction
Image feature extractionRishabh shah
 
Sharpening using frequency Domain Filter
Sharpening using frequency Domain FilterSharpening using frequency Domain Filter
Sharpening using frequency Domain Filterarulraj121
 

What's hot (20)

10 color image processing
10 color image processing10 color image processing
10 color image processing
 
Color Models
Color ModelsColor Models
Color Models
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: Basics
 
digital image processing
digital image processingdigital image processing
digital image processing
 
Image processing SaltPepper Noise
Image processing SaltPepper NoiseImage processing SaltPepper Noise
Image processing SaltPepper Noise
 
Arithmetic coding
Arithmetic codingArithmetic coding
Arithmetic coding
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing Presentation
 
Unit3 dip
Unit3 dipUnit3 dip
Unit3 dip
 
Lecture 4 Relationship between pixels
Lecture 4 Relationship between pixelsLecture 4 Relationship between pixels
Lecture 4 Relationship between pixels
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
 
IMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUES
 
Image compression .
Image compression .Image compression .
Image compression .
 
Color image processing
Color image processingColor image processing
Color image processing
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
 
Image feature extraction
Image feature extractionImage feature extraction
Image feature extraction
 
Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
 
Sharpening using frequency Domain Filter
Sharpening using frequency Domain FilterSharpening using frequency Domain Filter
Sharpening using frequency Domain Filter
 

Similar to COM2304: Color and Color Models

Similar to COM2304: Color and Color Models (20)

Ch6
Ch6Ch6
Ch6
 
Ch06
Ch06Ch06
Ch06
 
dip.pptx
dip.pptxdip.pptx
dip.pptx
 
MM3.ppt
MM3.pptMM3.ppt
MM3.ppt
 
Graphics
GraphicsGraphics
Graphics
 
CG_Unit1_SShah.pptx
CG_Unit1_SShah.pptxCG_Unit1_SShah.pptx
CG_Unit1_SShah.pptx
 
Overview of Computer Graphics
Overview of Computer GraphicsOverview of Computer Graphics
Overview of Computer Graphics
 
SESSION 1.pptx
SESSION 1.pptxSESSION 1.pptx
SESSION 1.pptx
 
Graphics display-devicesmod-1
Graphics display-devicesmod-1Graphics display-devicesmod-1
Graphics display-devicesmod-1
 
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
 
Color image processing ppt
Color image processing pptColor image processing ppt
Color image processing ppt
 
Images
ImagesImages
Images
 
Multimedia tools(images)
Multimedia tools(images)Multimedia tools(images)
Multimedia tools(images)
 
image 1.pdf
image 1.pdfimage 1.pdf
image 1.pdf
 
new ai techniques.pptx
new ai techniques.pptxnew ai techniques.pptx
new ai techniques.pptx
 
ch1ip.ppt
ch1ip.pptch1ip.ppt
ch1ip.ppt
 
Unit ii
Unit iiUnit ii
Unit ii
 
Unit 1
Unit 1Unit 1
Unit 1
 
Introduction to computer graphics part 1
Introduction to computer graphics part 1Introduction to computer graphics part 1
Introduction to computer graphics part 1
 
Matlab practical ---2.pdf
Matlab practical ---2.pdfMatlab practical ---2.pdf
Matlab practical ---2.pdf
 

More from Hemantha Kulathilake

NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar Hemantha Kulathilake
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishHemantha Kulathilake
 
NLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelNLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelHemantha Kulathilake
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingHemantha Kulathilake
 
COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation Hemantha Kulathilake
 

More from Hemantha Kulathilake (20)

NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for English
 
NLP_KASHK:POS Tagging
NLP_KASHK:POS TaggingNLP_KASHK:POS Tagging
NLP_KASHK:POS Tagging
 
NLP_KASHK:Markov Models
NLP_KASHK:Markov ModelsNLP_KASHK:Markov Models
NLP_KASHK:Markov Models
 
NLP_KASHK:Smoothing N-gram Models
NLP_KASHK:Smoothing N-gram ModelsNLP_KASHK:Smoothing N-gram Models
NLP_KASHK:Smoothing N-gram Models
 
NLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelNLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language Model
 
NLP_KASHK:N-Grams
NLP_KASHK:N-GramsNLP_KASHK:N-Grams
NLP_KASHK:N-Grams
 
NLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit DistanceNLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit Distance
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological Parsing
 
NLP_KASHK:Morphology
NLP_KASHK:MorphologyNLP_KASHK:Morphology
NLP_KASHK:Morphology
 
NLP_KASHK:Text Normalization
NLP_KASHK:Text NormalizationNLP_KASHK:Text Normalization
NLP_KASHK:Text Normalization
 
NLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State AutomataNLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State Automata
 
NLP_KASHK:Regular Expressions
NLP_KASHK:Regular Expressions NLP_KASHK:Regular Expressions
NLP_KASHK:Regular Expressions
 
NLP_KASHK: Introduction
NLP_KASHK: Introduction NLP_KASHK: Introduction
NLP_KASHK: Introduction
 
COM1407: File Processing
COM1407: File Processing COM1407: File Processing
COM1407: File Processing
 
COm1407: Character & Strings
COm1407: Character & StringsCOm1407: Character & Strings
COm1407: Character & Strings
 
COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation
 
COM1407: Input/ Output Functions
COM1407: Input/ Output FunctionsCOM1407: Input/ Output Functions
COM1407: Input/ Output Functions
 
COM1407: Working with Pointers
COM1407: Working with PointersCOM1407: Working with Pointers
COM1407: Working with Pointers
 
COM1407: Arrays
COM1407: ArraysCOM1407: Arrays
COM1407: Arrays
 

Recently uploaded

THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptArshadWarsi13
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaPraksha3
 
Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2John Carlo Rollon
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxFarihaAbdulRasheed
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentationtahreemzahra82
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRlizamodels9
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024AyushiRastogi48
 
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfSwapnil Therkar
 
Temporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of MasticationTemporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of Masticationvidulajaib
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Cytokinin, mechanism and its application.pptx
Cytokinin, mechanism and its application.pptxCytokinin, mechanism and its application.pptx
Cytokinin, mechanism and its application.pptxVarshiniMK
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 

Recently uploaded (20)

Volatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -IVolatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -I
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.ppt
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
 
Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentation
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024
 
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
 
Temporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of MasticationTemporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of Mastication
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Cytokinin, mechanism and its application.pptx
Cytokinin, mechanism and its application.pptxCytokinin, mechanism and its application.pptx
Cytokinin, mechanism and its application.pptx
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 

COM2304: Color and Color Models

  • 1. COMPUTER GRAPHICS & IMAGE PROCESSING COM2304 Color and Color Models K.A.S.H.Kulathilake B.Sc. (Hons) IT (SLIIT), MCS (UCSC), M.Phil (UOM), SEDA(UK) Rajarata University of Sri Lanka Faculty of Applied Sciences Department of Physical Sciences
  • 2. Learning Outcomes COM2304 - Computer Graphics & Image Processing • At the end of this lecture, you should be able to; – identify color formation and how color visualize. – describe primary and secondary colors. – describe display on CRT and LCD. – comprehend RGB, CMY, CMYK and HSI color models. – discuss the components of the graphic systems. – discuss computer display standards.
  • 3. Color Fundamentals COM2304 - Computer Graphics & Image Processing The colors that humans and some other animals perceive in an object are determined by the nature of the light reflected from the object.
  • 4. Color Fundamentals (cont…) COM2304 - Computer Graphics & Image Processing • Visualizing color Green objects reflect light with wavelengths primarily in the 500 to 570 nm range while absorbing most of the energy at other wavelengths Colours Absorbed
  • 5. Color Fundamentals (cont…) • Primary colors – Based on the absorption characteristics of the human eye, colors are seen as variable combination of RED (R), GREEN (G) and BLUE(B). – It is important to keep in mind that having three specific primary color wavelengths for the purpose of standardization does not mean that these three RGB components acting alone can generate all spectrum colors. COM2304 - Computer Graphics & Image Processing
  • 6. Color Fundamentals (cont…) COM2304 - Computer Graphics & Image Processing Mixing the three primaries, or a secondary with its opposite primary color, in the right intensities produces white light.
  • 7. Color Fundamentals (cont…) • Characteristics used to distinguish one color from another; – Brightness: embodies the achromatic notion of intensity. – Hue: it is an attribute associated with the dominant wavelength of the mixture. It represents dominant color as perceived by an observer. – Saturation: it refers to the relative purity or the amount of white light mixed with a hue. The pure spectrum colors are fully saturated. COM2304 - Computer Graphics & Image Processing
  • 8. Color Fundamentals (cont…) • Hue and saturation taken together are called chromaticity, and, therefore, a color may be characterized by its brightness and chromaticity. • The amounts of red, green and blue needed to form any particular color are called the tristimulus values and are denoted, X,Y and Z. • A color is then specified by its trichromatic coefficients which means; x+y+z = 1 COM2304 - Computer Graphics & Image Processing
  • 9. Color Models • The purpose of the color model is to facilitate the specification of colors in some standard, generally accepted way. • A color model is a specification of a coordinate system and a subspace within that system where each color is represented by a single point. COM2304 - Computer Graphics & Image Processing
  • 10. Color Models (cont…) • RGB Color Model – In this model, each color appears in its primary spectral components of red, green and blue. – This model is based on Cartesian coordinate system. – All values of R,G and B are assumed to be in the range [0,1]. COM2304 - Computer Graphics & Image Processing
  • 11. Color Models (cont…) – Image represented in the RGB color model consists of three component images, one for each primary color. – When fed into an RGB monitor, these three images combine on the screen to produce a composite color image. COM2304 - Computer Graphics & Image Processing
  • 12. Color Models (cont…) – The number of bites used to represent each pixel in RGB space is called the pixel depth. – Full color image (24- bit RGB color image): RGB image in which each of the red, green and blue images is an 8-bit image. – The total number of colors in a 24 bit RGB image is (28)3 = 16,777,216. COM2304 - Computer Graphics & Image Processing
  • 13. Color Models (cont…) • CMY Color Model – This stands for Cyan-Magenta-Yellow and is used for hardcopy devices. – In contrast to color on the monitor, the color in printing acts subtractive and not additive. – A printed color that looks red absorbs the other two components G and B and reflects R. – Thus its (internal) color is G+B=CYAN. – Similarly R+B=MAGENTA and R+G=YELLOW. COM2304 - Computer Graphics & Image Processing
  • 14. Color Models (cont…) – Thus the C-M-Y coordinates are just the complements of the R-G-B coordinates: – If we want to print a red looking color (i.e. with R- G-B coordinates (1,0,0)) we have to use C-M-Y values of (0,1,1). – Note that M absorbs G, similarly Y absorbs B and hence M+Y absorbs all except R. COM2304 - Computer Graphics & Image Processing
  • 15. Color Models (cont…) • The CMYK Color Model – Black (0,0,0) corresponds to (C,M,Y) = (1,1,1) which should in principle absorb R,G, and B. – But in practice this will appear as some dark gray. – So in order to be able to produce better contrast printers often use black as 4th color. – This is the CMYK-model. – Its coordinates are obtained from that of the CMY COM2304 - Computer Graphics & Image Processing
  • 16. Color Models (cont…) COM2304 - Computer Graphics & Image Processing http://www.rapidtables.com/convert/color/rgb-to-cmyk.htm
  • 17. Color Models (cont…) COM2304 - Computer Graphics & Image Processing http://www.rapidtables.com/convert/color/cmyk-to-rgb.htm
  • 18. Color Models (cont…) COM2304 - Computer Graphics & Image Processing
  • 19. Color Models (cont…) • The HSI Color Model – HSI stands for Hue, Saturation and Intensity (Brightness) – Hue is a color attribute that describes a pure color. – Saturation gives a measure of the degree to which a pure color is diluted by white light. – Intensity means the gray level COM2304 - Computer Graphics & Image Processing
  • 20. Color Models (cont…) COM2304 - Computer Graphics & Image Processing
  • 21. Color Models (cont…) – The Hue component describes the color itself in the form of an angle between [0,360] degrees. • 0 degree mean red, 120 means green 240 means blue. 60 degrees is yellow, 300 degrees is magenta. – The Saturation component signals how much the color is polluted with white color. • The range of the S component is [0,1]. – The Intensity range is between [0,1]. • The value 0 means black, 1 means white. COM2304 - Computer Graphics & Image Processing
  • 22. Color Models (cont…) – Why HSI widely used in machine vision applications? • In the HSI color model we can easily extract colors and completely ignore saturation and light if required COM2304 - Computer Graphics & Image Processing
  • 23. The Components of a Graphic System • Graphic system consists of display processor, display-processor memory, frame buffer, video controller, and input/output devices. COM2304 - Computer Graphics & Image Processing
  • 24. The Components of a Graphic System (Cont…) • Display Processor: – Purpose: frees the CPU for the graphics routine task. – Major task: digitizes a picture definition given in an application program into a set of pixel values for storage in the frame buffer. – This digitization process is called scan conversion. – Straight lines and other geometric objects are scan converted into a set of discrete points, corresponding to screen pixel locations. COM2304 - Computer Graphics & Image Processing
  • 25. The Components of a Graphic System (Cont…) • Characters can be defined with rectangular pixel grids, or they can be defined with outline shapes. The array size for character grids can vary from about 5x7 to 9x12 or more for higher quality displays. COM2304 - Computer Graphics & Image Processing
  • 26. The Components of a Graphic System (Cont…) • A character grid is displayed by superimposing the rectangular grid pattern into the frame buffer at a specified coordinate position. • For characters that are defined as outlines, the shapes are scanned converted into the frame buffer by locating the pixels positions closest to the outline. COM2304 - Computer Graphics & Image Processing
  • 27. The Components of a Graphic System (Cont…) • Frame Buffer: – Each screen pixel corresponds to a particular entry in a 2D array residing in memory. – This memory is called a frame buffer or a bit map. – The number of rows in the frame buffer equals to the number of raster lines on the display screen. – The number of columns in this array equals to the number of pixels on each raster line. – The term pixel is also used to describe the row and the column location in the frame buffer array that corresponds to the screen location. – A 512x512 display screen requires 262144 pixel memory locations. COM2304 - Computer Graphics & Image Processing
  • 28. The Components of a Graphic System (Cont…) • Whenever we wish to display a pixel on the screen, a specific value is placed into the corresponding memory location in the frame buffer array. • Each screen pixel’s location and corresponding memory’s location in the frame buffer is accessed by nonnegative integer coordinate pair (x, y). COM2304 - Computer Graphics & Image Processing
  • 29. The Components of a Graphic System (Cont…) • In a color raster system: – The number of color choices available depends on the amount of storage provided per pixel in the frame buffer. • Color-information can be stored in the frame buffer in two ways: – Direct Storage Scheme: • Store color codes directly in the frame buffer. – Color Tables Scheme: • Put the color codes in a separate table and use pixel values as an index into the table. COM2304 - Computer Graphics & Image Processing
  • 30. The Components of a Graphic System (Cont…) • Direct storage scheme: – The corresponding binary value of the color is placed in the frame buffer. – Minimum number of colors: • 3 bits of storage per pixel: – Each bit controls the intensity level (either on or off) of the corresponding electron gun in the monitor. • Eight colors can be provided. – Adding more bits per pixel to the frame buffer increases the number of color choices. – Eg: • 6 bits per pixel: – 2 bits can be used for each gun. – 4 different intensity settings for each color guns. – Total of 64 color values for each screen pixel. COM2304 - Computer Graphics & Image Processing
  • 31. The Components of a Graphic System (Cont…) • Color Tables: – Used to reduce frame-buffer storage requirements. – Color values are stored in a color lookup table (or video lookup table). – Frame-buffer values are used as indices into the color lookup table. COM2304 - Computer Graphics & Image Processing Color Lookup Table 0 1 2 3 4 5 6 7 4 3 0 2 1 7 4 5 3 7 6 5 2 2 1 1 Frame Buffer Image
  • 32. The Components of a Graphic System (Cont…) • Video controller – It is used to control the operation of the display device (Monitor/Screen). – Video controller accesses the frame buffer to refresh the screen. – After cycling through all pixels along the bottom scan line (y=0), the video controller resets the registers to the first pixels position on the top scan line and the refresh process starts over. – The screen must be refreshed at a rate of at least 60 frames per second. COM2304 - Computer Graphics & Image Processing
  • 33. The Components of a Graphic System (Cont…) COM2304 - Computer Graphics & Image Processing
  • 34. Computer Display Standard • Various computer display standards or display modes have been used in the history of the personal computer. • They are often a combination of; – Display resolution: specified as the width and height in pixels, – Color depth: measured in bits, and – Refresh rate: expressed in hertz. COM2304 - Computer Graphics & Image Processing
  • 35. Computer Display Standard (Cont…) • A computer image is usually represented as a discrete grid of pixels. • The number of pixels determines the resolution of the image. • Typical resolutions range from 320x200 to 2000x1500 • The color depth: is the number of distinct colors that can be represented by a pixel depends on the number of bits per pixel (bpp). • A 1 bpp image uses 1 bit for each pixel, so each pixel can be either on or off. COM2304 - Computer Graphics & Image Processing
  • 36. Computer Display Standard (Cont…) • Each additional bit doubles the number of colors available, so a 2 bpp image can have 4 colors, and a 3 bpp image can have 8 colors:  1 bpp, 21 = 2 colors (monochrome)  2 bpp, 22 = 4 colors  3 bpp, 23 = 8 colors  ...  8 bpp, 28 = 256 colors  16 bpp, 216 = 65,536 colors (High color )  24 bpp, 224 ≈ 16.7 million colors (True color) COM2304 - Computer Graphics & Image Processing
  • 37. Computer Display Standard (Cont…) • Highcolor, usually meaning 16 bpp, normally has five bits for red and blue, and six bits for green, as the human eye is more sensitive to errors in green than in the other two primary colors. • For applications involving transparency, the 16 bits may be divided into five bits each of red, green, and blue, with one bit left for transparency. • A 24-bit depth allows 8 bits per component. • On some systems, 32-bit depth is available: this means that each 24-bit pixel has an extra 8 bits to describe its opacity (for purposes of combining with another image). COM2304 - Computer Graphics & Image Processing
  • 38. Display Devices • Display on CRT COM2304 - Computer Graphics & Image Processing Large array of triangular dot patterns of electron sensitive phosphor. When exited, each dot in the triad produces light in one of the primary colors
  • 39. Display Devices (cont…) • Display on LCD – LCDs use properties of polarized light to block or pass light through the LCD screen and, in the case of active matrix display technology, thin film transistors are used to provide the proper signals to address each pixels on the screen. COM2304 - Computer Graphics & Image Processing
  • 40. COM2304 - Computer Graphics & Image Processing
  • 41. COM2304 - Computer Graphics & Image Processing
  • 42. Reference • Chapter 06 of Gonzalez, R.C., Woods, R.E., Digital Image Processing, 3rd ed. Addison- Wesley Pub. COM2304 - Computer Graphics & Image Processing
  • 43. Learning Outcomes Revisit • Now, you should be able to; – identify color formation and how color visualize. – describe primary and secondary colors. – describe display on CRT and LCD. – comprehend RGB, CMY, CMYK and HSI color models. – discuss the components of the graphic systems. – discuss computer display standards. COM2304 - Computer Graphics & Image Processing
  • 44. QUESTIONS ? Next Lecture – Intensity Transformation and Spatial Filtering – I COM2304 - Computer Graphics & Image Processing