Sie sind auf Seite 1von 6

6.

COLOR IMAGE PROCESSING


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 color images 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 ob ect 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 bits is 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 ./I012345. These colors are used for color image processing. +mong /I01234, 4ed, 1reen, 0lue are the fundamental primary colors. Since any color is generated by a proper combination of 4, 1, 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 2 27 .1*,---,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 color models. These colors spaces are nothing but the representation of colors in a standard way.

The popular color models are, 1. 410 Color 8odel 2. 9S/ Color 8odel :. C82; 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 used color models are, 410 Color 8odel 9S/ Color 8odel C82 or C82; Color 8odel 1) RBG Color Model In 410 color model each color appears in its primary component of 4, 1, 0 %lanes. This model consist of : fundamental colors as 4ed, 1reen and 0lue from this three colors a user can obtain three secondary colors such as Cyan, 8agenta, 2ellow by combining 4,1,0 colors together. 410 Color model is based on Cartesian co<ordinate system. This model is having 410 values at three corners and C, 8, 2 are at another : corners. Cyan color is obtained by combining blue and green together. 2ellow color is obtained by combining red and green together while magenta color is obtained by combining 4ed and 0lue Colors together. This color model is suitable for all display devices such as T/ screen, computer screen, camera screen etc. Though 410 color model is suitable for display devices it is not used for image analysis work such as compression, segmentation etc, due to high color relationship among the pi!els of 401 planes. 0y high co<relationship we mean that if the intensity of any pi!el is changed in any plane, automatic modification will be reflected on rest of the planes therefore this color model is not suitable for generation of various image processing applications.

$ig. 410 Color 8odel

2) HSV COLOR MODEL To overcome the drawbacks of 410 color model, a new color space called 9S/ Color 8odel is used. This model consist of : independent planes such as 9ue.95,, Saturation .S5 and /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 are 9ue, Saturation and Intensity value. 9ue is an attribute associated with the actual color or true color of the ob ect. Therefore hue describes pure color of an ob ect. Saturation is the amount of white color added with the actual color of the ob ect. Saturation indicates how dilute 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 ob ect, Saturation represents the percentage of white color mi!ed and value represents the brightness or intensity of the image. 9S/ color model doesn't have high co-relationship among the pi!els of 9S/ planes. Therefore it is the ideal tool for developing image processing algorithms based on 9S/ color model. 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 model consists of : secondary colors as Cyan.C5, 8agenta.85 and 2ellow.25. +ll these secondary colors are obtained from the : primary colors such as 4ed, 1reen and 0lue. C82 /alues can be obtained from 410 color using following e)uation.

The e)ual amount of C, 8, 2 values produces black color, while mi!ing of 4, 1, 0 colors produces white color. Those 9@( devices such as printers, photocopier machine .Aero!5, fa! machine uses C82 color model. Sometimes a black color is used with C82 to generate C82; 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, 2c0c4 color space, ,TSC Color space are widely used. imcomplement.5 function can be used to convert from 410 to C82, cmyBimageCimcomplement.rgbBimage5D +lso, imcomplement.5 function can be used to convert from C82 to 410, rgbBimage Cimcomplement.cmyBimage5D

Converting to Ot er Color S!aces


To convert color image from one color space to another 8atEab provides some predefined functions as,

1.41029S/.5 2.41022c0c4.5 :.4102,TSC.5 To obtained reverse operation following functionFs are used, 1. 9S/2410.5 2. 2c0c42410.5 :. ,TSC2410.5 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ! "#$ to %e&arate the &ri'ar( )o'&onent% o* RGB Color i'a+e ,Save% *ile -ith !' in -or. dire)tor( /( de*ault)! clear allD close allD iCimread.Fa.bmpF5D i1Ci.G,G,15D @@ 4 component i2Ci.G,G,25D @@ 1 component i:Ci.G,G,:5D @@ 0 component figureD imshow.i15D figureD imshow.i25D figureD imshow.i:5D ! "#$ to %e&arate the 3 )o'&onent% o* an(!ti** i'a+e clear allD close allD iCimread.Fa.tiff5D figureD i1Ci.G,G,15D i2Ci.G,G,25D i:Ci.G,G,:5D figureD imshow.i15D figureD imshow.i25D figureD imshow.i:5D

! "#$ to Di%&la( !/'&0 !1&+ and !+i* i'a+e%! clear allD close allD iCimread.FShailu.bmpF5D iCimread.Faprichit. pegF5D iCimread.FShailesh.gifF5D figureD imshow.i5D figureD imshow. 5D figureD imshow.k5D ! -a& to )onvert RGB )olor i'a+e to HSV )olor %&a)e clear allD close allD iCimread.FS.bmpF5D figureD imshow.i5D C40129S/.i5D figureD imshow. 5D ! -a& to )onvert a *ile )alled e23'+'3)ole+e!1&e+ *ro' RGB )olor %&a)e to HSV )olor %&a)e . clear allD close allD iCimread.FeGHmgmHcollege. pegF5D figureD imshow.i5D C41029S/.I5D figureD imshow. 5D ! -a& to )onvert the i'a+e *ro' HSV )olor %&a)e to RGB )olor %&a)e clear allD close allD iCimread.Fs.bmpF5D figureD imshow.i5D C9S/2410.i5D figureD imshow. 5D

! "#$ to )onvert RGB Color %&a)e to Y)B)R and Y)B)R )olor %&a)e to RGB Color %&a)e4 clear allD close allD iCimread.Fs.bmpF5D imshow.i5D C41022c0c4.i5D kC2c0c42410.i5D figureD imshow. 5D figureD imshow.k5D ! -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 allD iCimread.Fs.bmpF5D figureD imshow.i5D C41029S/.I5D figureD imshow. 5D 1C .G,G,15D 2C .G,G,25D :C .G,G,:5D figureD imshow. 15D figureD imshow. 25D figureD imshow. :5D

Das könnte Ihnen auch gefallen