Beruflich Dokumente
Kultur Dokumente
The popular color models are, 1. 410 Color 8odel 2. 9S/ Color 8odel :. C82; Color 8odel
Color models
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.
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
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