SlideShare a Scribd company logo
1 of 23
Presented by
Antu Chowdhury
Color Image
Processing
Course title: Digital Image Processing
Contents
The CMY and CMYK Colors Models
The HSI Color Model
Converting colors from RGB to HSI
Converting colors from HSI to RGB
1.
Color Image sharpening
2.
a.
b.
Basics of Full Color Image Processing
Color Transformations
Histogram Processing
Color Image smoothing
Formulations
3.
4.
a.
b.
5.
6.
The CMY and CMYK Colors Models
The CMY color model is a subtractive color model, mainly used in color printing.
In the CMY model we begin with white and take away the appropriate primary components to achieve the
desired color. For example, if we subtract red from white, we get green and blue, which is cyan.
Figure 1. shows a coordinate system using the three primaries' complementary colors: C (cyan), M (magenta), and
Y (yellow). The corner of the CMY color cube that is at (0,0,0) corresponds to white, whereas the corner of the cube
that is at (1,1,1) represents black. This conversion is performed using the simple operation:
Figure 1. The CMY color space.
According to Figure 1, equal amounts of the pigment primaries, cyan, magenta, and
yellow should produce black.
In practice, combining these colors for printing produces a muddy-looking black. So, in
order to produce true black, a fourth color, black, is added, giving rise to the CMYK color
model.
Why CMYK?
The HSI Color Model
Creating colors in the RGB and CMY models and changing from one model to the other is a straightforward
process.
The RGB, CMY, and other similar color models are not well suited for describing colors in terms that are
practical for human interpretation.
WHY HSI:
For example, one does not refer to the color of an automobile by giving the percentage of each of the
primaries composing its color.
These color systems are ideally suited for hardware implementations.
The HSI (hue, saturation, intensity) color model, decouples the intensity component from the color
carrying information (hue and saturation) in a color image.
the HSI model is an ideal tool for developing image processing algorithms based on color descriptions
that are natural and intuitive to humans.
Basics of HSI:
The HSI model uses three measures to describe colors:
Saturation: Saturation gives a measure of how much a pure color is diluted with white light.
Hue: Hue is a color Component that describes a pure color (pure yellow, orange, or red).
Intensity: Intensity is the chromatic notation of brightness of black & white range.
An RGB color image can be viewed as three monochrome intensity images (representing red, green, and
blue), so we could extract intensity from an RGB image.
In the arrangement shown in Fig. 2(a), the line (intensity axis) joining the black and white vertices is
vertical.
Conceptual relationships between the RGB and HSI color models:
To determine the intensity component of any color point in Fig. 2, we would simply pass a plane
perpendicular to the intensity axis and containing the color point.
The intersection of the plane with the intensity axis would give us a point with intensity value in the range
[0, 1].
Figure 2(a)(b):
Conceptual relationships between
the RGB and HSI color models
Hue can be determined also from a given RGB point, consider Fig. 2(b), which shows a plane defined by
three points (black, white, and cyan).
All points contained in the plane must have the same hue (cyan in this case), because the black and white
components cannot change the hue.
By rotating the shaded plane about the vertical intensity axis, we would obtain different hues.
In Fig. 3(a), this plane we see that the primary colors are separated by 120°. The secondary colors are
60° from the primaries.
Fig. 3(b) shows the same hexagonal shape and an arbitrary color point (shown as a dot).
Hue and saturation in the HSI color model:
The saturation is the length of the vector from the origin to the point.
The hue of the point is determined by an angle from some reference point (red).
Figure 3(a)(b)(c)(d):
Hue and saturation in the
HSI color model.
It makes no difference which shape is picked because a geometric transformation may transform any of these
shapes into one of the other two Fig. 3(c)(d).
Example: HSI Model of a Color Triangle and Circle:
Figure 4. The HSI color
model based on (a)
triangular and (b) circular
color planes. The
triangles and circles are
perpendicular to the vertical
intensity axis.
Converting colors from RGB to HSI
Step 1. Read a RGB image.
Step 2. Represent the RGB image in the range [0,1].
Step 3. Find HSI components:
Hue as H:
The angle:
Saturation as S:
Intensity as I:
Converting colors from HSI TO RGB
Step 1. If the values of HIS given in the interval [0,1], we need to find corresponding
RGB values in the same range.
Step 2. R, G, B values calculated as follows:
Basics of Full Color Image Processing
Full color image processing fall into 2 categories: 1. per-color-component. 2.vector-based
processing to be equivalent
In 1st category we process each component image individually and then form a composite
processed color image from the individually processed component.
In 2nd category we work with color pixels directly. Because full color images have at least
three components, color pixels are really vectors.
Let c represent an arbitrary vector in RGB color space:
Color components are the function of co-ordinates(x, y) so we can write it as:
For an image of size MxN there are MN such vectors, c(x,y), for x=0,1,2,…,M-1; y=0,1,2,…,N-1.
It is important to keep in mind that this equation depicts a vector whose components are spatial
variables in x and y.
As an illustration, Fig. 5 shows neighborhood spatial processing of gray-scale and full-color images.
Figure 5. Spatial masks for gray-scale and RGB color images.
In order for per-color-component and vector-based processing to be equivalent, two conditions have to be
satisfied:
 First, the process has to be applicable to both vectors and scalars.
 Second, the operation on each component of a vector must be independent of the other components.
Neighborhood average:
Can’t satisfy the two conditions,
results of two full color processing
approaches are different.
Color Transformation
Color Transformations deal with processing the components of color image within the context of a single color model.
 The image below shows a high resolution color image of a bowl of strawberries
and a cup of coffee.
 Follows component of the initial CMYK scan.
 Black represent 0 and white represent 1.
Formulation
 As with the gray-level transformation, we model
color transformations using the expression
g(x,y) = T[f(x,y)]
 Where f(x,y) is the color image, g(x,y) is the
transformed or processed color output image,
and T is an operator on f over a spatial
neighborhood of (x,y)
 The pixel value are triplets or quartets from the
color space chosen to represent the images.
 We will restrict our attention to color
transformations of the form
Si = Ti(r1,r2,…,n), where i=1,2,…,n
 Si and ri are variables denoting the color
components of f(x,y) and g(x,y) at any point
(x,y).
 n is the number of color components.
 (T1,T2,…,Tn) is a set of transformation or color
mapping functions that operate on ri to produce
Si.
Example: Color Image and its Various Components
Full color image Cyan Magenta Yellow
 Note the strawberries are composed of a large amount of magenta and
yellow because the image corresponding to these two CMYK components
are the brightest.
 Black is used sparingly and is generally confined to the coffee and shadows
within the bowl of strawberries.
Black
 Converting the CMYK to RGB component
image.
 The strawberries contains a large amount
of red and very little green and blue.
 The stem of the strawberries shows some
green.
Red Blue
Green
 Computing the HSI component, the strawberries are relatively pure in
color; they poses the highest saturation or least dilution by white light
of any of the hues in the image.
Hue Intensity
Saturation
 We note some difficulties in interpreting the hue component
 There is a discontinuity in the HSI model where 0o and 360o
 HUE is undefined for a saturation of 0.
 The discontinuity of the model is most apparent around the
strawberries, which are depict in gray level values near the both black
(0) and white (1).
 The result is an unexpected mixture of highly contrasting gray level to
represent a single color – red.
Example: Modify the intensity of the image on Figure using g(x,y)=k*f(x,y), where k=0.7.
In HSI color space, this can be
done with Hue: s1=r1, Saturation:
s2=r2, Intensity: s3=k*r3 (Only
intensity component must be
transformed)
In RGB space, this can be done
with three components,
si=k*ri (i=1,2,3.)
 In CMY space, it requires a set of
linear transformations
si=k*ri + (1-k) (i=1,2,3.)
Original picture
Result of decreasing its
intensity by 30% (k=0.7)
Histogram Processing
 Histogram equalization automatically determines a
transformation that seeks to produce an image with a uniform
histogram of intensity values.
 Since color images are composed of multiple components,
however, consideration must be given to adapting the gray
scale technique to more than one component and/or
histogram.
 It is generally unwise to histogram equalize the components
of a color image independently.
 A more logical approach is to spread the color intensities
uniformly, leaving the hues (colors) unchanged.
 The following example shows a color image of a caster
stand containing cruets and shakers whose intensity
component spans the entire (normalized) ranged of possible
values [0,1].
 The image intensity before processing contains a large
number of dark colors that reduces the median intensity to
0.36.
Example: Histogram Equalization in the HSI Color Space
Original image Image HSI components
Histogram equalize the
intensity component without
altering the hue and
saturation. The image is
significantly brighter and
several grain of the wooden
table are now visible
Correcting by partially
increasing the image’s
saturation. Note the color
of oil and vinegar before
and after the saturation
change.
Color Image smoothing
 can be carried out on a per-color-plane basis
 Smooth only the intensity component of the HSI
representation and convert the processed result to
an RGB image for display
 Let Sxy denote the set of coordinates defining a
neighborhood centered at (x,y) in an RGB color
image.
 The average of the RGB component vectors in this
neighborhood is:
 It’s follows from previous equations and the
properties of vector addition that,
Example: Color Image Smoothing by neighborhood averaging
 The following example shows a color image with its RGB component
and its HSI component.
 Applying a 5 X 5 smoothing filters to the RGB component independently
 In the HSI components, we only smooth the intensity component
leaving the hue and saturation components unchanged.
RGB image Red Green
Hue Saturation Intensity
RGB corrected HSI corrected
Difference
between both
corrections
Blue
Color Image sharpening
 We consider sharpening an image using Laplacian.
 Laplacian of a vector is defined as a vector whose components
are equal to the Laplacian of the individual scalar components of
the input vector.
 In an RGB color system, the Laplacian of vector c is
 The following example takes an RGB color image and apply the
Laplacian to its RGB components.
 It shows a sharpened image based on its HSI components by
combining the Laplacian of the intensity component with the
unchanged hue and saturation components.
Example: Sharpening with the Laplacian
RGB
image
Red
components
Blue
components
Green
components
Hue Saturation Intensity
RGB sharpened HSI sharpened
Difference
between both
corrections
THANK
YOU

More Related Content

Similar to Color Image Processing Techniques

Lecnoninecolorspacemodelindigitalimageprocess
LecnoninecolorspacemodelindigitalimageprocessLecnoninecolorspacemodelindigitalimageprocess
LecnoninecolorspacemodelindigitalimageprocessIrsaAamir
 
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...IOSR Journals
 
Study of Color Image Processing For Capturing and Comparing Images
Study of Color Image Processing For Capturing and Comparing ImagesStudy of Color Image Processing For Capturing and Comparing Images
Study of Color Image Processing For Capturing and Comparing Imagespaperpublications3
 
Color to Gray and back’ using normalization of color components with Cosine, ...
Color to Gray and back’ using normalization of color components with Cosine, ...Color to Gray and back’ using normalization of color components with Cosine, ...
Color to Gray and back’ using normalization of color components with Cosine, ...IOSR Journals
 
Multimedia color in image and video
Multimedia color in image and videoMultimedia color in image and video
Multimedia color in image and videoMazin Alwaaly
 
Image-Processing-ch3-part-3.pdf
Image-Processing-ch3-part-3.pdfImage-Processing-ch3-part-3.pdf
Image-Processing-ch3-part-3.pdfASMZahidKausar
 
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRARETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRAmathsjournal
 
Retooling of Color Imaging in ihe Quaternion Algebra
Retooling of Color Imaging in ihe Quaternion AlgebraRetooling of Color Imaging in ihe Quaternion Algebra
Retooling of Color Imaging in ihe Quaternion Algebramathsjournal
 
Contrast enhancement in digital images
Contrast enhancement in digital imagesContrast enhancement in digital images
Contrast enhancement in digital imagesSakher BELOUADAH
 
CG04 Color Models.ppsx
CG04 Color Models.ppsxCG04 Color Models.ppsx
CG04 Color Models.ppsxjyoti_lakhani
 
Comprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection AlgorithmComprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection AlgorithmCSCJournals
 
Image colorization
Image colorizationImage colorization
Image colorizationPankti Fadia
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfnagwaAboElenein
 
Color
ColorColor
ColorFNian
 
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRARETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRAmathsjournal
 

Similar to Color Image Processing Techniques (20)

Color models
Color modelsColor models
Color models
 
Lecnoninecolorspacemodelindigitalimageprocess
LecnoninecolorspacemodelindigitalimageprocessLecnoninecolorspacemodelindigitalimageprocess
Lecnoninecolorspacemodelindigitalimageprocess
 
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
 
Study of Color Image Processing For Capturing and Comparing Images
Study of Color Image Processing For Capturing and Comparing ImagesStudy of Color Image Processing For Capturing and Comparing Images
Study of Color Image Processing For Capturing and Comparing Images
 
image-pro.ppt
image-pro.pptimage-pro.ppt
image-pro.ppt
 
Color to Gray and back’ using normalization of color components with Cosine, ...
Color to Gray and back’ using normalization of color components with Cosine, ...Color to Gray and back’ using normalization of color components with Cosine, ...
Color to Gray and back’ using normalization of color components with Cosine, ...
 
Multimedia color in image and video
Multimedia color in image and videoMultimedia color in image and video
Multimedia color in image and video
 
Image-Processing-ch3-part-3.pdf
Image-Processing-ch3-part-3.pdfImage-Processing-ch3-part-3.pdf
Image-Processing-ch3-part-3.pdf
 
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRARETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
 
Retooling of Color Imaging in ihe Quaternion Algebra
Retooling of Color Imaging in ihe Quaternion AlgebraRetooling of Color Imaging in ihe Quaternion Algebra
Retooling of Color Imaging in ihe Quaternion Algebra
 
Contrast enhancement in digital images
Contrast enhancement in digital imagesContrast enhancement in digital images
Contrast enhancement in digital images
 
CG04 Color Models.ppsx
CG04 Color Models.ppsxCG04 Color Models.ppsx
CG04 Color Models.ppsx
 
Comprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection AlgorithmComprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection Algorithm
 
Image colorization
Image colorizationImage colorization
Image colorization
 
Lect 06
Lect 06 Lect 06
Lect 06
 
Color
ColorColor
Color
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Color
ColorColor
Color
 
Color_Spaces.pptx
Color_Spaces.pptxColor_Spaces.pptx
Color_Spaces.pptx
 
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRARETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
 

Recently uploaded

Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 

Recently uploaded (20)

Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 

Color Image Processing Techniques

  • 1. Presented by Antu Chowdhury Color Image Processing Course title: Digital Image Processing
  • 2. Contents The CMY and CMYK Colors Models The HSI Color Model Converting colors from RGB to HSI Converting colors from HSI to RGB 1. Color Image sharpening 2. a. b. Basics of Full Color Image Processing Color Transformations Histogram Processing Color Image smoothing Formulations 3. 4. a. b. 5. 6.
  • 3. The CMY and CMYK Colors Models The CMY color model is a subtractive color model, mainly used in color printing. In the CMY model we begin with white and take away the appropriate primary components to achieve the desired color. For example, if we subtract red from white, we get green and blue, which is cyan. Figure 1. shows a coordinate system using the three primaries' complementary colors: C (cyan), M (magenta), and Y (yellow). The corner of the CMY color cube that is at (0,0,0) corresponds to white, whereas the corner of the cube that is at (1,1,1) represents black. This conversion is performed using the simple operation: Figure 1. The CMY color space.
  • 4. According to Figure 1, equal amounts of the pigment primaries, cyan, magenta, and yellow should produce black. In practice, combining these colors for printing produces a muddy-looking black. So, in order to produce true black, a fourth color, black, is added, giving rise to the CMYK color model. Why CMYK?
  • 5. The HSI Color Model Creating colors in the RGB and CMY models and changing from one model to the other is a straightforward process. The RGB, CMY, and other similar color models are not well suited for describing colors in terms that are practical for human interpretation. WHY HSI: For example, one does not refer to the color of an automobile by giving the percentage of each of the primaries composing its color. These color systems are ideally suited for hardware implementations.
  • 6. The HSI (hue, saturation, intensity) color model, decouples the intensity component from the color carrying information (hue and saturation) in a color image. the HSI model is an ideal tool for developing image processing algorithms based on color descriptions that are natural and intuitive to humans. Basics of HSI: The HSI model uses three measures to describe colors: Saturation: Saturation gives a measure of how much a pure color is diluted with white light. Hue: Hue is a color Component that describes a pure color (pure yellow, orange, or red). Intensity: Intensity is the chromatic notation of brightness of black & white range.
  • 7. An RGB color image can be viewed as three monochrome intensity images (representing red, green, and blue), so we could extract intensity from an RGB image. In the arrangement shown in Fig. 2(a), the line (intensity axis) joining the black and white vertices is vertical. Conceptual relationships between the RGB and HSI color models: To determine the intensity component of any color point in Fig. 2, we would simply pass a plane perpendicular to the intensity axis and containing the color point. The intersection of the plane with the intensity axis would give us a point with intensity value in the range [0, 1]. Figure 2(a)(b): Conceptual relationships between the RGB and HSI color models
  • 8. Hue can be determined also from a given RGB point, consider Fig. 2(b), which shows a plane defined by three points (black, white, and cyan). All points contained in the plane must have the same hue (cyan in this case), because the black and white components cannot change the hue. By rotating the shaded plane about the vertical intensity axis, we would obtain different hues.
  • 9. In Fig. 3(a), this plane we see that the primary colors are separated by 120°. The secondary colors are 60° from the primaries. Fig. 3(b) shows the same hexagonal shape and an arbitrary color point (shown as a dot). Hue and saturation in the HSI color model: The saturation is the length of the vector from the origin to the point. The hue of the point is determined by an angle from some reference point (red). Figure 3(a)(b)(c)(d): Hue and saturation in the HSI color model. It makes no difference which shape is picked because a geometric transformation may transform any of these shapes into one of the other two Fig. 3(c)(d).
  • 10. Example: HSI Model of a Color Triangle and Circle: Figure 4. The HSI color model based on (a) triangular and (b) circular color planes. The triangles and circles are perpendicular to the vertical intensity axis.
  • 11. Converting colors from RGB to HSI Step 1. Read a RGB image. Step 2. Represent the RGB image in the range [0,1]. Step 3. Find HSI components: Hue as H: The angle: Saturation as S: Intensity as I:
  • 12. Converting colors from HSI TO RGB Step 1. If the values of HIS given in the interval [0,1], we need to find corresponding RGB values in the same range. Step 2. R, G, B values calculated as follows:
  • 13.
  • 14. Basics of Full Color Image Processing Full color image processing fall into 2 categories: 1. per-color-component. 2.vector-based processing to be equivalent In 1st category we process each component image individually and then form a composite processed color image from the individually processed component. In 2nd category we work with color pixels directly. Because full color images have at least three components, color pixels are really vectors. Let c represent an arbitrary vector in RGB color space:
  • 15. Color components are the function of co-ordinates(x, y) so we can write it as: For an image of size MxN there are MN such vectors, c(x,y), for x=0,1,2,…,M-1; y=0,1,2,…,N-1. It is important to keep in mind that this equation depicts a vector whose components are spatial variables in x and y.
  • 16. As an illustration, Fig. 5 shows neighborhood spatial processing of gray-scale and full-color images. Figure 5. Spatial masks for gray-scale and RGB color images. In order for per-color-component and vector-based processing to be equivalent, two conditions have to be satisfied:  First, the process has to be applicable to both vectors and scalars.  Second, the operation on each component of a vector must be independent of the other components. Neighborhood average: Can’t satisfy the two conditions, results of two full color processing approaches are different.
  • 17. Color Transformation Color Transformations deal with processing the components of color image within the context of a single color model.  The image below shows a high resolution color image of a bowl of strawberries and a cup of coffee.  Follows component of the initial CMYK scan.  Black represent 0 and white represent 1. Formulation  As with the gray-level transformation, we model color transformations using the expression g(x,y) = T[f(x,y)]  Where f(x,y) is the color image, g(x,y) is the transformed or processed color output image, and T is an operator on f over a spatial neighborhood of (x,y)  The pixel value are triplets or quartets from the color space chosen to represent the images.  We will restrict our attention to color transformations of the form Si = Ti(r1,r2,…,n), where i=1,2,…,n  Si and ri are variables denoting the color components of f(x,y) and g(x,y) at any point (x,y).  n is the number of color components.  (T1,T2,…,Tn) is a set of transformation or color mapping functions that operate on ri to produce Si. Example: Color Image and its Various Components Full color image Cyan Magenta Yellow  Note the strawberries are composed of a large amount of magenta and yellow because the image corresponding to these two CMYK components are the brightest.  Black is used sparingly and is generally confined to the coffee and shadows within the bowl of strawberries. Black
  • 18.  Converting the CMYK to RGB component image.  The strawberries contains a large amount of red and very little green and blue.  The stem of the strawberries shows some green. Red Blue Green  Computing the HSI component, the strawberries are relatively pure in color; they poses the highest saturation or least dilution by white light of any of the hues in the image. Hue Intensity Saturation  We note some difficulties in interpreting the hue component  There is a discontinuity in the HSI model where 0o and 360o  HUE is undefined for a saturation of 0.  The discontinuity of the model is most apparent around the strawberries, which are depict in gray level values near the both black (0) and white (1).  The result is an unexpected mixture of highly contrasting gray level to represent a single color – red.
  • 19. Example: Modify the intensity of the image on Figure using g(x,y)=k*f(x,y), where k=0.7. In HSI color space, this can be done with Hue: s1=r1, Saturation: s2=r2, Intensity: s3=k*r3 (Only intensity component must be transformed) In RGB space, this can be done with three components, si=k*ri (i=1,2,3.)  In CMY space, it requires a set of linear transformations si=k*ri + (1-k) (i=1,2,3.) Original picture Result of decreasing its intensity by 30% (k=0.7)
  • 20. Histogram Processing  Histogram equalization automatically determines a transformation that seeks to produce an image with a uniform histogram of intensity values.  Since color images are composed of multiple components, however, consideration must be given to adapting the gray scale technique to more than one component and/or histogram.  It is generally unwise to histogram equalize the components of a color image independently.  A more logical approach is to spread the color intensities uniformly, leaving the hues (colors) unchanged.  The following example shows a color image of a caster stand containing cruets and shakers whose intensity component spans the entire (normalized) ranged of possible values [0,1].  The image intensity before processing contains a large number of dark colors that reduces the median intensity to 0.36. Example: Histogram Equalization in the HSI Color Space Original image Image HSI components Histogram equalize the intensity component without altering the hue and saturation. The image is significantly brighter and several grain of the wooden table are now visible Correcting by partially increasing the image’s saturation. Note the color of oil and vinegar before and after the saturation change.
  • 21. Color Image smoothing  can be carried out on a per-color-plane basis  Smooth only the intensity component of the HSI representation and convert the processed result to an RGB image for display  Let Sxy denote the set of coordinates defining a neighborhood centered at (x,y) in an RGB color image.  The average of the RGB component vectors in this neighborhood is:  It’s follows from previous equations and the properties of vector addition that, Example: Color Image Smoothing by neighborhood averaging  The following example shows a color image with its RGB component and its HSI component.  Applying a 5 X 5 smoothing filters to the RGB component independently  In the HSI components, we only smooth the intensity component leaving the hue and saturation components unchanged. RGB image Red Green Hue Saturation Intensity RGB corrected HSI corrected Difference between both corrections Blue
  • 22. Color Image sharpening  We consider sharpening an image using Laplacian.  Laplacian of a vector is defined as a vector whose components are equal to the Laplacian of the individual scalar components of the input vector.  In an RGB color system, the Laplacian of vector c is  The following example takes an RGB color image and apply the Laplacian to its RGB components.  It shows a sharpened image based on its HSI components by combining the Laplacian of the intensity component with the unchanged hue and saturation components. Example: Sharpening with the Laplacian RGB image Red components Blue components Green components Hue Saturation Intensity RGB sharpened HSI sharpened Difference between both corrections