DigitalImageProcessingChapter6:ColorImageProcessing6July2005(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.SpectrumofWhiteLight1666SirIsaacNewton,24yearold,discoveredwhitelightspectrum.(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.ElectromagneticSpectrumVisiblelightwavelength:fromaround400to700nm1.Foranachromatic(monochrome)lightsource,thereisonly1attributetodescribethequality:intensity2.Forachromaticlightsource,thereare3attributestodescribethequality:Radiance=totalamountofenergyflowfromalightsource(Watts)Luminance=amountofenergyreceivedbyanobserver(lumens)Brightness=intensity(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.SensitivityofConesintheHumanEye6-7millionsconesinahumaneye-65%sensitivetoRedlight-33%sensitivetoGreenlight-2%sensitivetoBluelightPrimarycolors:DefinedCIEin1931Red=700nmGreen=546.1nmBlue=435.8nmCIE=CommissionInternationaledel’Eclairage(TheInternationalCommissiononIllumination)PrimaryandSecondaryColorsPrimarycolorPrimarycolorPrimarycolorSecondarycolors(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.PrimaryandSecondaryColors(cont.)Additiveprimarycolors:RGBuseinthecaseoflightsourcessuchascolormonitorsSubtractiveprimarycolors:CMYuseinthecaseofpigmentsinprintingdevicesRGBaddtogethertogetwhiteWhitesubtractedbyCMYtogetBlackHue:dominantcolorcorrespondingtoadominantwavelengthofmixturelightwaveSaturation:Relativepurityoramountofwhitelightmixedwithahue(inverselyproportionaltoamountofwhitelightadded)Brightness:IntensityColorCharacterizationHueSaturationChromaticityamountofred(X),green(Y)andblue(Z)toformanyparticularcoloriscalledtristimulus.(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.CIEChromaticityDiagramTrichromaticcoefficients:ZYXXxZYXYyZYXZz1zyxxyPointsontheboundaryarefullysaturatedcolors(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.ColorGamutofColorMonitorsandPrintingDevicesColorMonitorsPrintingdevices(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.RGBColorModelPurposeofcolormodels:tofacilitatethespecificationofcolorsinsomestandardRGBcolormodels:-basedoncartesiancoordinatesystem(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.RGBColorCubeR=8bitsG=8bitsB=8bitsColordepth24bits=16777216colorsHiddenfacesofthecube(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.RGBColorModel(cont.)Redfixedat127(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.SafeRGBColorsSafeRGBcolors:asubsetofRGBcolors.Thereare216colorscommoninmostoperatingsystems.(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.RGBSafe-colorCubeTheRGBCubeisdividedinto6intervalsoneachaxistoachievethetotal63=216commoncolors.However,for8bitcolorrepresentation,therearethetotal256colors.Therefore,theremaining40colorsarelefttoOS.CMYandCMYKColorModelsBGRYMC111C=CyanM=MagentaY=YellowK=Black(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.HSIColorModelRGB,CMYmodelsarenotgoodforhumaninterpretingHSIColormodel:Hue:DominantcolorSaturation:Relativepurity(inverselyproportionaltoamountofwhitelightadded)Intensity:BrightnessColorcarryinginformation(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.RelationshipBetweenRGBandHSIColorModelsRGBHSIHueandSaturationonColorPlanes1.Adotistheplaneisanarbitrarycolor2.Hueisananglefromaredaxis.3.Saturationisadistancetothepoint.HSIColorModel(cont.)Intensityisgivenbyapositionontheverticalaxis.HSIColorModelIntensityisgivenbyapositionontheverticalaxis.(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.Example:HSIComponentsofRGBCubeHueSaturationIntensityRGBCubeConvertingColorsfromRGBtoHSIGBGBHif360if2/121))(()()()(21cosBGBRGRBRGRBGRS31)(31BGRIConvertingColorsfromHSItoRGB)1(SIB)60cos(cos1HHSIR)(1BRGRGsector:1200HGBsector:240120H)1(SIR)60cos(cos1HHSIG)(1GRB)1(SIG)60cos(cos1HHSIB)(1BGRBRsector:360240H120HH240HH(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.Example:HSIComponentsofRGBColorsHueSaturationIntensityRGBImage(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.Example:ManipulatingHSIComponentsHueSaturationIntensityRGBImageHueSaturationIntensityRGBImageColorImageProcessingThereare2typesofcolorimageprocesses1.Pseudocolorimageprocess:Assigningcolorstograyvaluesbasedonaspecificcriterion.Grayscaleimagestobeprocessedmaybeasingleimageormultipleimagessuchasmultispectralimages2.Fullcolorimageprocess:Theprocesstomanipulaterealcolorimagessuchascolorphotographs.(ImagesfromRafaelC.GonzalezandRichardE.Wood,DigitalImageProcessing,2ndEdition.PseudocolorImageProcessingWhyweneedtoassigncolorstograyscaleimage?Answer:Humancandistinguishdifferentcolo