Color Image Processing................ppt

GadisaKanchora 154 views 67 slides Jun 20, 2024
Slide 1
Slide 1 of 67
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67

About This Presentation

this is our Computer Graphics note


Slide Content

Computer Graphics
Chapter Seven
Color Image Processing

TheuseofcolorImageProcessingismotivated
bytwoprincipalfactors:
Colorisapowerfuldescriptor
Humanscandistinguishbetweenthousandsofcolor
shadesandintensitiescomparedtoaboutonlytwo
dozenshadesofgray
Color Image Processing

Full Color Processing vs Pseudo-Color Processing
InFullColorProcessingtheimageinquestiontypically
areacquiredwithaFull-Colorsensore.g.ColorTV
cameraorColorScanner
InPseudo-colorProcessingtheproblemisofassigninga
colortoaparticularmonochromeintensityorarangeof
intensities

Color Spectrum

Electromagnetic Spectrum

Physical Background
•Visiblelight:anarrowbandof
electromagneticradiation→
380nm(blue) -780nm
(red)
•Wavelength:Eachphysically
distinctcolourcorrespondsto
atleastonewavelengthinthis
band.

Color Fundamentals
Thecolorsthathumans andsome
animalsperceiveinanobjectare
determinedbythenatureoflight
reflectedfromtheobject

Achromatic vs Chromatic Light
Achromatic(voidofcolor)Light:Itsonly
contributeisits‘Intensity’oramount
ChromaticLight:spanstheelectromagnetic
spectrumfromapproximately400to700nm

Quantities for description of quantity of Chromatic
Source of Light
Threebasicquantitiesareusedtodescribethequantityofa
chromaticsourceoflight:
Radiance
Luminance
Brightness

Radiance
ThetotalamountofEnergythatflowsfromaLight
Source
ItismeasuredinWatts

Luminance
Luminancegivesameasureofamountofenergyan
observerperceivesfromalightsource(measuredin
Lumens(lm))
Forexamplelightemittedfromasourceoperatingin
InfraredregionofSpectrumcouldhavesignificant
energy(Radiance)butahumanobserverwillhardly
perceiveitsoluminanceiszero.

Brightness
Itisasubjectivemeasure
Itembodiestheachromaticnotionofintensityandisoneof
thekeyfactorsindescribingcolorsensation

Human Perception
Detailedexperimentalevidenceshasestablishedthatthe6
to7millionconesinthehumaneyecanbedividedinto
threeprincipalsensingcategories,correspondingroughlyto
red,greenandblue
Approximately65%ofallconesaresensitivetoRedLight,
33%aresensitivetoGreenLightandabout2%are
sensitivetoBlueLight(mostsensitive)

Human Perception
DuetotheseabsorptioncharacteristicofHumanEye
colorsareseenasvariablecombinationsoftheso-called
‘PrimaryColors’Red,GreenandBlue
Theprimarycolorscanbeaddedtoproducesecondary
colorsofLight
Magenta(Red+Blue)
Cyan(Green+Blue)
Yellow(Red+Green)

Absorption of Light by red, green and blue
cones in Human Eye
Mixingthethreeprimariesorasecondarywithitsopposite
primarycolorsintherightintensitiesproduceswhitelight

Primary Color of Light vs Primary Color of Pigments
Red,GreenandBlueColorsarePrimaryColorsofLight
InPrimaryColorofPigmentsaprimarycolorisdefinedas
theonethatsubtractsorabsorbsaprimarycolorofLight
andreflectsortransmitstheothertwo
ThereforethePrimaryColorsofPigmentsareMagenta,
CyanandYellowandsecondarycolorsareRed,Greenand
Blue
Apropercombinationofthreepigmentprimariesora
secondarywithitsoppositeprimaryproducesBlack
ColorTelevisionReceptionisanexampleoftheadditive
natureofLightColors

Tri-Stimulus Values
TheamountofRed,GreenandBlueneededtoforma
particularcolor(denotedbyX,YandZ)
Acoloristhenspecifiedbyits“Tri-chromaticCoefficients”
•Thus x+y+z=1

Chromaticity Diagram
Anotherapproachforspecifyingcolorsistouse
chromaticitydiagram
Showscolorcompositionsasafunctionofx(red)and
y(green)
Foranyxandythecorrespondingvalueofz(blue)can
beobtainedas
z=1-x-y

Chromaticity Diagram

Chromaticity Diagram
Todeterminetherangeof
colorsthatcanbeobtained
fromthe3givencolorsinthe
CD, we simply draw
connectinglinestoeachof
thethreecolorpoints.
Theresultisatriangleand
anycolorinsideatriangleis
produced by various
combinationsofthethree
initialcolors.
Thetriangleshowsatypical
rangeofcolors(calledthe
colorgamut)producedby
RGBmonitor

Color Models
Thepurposeofacolormodel(alsocalledColorSpaceorColor
System)istofacilitatethespecificationofcolorsinsome
standardway
Acolormodelisaspecificationofacoordinatesystemanda
subspacewithinthatsystemwhereeachcolorisrepresentedby
asinglepoint
ColorModels
RGB(Red,Green,Blue)
CMY(Cyan,Magenta,Yellow)
HSI(Hue,Saturation,Intensity)
YIQ(Luminance,In phase,Quadrature)
YUV(Y'standsforthelumacomponent (thebrightness)andUandV
arethechrominance(color)components)

RGB Model
Eachcolorisrepresented
initsprimarycolor
components Red,Green
andBlue
Thismodelisbasedon
Cartesian Coordinate
System

RGB Model
Inthismodel,theprimarycolorsarered,green,andblue.Itis
anadditivemodel,inwhichcolorsareproducedbyadding
components,withwhitehavingallcolorspresentandblack
beingtheabsenceofanycolor.
Thisisthemodelusedforactivedisplayssuchastelevision
andcomputerscreens.
TheRGBmodelisusuallyrepresentedbyaunitcubewithone
cornerlocatedattheoriginofathree-dimensionalcolor
coordinatesystem,theaxesbeinglabeledR,G,B,andhaving
arangeofvalues[0,1].Theorigin(0,0,0)isconsidered
blackandthediagonallyoppositecorner(1,1,1)iscalled
white.Thelinejoiningblacktowhiterepresentsagrayscale
andhasequalcomponentsofR,G,B.

RGB Color Cube
Thetotalnumberofcolorsina24Bitimageis
(2
8
)
3
=16,777,216(>16million)

Generating RGB image

CMY and CMYK Color Model
Cyan,magenta,andyellowarethesecondarycolorswithrespecttothe
primarycolorsofred,green,andblue.However,inthissubtractivemodel,
theyaretheprimarycolorsandred,green,andblue,arethesecondaries.
Inthismodel,colorsareformedbysubtraction,whereaddingdifferent
pigmentscausesvariouscolorsnottobereflectedandthusnottobeseen.
Here,whiteistheabsenceofcolors,andblackisthesumofallofthem.
Thisisgenerallythemodelusedforprinting.
Mostdevicesthatdepositcolorpigmentsonpaper(suchasColorPrinters
andCopiers)requiresCMYdatainputorperformRGBtoCMYconversion
internally
C
M
Y
R
G
B
=
1.00
1.00
1.00
-

CMY and CMYK Color Model
CMYisaSubtractiveColorModel
EqualamountsofPigmentprimaries(Cyan,Magentaand
Yellow)shouldproduceBlack
Inpracticecombiningthesecolorsforprintingproduces
a“Muddy-Black”color
Soinordertoproduce“True-Black”afourthcolor
“Black”isaddedgivingrisetoCMYKmodel

CMY Color Model

CMY Color Model

HSI Color Model
Hue(dominantcolourseen)
Wavelengthofthepurecolourobservedinthesignal.
Distinguishesred,yellow,green,etc.
Morethe400huescanbeseenbythehumaneye.
Saturation(degreeofdilution)
Inverseofthequantityof“white”presentinthesignal.A
purecolourhas100%saturation,thewhiteandgrey
have0%saturation.
Distinguishesredfrompink,marinebluefromroyalblue,
etc.
About20saturationlevelsarevisibleperhue.
Intensity
Distinguishesthegraylevels.

HSI Color Model
SeparatesoutintensityIfromthecoding
Twovalues(Hue&Saturation)encodechromaticity
Intensityencodemonochromepart.
Hueandsaturationofcolorsrespondcloselytotheway
humansperceivecolor,andthusthismodelissuitedfor
interactivemanipulationofcolorimages.

Properties of HSI (HSV)
HueHisdefinedbyanangle
SaturationSmodelsthepurityofthecolor
 I=(R+G+B)/3

Conversion from RGB to HSI
GivenanimageinRGBcolorformat,theHcomponentofeach
RGBpixelisobtainedusingtheequation:

Conversion from HSI to RGB

Conversion from HSI to RGB

Pseudo-Color (False Color) Image
Processing
Pseudo-colorImageProcessingconsistsofassigningcolors
tograylevelsbasedonspecificcriterion
Generally,theeyecannotdistinguishmorethanabout50
graylevelsinanimage.Thussubtledetailcaneasilybelost
inlookingatgrayscaleimages.Toenhancevariationsin
graylevelandmakethemmoreobvious,grayscaleimages
arefrequentlypseudo-colored,whereeachgrayscale
(generallyatleast256levelsformostdisplays)aremapped
toacolorlevelthroughaLUT.Theeyeisextremely
sensitivetocolorandcandistinguishthousandsofcolor
valuesinapicture.

Pseudo-Coloring using LUT
CLUT(Colorlookuptable)::Amappingofapixelvaluetoa
colorvalueshownonadisplaydevice.
•Forexample,inagrayscaleimagewithlevels0,1,2,3,
and4,pseudocoloringisacolorlookuptablethatmaps0
toblack,1tored,2togreen,3toblue,and4towhite.

•Thetechniqueofintensityslicingordensityslicingorcolor
codingisoneofthesimplestexampleofPseudo-colorimage
processing
Intensity Slicing

•TheGrayScale[0,L-1]isdividedintoLlevels;wherel
0
representsBlack(f(x,y)=0)andl
L-1representswhite
(f(x,y)=L-1)
•SupposethatPplanesperpendiculartotheintensityaxis
aredefinedatlevelsl
1,l
2…..,l
p
•Thenassumingthat0<P<L-1thePplanespartitionthe
grayscaleintoP+1intervals,V
1,V
2…….V
p+1
Intensity Slicing

Intensity Slicing
•Grayleveltocolorassignmentsaremade
accordingtotherelation:
f(x,y)=c
kiff(x,y)€v
k
•Wherec
kisthecolorassociatedwiththekth
intensityintervalv
kdefinedbythepartition
planesatl=k-1andl=k

An Alternative View of Intensity Slicing

Basics of Full Color Image Processing
•Full color image processing fall into 2 categories.
•In1
st
categoryweprocesseachcomponentimage
individuallyandthenformacompositeprocessedcolor
imagefromtheindividuallyprocessedcomponent.
•In2
nd
categoryweworkwithcolorpixelsdirectly.
Becausefullcolorimageshaveatleastthree
components,colorpixelsarereallyvectors.
•LetcrepresentanarbitraryvectorinRGBcolorspace:

Basics of Full Color Image Processing
•Colorcomponentsarethefunctionofco-ordinates(x,y)so
wecanwriteitas:
•ForanimageofsizeMxNthereareMNsuchvectors,
c(x,y),forx=0,1,2,…,M-1;y=0,1,2,…,N-1

Basics of Full Color Image Processing

Color Transformations
•Colortransformationcanberepresentedbythe
expression::
g(x,y)=T[f(x,y)]
f(x,y): inputimage
g(x,y):processed(output)image
T[*]:anoperatoronfdefinedoverneighborhoodof(x,y).
Thepixelvaluesherearetripletsorquartets(i.egroupof3
or4values)

Color Transformations
• Si=Ti(r1,r2,…,rn)i=1,2,3,….n
riandSiarevariablesdenotingthecolorcomponentsoff(x,y)and
g(x,y)atanypoint(x,y).
nisthenoofcolorcomponents
{T1,T2,…..,Tn}isasetoftransformationorcolormappingfunctions.
• Note that n transformations combine to produce a single
transformation T

Color Transformations
•Thecolorspacechosendeterminethevalueofn.
•IfRGBcolorspaceisselectedthenn=3&r1,r2,r3denotesthered,
blueandgreencomponentsoftheimage.
•IfCMYKcolorspaceisselectedthenn=4&r1,r2,r3,r4denotesthe
cyan,hue,magentaandblackcomponentsoftheimage.
•Supposewewanttomodifytheintensityofthegivenimage
usingg(x,y)=k*f(x,y)where0<k<1

Color Transformations
•InHSIcolorspacethiscanbedonewiththesimple
transformation s3=k*r3
wheres1=r1ands2=r2
Onlyintensitycomponentr3ismodified.
•InRGBcolorspace3componentsmustbetransformed:
si=k*ri i=1,2,3.
•Usingk=0.7theintensityofanimageisdecreasedby30%

Color Transformations

Color Complements
•ThehuesoppositetooneanotherontheColorCirclearecalled
Complements.
•ColorComplementtransformationisequivalenttoimagenegative
inGrayscaleimages

Color Complements

Color Slicing
•Highlightingaspecificrangeofcolorsinanimageisusefulfor
separatingobjectsfromtheirsurroundings.
•Displaythecolorsofinterestsothattheyaredistinguishedfrom
background.
•Onewaytosliceacolorimageistomapthecoloroutsidesome
rangeofinteresttoanonprominentneutralcolor.

Histogram Processing
•Colorimagesarecomposed
ofmultiplecomponents,
howeveritisnotsuitableto
process each plane
independentlyincaseof
histogramequalization.This
resultsinerroneouscolor.
•Amorelogicalapproachis
to spread the color
intensitiesuniformly,leaving
thecolorsthemselves(hue,
saturation)unchanged.
•HSIapproachisideally
suitedtothistypeof
approach.

Color Image Smoothing
•Colorimagescanbesmoothedinthesamewayasgrayscale
images,thedifferenceisthatinsteadofscalargraylevelvalueswe
mustdealwithcomponentvectorsofthefollowingform:
•TheaverageoftheRGBcomponentvectorinthisneighborhood
is:

Color Image Smoothing
•Werecognizethecomponentsofthisvectorasthescalar
imagesthatwouldbeobtainedbyindependentlysmoothing
eachplaneofthestartingRGBimageusingconventionalgray
scaleneighborhoodprocessing.
•Thusweconcludethatsmoothingbyneighborhoodaveraging
canbecarriedoutonapercolorplanebasis.

Color Image Smoothing

Color Image Smoothing

Color Image Sharpening

Noise in Color Images
•Noiseincolorimagescanberemovedthroughvariousnoise
modelswhichweuseinImageRestorationincasethenoise
contentofacolorimagehasthesamecharacteristicsineach
colorchannel.
•Butitispossibleforcolorchannelstobeaffecteddifferentlyby
noisesointhiscasenoiseareremovedfromtheimageby
independentlyprocessingeachplane
•Removenoisebyapplyingsmoothingfilters(e.ggaussian,
average,median)toeachplaneindividuallyandthencombine
theresult.

Noise in Color Images

Color Image Compression
•Compressionistheprocessof
reducingoreliminatingredundant
and/orirrelevantinformation
•Acompressed imageisnot
directlydisplayableitmustbe
decompressed beforeinputtoa
colormonitor.
•Incaseifinacompressedimage1
bitofdatarepresents230bitsof
dataintheoriginalimage,then
compressed imagecould be
transmittedoverinternetin1
minuteascomparedtooriginal
imagewhichwilltake4hoursto
transmit.

Discussion points
1.what are the different color model
and their application in computer
graphics?
2.Describe the common practices that
colors can be used in computer
graphics?
3.Explain noise in image processing
and how it can be eliminated?

Any question
Tags