color image processin in digital image processing
TRANSCRIPT
-
8/13/2019 Color Image Processin in digital image processing
1/6
6. COLORIMAGEPROCESSING
Introduction
In early days, whole image processing is done on monochrome images only but due
to advances in technology, it is possible to work on color images. So the processing of colorimages is called color image processing.
The study of color is important in design and development of color region system.
The use of color in image processing is motivated by two reasons as,
1. Color gives a better look and appearance to the images.
2. Color helps in obect identification and e!traction from the images.
Color Images Fundamentals
The color image processing is widely categori"ed into 2 separate areas as,
1# $ull Color Images %rocessing.
2# %seudo Color Image %rocessing
The processing of $ull Color Images or True Color Images having a pi!el depth of 24 bitsis
called as &$ull Color Image %rocessing'. (e can do the image processing steps like
enhancement, compression, segmentation etc. with full color images. The %rocessing of
pseudo color images is called pseudo color image processing. %seudo Color Images are not
the true color images. These are created by providing some false color to the group of
intensities of grey images. Such types of color images are called %seudo Color Images. In
this area a user can also develop the application for compression, segmentation etc. but the)uality output is not good as compared to full color image processing. Therefore pseudo
color image processing is rarely used for image processing work.
In 1***, ISS+C euton first discovered that when a beam of sunlight passes through
a prism, the emerging light is not a white light but it consist of - different colors. This
combination of - colors is called electromagnetic spectrum. These colors are violet, indigo,
blue, green, yellow, orange and red /I0345. These colors are used for color image
processing.
+mong /I034, 4ed, reen, 0lue are the fundamental primary colors. Since any
color is generated by a proper combination of 4, , 0 colors. These colors are the primary
colors. To represent each of the planes a Computer system needs 6 bits hence a total pi!el
depth of color image is 27 bits.
The total number of colors supported by color images is 2271*,---,21*5 from such huge
no. of colors, we can reduce the re)uired number and process that amount of pi!els only.These operations can be done in color image processing.
The set of all these colors form a vector space and it is called color space or colormodels. These colors spaces are nothing but the representation of colors in a standard way.
-
8/13/2019 Color Image Processin in digital image processing
2/6
The popular color models are,
1. 40 Color 8odel2. 9S/ Color 8odel
:. C8; Color 8odel
Color models (or Color spaces):
The color spaces are the standard way of representation of colors. The colors can be
represented using standard techni)ues called color spaces or color models. The widely usedcolor models are,
40 Color 8odel
9S/ Color 8odelC8 or C8; Color 8odel
1) RBG Color Model
In 40 color model each color appears in its primary component of 4, , 0 %lanes.
This model consist of : fundamental colors as 4ed, reen and 0lue from this three colors auser can obtain three secondary colors such as Cyan, 8agenta, ellow by combining 4,,0colors together.
40 Color model is based on Cartesian co
-
8/13/2019 Color Image Processin in digital image processing
3/6
2) HSV COLOR MODELTo overcome the drawbacks of 40 color model, a new color space called 9S/ Color
8odel is used. This model consist of : independent planes such as 9ue95,, Saturation S5and /alue /5. This model is also called as 9IS 9ue, Saturation = Intensity5 Color 8odel.
The characteristics that are generally used to distinguish one color from another are9ue, Saturation and Intensity value. 9ue is an attribute associated with the actual color or
true color of the obect. Therefore hue describes pure color of an obect. Saturation is theamount of white color added with the actual color of the obect. Saturation indicates howdilute the color is. The value plane represents the brightness of the image.
$or e!ample, let us consider a pink color. This color is generated by combining red
and white color together. Therefore red represents the hue of the obect, Saturationrepresents the percentage of white color mi!ed and valuerepresents the brightness or
intensity of the image.9S/ color model doesn't have high co-relationshipamong the pi!els of 9S/ planes.
Therefore it is the ideal tool for developing image processing algorithms based on 9S/ colormodel. 9S/ color model also decompiles the intensity from color carrying information 9
and S5. 9ence this color model is widely used for >9igher Image +nalysis (ork?.
3) CMY OR CMYK Color Model
This color model is also sometimes called as secondary color model. This color modelconsists of : secondary colors as CyanC5, 8agenta85 and ellow5. +ll these secondarycolors are obtained from the : primary colors such as 4ed, reen and 0lue.
C8 /alues can be obtained from 40 color using following e)uation.
The e)ual amount of C, 8, values produces black color, while mi!ing of 4, , 0 colors
produces white color.Those 9@( devices such as printers, photocopier machine Aero!5, fa! machine uses
C8 color model. Sometimes a black color is used with C8 to generate C8; color space
cyan, magenta, yellow, black5.Since this color space is used in devices, it is not generally used for image analysis
work, To do image analysis 9S/ color space, c0c4 color space, TSC Color space arewidely used.
imcomplement5 function can be used to convert from 40 to C8,
cmyBimageimcomplementrgbBimage5D
+lso, imcomplement5 function can be used to convert from C8 to 40,
rgbBimage imcomplementcmyBimage5D
Converting to Oter Color S!aces
To convert color image from one color space to another 8atEab provides some
predefined functions as,
-
8/13/2019 Color Image Processin in digital image processing
4/6
1.4029S/5
2.402c0c45:.402TSC5
To obtained reverse operation following functionFs are used,
1. 9S/24052. c0c42405
:. TSC2405
-
8/13/2019 Color Image Processin in digital image processing
5/6
! "#$ to Di%&la( !/'&0 !&+ and !+i* i'a+e%!
clear allD
close allD
iimreadFShailu.bmpF5DiimreadFaprichit.pegF5DiimreadFShailesh.gifF5D
figureDimshowi5D
figureDimshow5D
figureDimshowk5D
! -a& to onvert RGB olor i'a+e to HSV olor %&ae
clear allDclose allDiimreadFS.bmpF5D
figureDimshowi5D
4029S/i5DfigureD
imshow5D
! -a& to onvert a *ile alled e'+'ole+e!&e+ *ro' RGB olor %&ae to HSVolor %&ae
.
clear allDclose allD
iimreadFeGHmgmHcollege.pegF5DfigureD
imshowi5D
4029S/I5D
figureDimshow5D
! -a& to onvert the i'a+e *ro' HSV olor %&ae to RGB olor %&ae
clear allD
close allD
iimreadFs.bmpF5DfigureD
imshowi5D
9S/240i5DfigureD
imshow5D
-
8/13/2019 Color Image Processin in digital image processing
6/6
! "#$ to onvert RGB Color %&ae to YBR and YBR olor %&ae to RGB Color%&ae4
clear allD
close allDiimreadFs.bmpF5D
imshowi5D
402c0c4i5Dkc0c4240i5D
figureD
imshow5D
figureDimshowk5D
! -a& onvert RGB olor 'odel to HSV olor 'odel 5 HSV olor 'odel and%e&arate the o'&onent o* HSV olor i'a+e%
clear allD
close allDiimreadFs.bmpF5D
figureDimshowi5D
4029S/I5DfigureD
imshow5D
1G,G,15D2G,G,25D
:G,G,:5D
figureD
imshow15DfigureD
imshow25DfigureD
imshow:5D