Digitizingthecoordinatevaluesiscalledsampling.ImagesamplingandquantizationDigitizingtheamplitudevaluesiscalledquantization.Lecture2:Chapter2:DigitalImageFundamentalsConceptoffalsecontouring:ridge-likestructurescausedbytheuseofaninsufficientnumberofgraylevelsinsmoothareasofadigitalimage.Ruleofthumb:imagesofsize256×256pixelsand64graylevelsareaboutthesmallestimagesthatcanbeexpectedtobereasonablyfreeofobjectionablesamplingchecker-boardsandfalsecontouring.Lecture2:Chapter2:DigitalImageFundamentalsProblemsassociatedwithresolutionreductionIllustrationofsamplingfrequencylessthansignalfrequencyIfthefunctionisundersampled,thenaphenomenoncalledaliasingcorruptsthesampledimage.Lecture3:Chapter2:DigitalImageFundamentalsAsetofpixelsallofwhichare4-connectedtoeachotheriscalleda4-component;ifallthepixelsare8-connectedthesetisan8-component.4-component4-componentOnlyone8-componentbuttwo4-componentLecture3:Chapter2:DigitalImageFundamentals8-componentIllustrationofdifferentconnectedcomponents000000011000011000000110000110Howmanyconnectedcomponentsforthefollowingimage?Twoobjectsfor4-connectedneighborhoodoneobjectfor8-connectedneighborhoodLecture3:Chapter2:DigitalImageFundamentalsConnectedcomponentsexercise1.TheEuclideandistancebetweenpandqisdefinedas:Differentwaysofmeasuringdistance2122])()[(),(tysxqpDeUsingthismethod,thepixelshavingadistancelessthanorequaltosomevaluerfrom(x,y)arethepointscontainedinadiskofradiusrcenteredat(x,y).pqLecture3:Chapter2:DigitalImageFundamentals2.TheD4distance(alsocalledcityblockdistance)betweenpandqisdefinedas:Usingthismethod,thepixelshavingaD4distancefrom(x,y)lessthanorequaltosomevaluerformadiamondcenteredat(x,y).Forexample,thepixelswithD4distance≤2from(x,y)formthefollowingcontoursofconstantdistance:tysxqpD),(4ThepixelswithD4=1arethe4-neighborsof(x,y).2211221022212D4distanceDifferentwaysofmeasuringdistancecon’tLecture3:Chapter2:DigitalImageFundamentals3.TheD8distance(alsocalledchessboarddistance)betweenpandqisdefinedas:D8(p,q)=max(x-s,y-t)2222221112210122111222222D8distanceDifferentwaysofmeasuringdistancecon’tThepixelswithD8=1arethe8-neighborsof(x,y).Lecture3:Chapter2:DigitalImageFundamentalsp2pp1p4p3Assumethatp,p2,andp4havevalue1andthatp1andp3canhaveavalue0or1.ForV={1},solveforDmdistancebetweenpandp4.Solution:Ifp1andp3are0,thenDmis2.Ifp1is1,p3are0,thenDmbecomes3.Similarly,ifp3is1andp1is0,Dmalsois3.Finally,ifbothp1andp3are1,Dmis4.ExampletoillustratefindingDmdistanceLecture3:Chapter2:DigitalImageFundamentalsCommonfunctionsforenhancementLecture4:Chapter3SpatialDomainEnhancements=c·rγWherecandγarepositiveconstants.Power-lawtransformationLecture4:Chapter3SpatialDomainEnhancementUseofγvaluesgreaterthan1toreducethelightgraylevel.Lecture4:Chapter3SpatialDomainEnhancementEnhancementofwashed-outimagesIllustrationofhistogramequalization4x4imageGrayscale=[0,9]histogram0112233445566789No.ofpixelsGraylevel2332424332352424Lecture5:Chapter3SpatialDomainEnhancement91609sx9No.ofpixelsGrayLevel(j)99998.486.163.330000161616161511600000145600876543210kjjn0kjjnns01661611161516161616161616161616PerformhistogramequalizationLecture5:Chapter3SpatialDomainEnhancementOutputimageGrayscale=[0,9]Equalizedhistogram0112233445566789No.ofpixels3663838663693838ResultsafterhistogramequalizationLecture5:Chapter3SpatialDomainEnhancement255194157103155911620223990155523523420712420918810532271134522835255=11111111235=11101011188=10111100155=10011011124=0111110090=01011010……Bit-plane7imageBit-plane2image111100111000Lecture4:Chapter3SpatialDomainEnhancementAsimplebit-planeexample17241815235714164613202210121921311182529111121111910677101111131161113202210121921311182529OriginalimagemaskFilteredimage÷10Lecture7:Chapter3SpatialDomainEnhancementIllustrationofaweightedaveragefilterTechnique:Excessiveblurringisgenerallyusedtoeliminatesmallobjectsintheimage.Theywillbeblendedintothebackgroundoftheimage.Thepronouncedblackborderistheresultofpaddingtheborderoftheoriginalimagewith0’s(black)andthentrimmingoffthepaddedarea.ExampletoshowtheeffectsofdifferentmasksizeonimageappearanceMasksize=3,5,9,15,35Lecture7:Chapter3SpatialDomainEnhancementThebest-knownexampleinthiscategoryisthemedianfilter(中值滤波器),whichreplacesthevalueofthecenterpixelbythemedianofthegraylevelsintheneighborhoodofthatpixel.Medianfiltersareparticularlyeffectiveinthepresenceofimpulsenoise,alsocalledsalt-and-peppernoise(椒盐噪声).DefinitionofmedianfilterLecture7:Chapter3SpatialDomainEnhancementIllustrationofMedianfilterLecture7:Chapter3SpatialDomainEnhancementDefinitionofisotropicfilters:Theresponseisindependentofthedirectionofthediscontinuitiesintheimagetowhichthefilterisapplied.Isotropicfiltersarerotationinvariant,inthesensethatrotatingtheimageandthenapplyingthefiltergivesthesameresultasapplyingthefiltertotheimagefirstandthenrotatingtheresult.ConceptofRotationInvariabilityLecture7:Chapter3SpatialDomainEnhancementDefinition:highlightfinedetailinanimageortoenhancedetailthathasbeenblurred.Itistheoppositeofaveraging.Basicthinking:sinceaveragingisanalogoustointegration,itisl