1、Digitizing the coordinate values is called sampling.Image sampling and quantizationDigitizing the amplitude values is called quantization.Lecture 2:Chapter 2:Digital Image FundamentalsConcept of false contouring:ridge-like structures caused by the use of an insufficient number of gray levels in smoo
2、th areas of a digital image.Rule of thumb:images of size 256256 pixels and 64 gray levels are about the smallest images that can be expected to be reasonably free of objectionable sampling checker-boards and false contouring.Lecture 2:Chapter 2:Digital Image FundamentalsProblems associated with reso
3、lution reductionIllustration of sampling frequency less than signal frequencyIf the function is undersampled,then a phenomenon called aliasing corrupts the sampled image.Lecture 3:Chapter 2:Digital Image FundamentalsA set of pixels all of which are 4-connected to each other is called a 4-component;i
4、f all the pixels are 8-connected the set is an 8-component.4-component4-componentOnly one 8-component but two 4-componentLecture 3:Chapter 2:Digital Image Fundamentals8-componentIllustration of different connected components0 0 0 0 0 00 1 1 0 0 00 1 1 0 0 00 0 0 1 1 00 0 0 1 1 0How many connected co
5、mponents for the following image?Two objects for 4-connected neighborhoodone object for 8-connected neighborhoodLecture 3:Chapter 2:Digital Image FundamentalsConnected components exercise1.The Euclidean distance between p and q is defined as:Different ways of measuring distance2122)()(),(tysxqpDeUsi
6、ng this method,the pixels having a distance less than or equal to some value r from(x,y)are the points contained in a disk of radius r centered at(x,y).pqLecture 3:Chapter 2:Digital Image Fundamentals2.The D4 distance(also called city block distance)between p and q is defined as:Using this method,th
7、e pixels having a D4 distance from(x,y)less than or equal to some value r form a diamond centered at(x,y).For example,the pixels with D4 distance 2 from(x,y)form the following contours of constant distance:tysxqpD),(4The pixels with D4=1 are the 4-neighbors of(x,y).2211221022212D4 distanceDifferent
8、ways of measuring distance contLecture 3:Chapter 2:Digital Image Fundamentals3.The D8 distance(also called chessboard distance)between p and q is defined as:D8(p,q)=max(x-s,y-t)2222221112210122111222222D8 distanceDifferent ways of measuring distance contThe pixels with D8=1 are the 8-neighbors of(x,
9、y).Lecture 3:Chapter 2:Digital Image Fundamentalsp2pp1p4p3Assume that p,p2,and p4 have value 1 and that p1 and p3 can have a value 0 or 1.For V=1,solve for Dm distance between p and p4.Solution:If p1 and p3 are 0,then Dm is 2.If p1 is 1,p3 are 0,then Dm becomes 3.Similarly,if p3 is 1 and p1 is 0,Dm
10、also is 3.Finally,if both p1 and p3 are 1,Dm is 4.Example to illustrate finding Dm distanceLecture 3:Chapter 2:Digital Image FundamentalsCommon functions for enhancementLecture 4:Chapter 3 Spatial Domain Enhancements=cr Where c and are positive constants.Power-law transformationLecture 4:Chapter 3 S
11、patial Domain EnhancementUse of values greater than 1 to reduce the light gray level.Lecture 4:Chapter 3 Spatial Domain EnhancementEnhancement of washed-out imagesIllustration of histogram equalization4x4 image Gray scale=0,9histogram0112233445566789No.of pixelsGray level2332424332352424Lecture 5:Ch
12、apter 3 Spatial Domain Enhancement91609s x 9No.of pixelsGray Level(j)99998.486.163.330000161616161511600000145600876543210kjjn0kjjnns01661611161516161616161616161616Perform histogram equalizationLecture 5:Chapter 3 Spatial Domain EnhancementOutput image Gray scale=0,9Equalized histogram0112233445566
13、789No.of pixels3663838663693838Results after histogram equalizationLecture 5:Chapter 3 Spatial Domain Enhancement 255 194 157 103 15 59 116 202 239 90 155 5 235 234 207 124 209 188 105 3 227 113 45 228 35255=11111111235=11101011188=10111100 155=10011011124=01111100 90 =01011010Bit-plane 7 imageBit-p
14、lane 2 image111100111000Lecture 4:Chapter 3 Spatial Domain EnhancementA simple bit-plane example17241815235714164613202210121921311182529111121111910677101111131161113202210121921311182529Original imagemaskFiltered image10Lecture 7:Chapter 3 Spatial Domain EnhancementIllustration of a weighted avera
15、ge filterTechnique:Excessive blurring is generally used to eliminate small objects in the image.They will be blended into the background of the image.The pronounced black border is the result of padding the border of the original image with 0s(black)and then trimming off the padded area.Example to s
16、how the effects of different mask size on image appearance Mask size=3,5,9,15,35Lecture 7:Chapter 3 Spatial Domain EnhancementThe best-known example in this category is the median filter(中值滤波器),which replaces the value of the center pixel by the median of the gray levels in the neighborhood of that
17、pixel.Median filters are particularly effective in the presence of impulse noise,also called salt-and-pepper noise(椒盐噪声).Definition of median filterLecture 7:Chapter 3 Spatial Domain EnhancementIllustration of Median filterLecture 7:Chapter 3 Spatial Domain EnhancementDefinition of isotropic filters
18、:The response is independent of the direction of the discontinuities in the image to which the filter is applied.Isotropic filters are rotation invariant,in the sense that rotating the image and then applying the filter gives the same result as applying the filter to the image first and then rotatin
19、g the result.Concept of Rotation InvariabilityLecture 7:Chapter 3 Spatial Domain EnhancementDefinition:highlight fine detail in an image or to enhance detail that has been blurred.It is the opposite of averaging.Basic thinking:since averaging is analogous to integration,it is logic to conclude that
20、sharpening could be accomplished by spatial differentiation.Image differentiation enhances edges and other discontinuities(such as noise)and deemphasizes areas with slowly varying gray-level values.Sharpening spatial filters(锐化滤波器)Lecture 7:Chapter 3 Spatial Domain EnhancementIt is common practice t
21、o multiply the input image function by(-1)x+y prior to computing the Fourier transform./2)/2,(1)(,(The operation means to shift the origin of F(u,v)from(0,0)to coordinates(M/2,N/2).Shift factor(-1)x+yLecture 8:Chapter 4 Frequency Domain EnhancementThe illumination component of an image generally is
22、characterized by slow special variations,while the reflectance component tends to vary abruptly,particularly at the junctions of dissimilar objects.The above characteristics lead to associating the low frequencies of the Fourier transform of the logarithm of an image with illumination and the high f
23、requencies with reflectance.Lecture 10:Chapter 4 Frequency Domain EnhancementComponents characteristics1.Most of the sharp detail information in the picture is contained in the 8%power removed by the filter.2.Images c)through e)are characterized by“ringing”,which becomes finer in texture as the amou
24、nt of high-frequency content removed decreases.This ringing behavior is a characteristic of ideal filters.3.The last image is quite close to the original,this indicates that little edge information is contained in the upper 0.5%of the spectrum power in this particular case.Summarizing characteristic
25、sLecture 9:Chapter 4 Frequency Domain Enhancementfig4_12_demo.mCharacteristics of spatial filter h(x,y):1.A dominant component at the origin which is primarily responsible for blurring.2.Concentric,circular components about the center components which are responsible primarily for the ringing charac
26、teristic of ideal filters.Convolution process copies h(x,y)at the location of each impulse.Note how the original points are blurred,note also that ringing was introduced during the same process.Pictorial illustration to show filtering in frequency domain as a convolution in the spatial domainLecture
27、 9:Chapter 4 Frequency Domain Enhancementfig4_13_demo.mWith n=2 and D0 equal to 5,15,30,80,and 230,we noticed a different results as compared to applying the ideal filter.1.A smooth transition in blurring as a function of increasing cutoff frequency.2.No ringing is visible in any of the images.A But
28、terworth filter of order 1 has no ringing.Ringing generally is imperceptible in filters of order 2,but can become a significant factor in filters of higher order.Results of applying the BLPFLecture 9:Chapter 4 Frequency Domain Enhancementfig4_15_demo.mResults of applying the GLPF Compare with BLPF o
29、f order 2,the results are quite comparable in general,and we are assured of no ringing in the case of GLPF.This characteristics is especially important in medical imaging,where any type of artifact is not acceptable.Lecture 9:Chapter 4 Frequency Domain Enhancementfig4_18_demo.mImplementing the Fouri
30、er transformProperties of Fourier transform(review)1.Translation(位移性质),(),(00)/(200)/(20000),(),(Lecture 10:Chapter 4 Frequency Domain EnhancementApplication of translation propertyWhen u0=M/2 and v0=N/2,it follows thatyxyxjNyvMxujee)1()()/(200In this case)2/,2/()1)(,(NvMuFyxfyxsimilarlyvuvuFNyMxf)1
31、)(,()2/,2/(Lecture 10:Chapter 4 Frequency Domain EnhancementThe discrete Fourier transform1010)/(2),(1),(MxNyNvyMuxjeyxfMNvuFcan be expressed in the separable form10/210/210/2),(),(111),(MxMuxjNyNvyjMxMuxjevxFeyxfeMNMvuFLecture 10:Chapter 4 Frequency Domain EnhancementSeparabilityPeriodicity and con
32、jugate symmetryThe discrete Fourier transform has the following periodicity properties:F(u,v)=F(u+M,v)=F(u,v+N)=F(u+M,v+N)The inverse transform also is periodic:f(x,y)=f(x+M,y)=f(x,y+N)=f(x+M,y+N)Lecture 10:Chapter 4 Frequency Domain EnhancementThe idea of conjugate symmetry was introduced in previo
33、us section,and is repeated here for convenience:F(u,v)=F*(-u,-v)The spectrum also is symmetric about the origin:),(),(Conjugate symmetryLecture 10:Chapter 4 Frequency Domain EnhancementThe need for padding(补零)Some important facts that need special attention:1.For DFT,the periodicity is a mathematica
34、l by-product of the way in which the discrete Fourier transform pair is defined.Periodicity is part of the process,and it cannot be ignored.2.If periodicity issue is not handled properly,it will give incorrect results of some missing data.3.The following example shows details of need for padding.Lec
35、ture 10:Chapter 4 Frequency Domain EnhancementSolution to the periodicity problemAssume that f and h consist of A and B points,respectively.We append zeros to both functions so that they have identical periods,denoted by P.The above procedure yields extended,or padded,functions given by:fe(x)=f(x)0
36、x A10A x Phe(x)=h(x)0 x B10B x PIt can be shown that if P|Rj|,for all ji,that point is said to be more likely associated with a line in the direction of mask i.Lecture 19:Chapter 10 Image Segmentation-plane problem of using equation y=ax+b is that value of a is infinite for a vertical line.To avoid
37、the problem,use normal line equation x cos+y sin =to represent a line instead.vertical line has =90 with equals to the positive y-intercept or =-90 with equals to the negative y-intercept.x cos+y sin=-plane=90 measured with respect to x-axisLecture 20:Chapter 10 Image SegmentationRegion-Based Segmen
38、tation Basic Formulation jfor i FALSE)RP(Re,.,n,i TRUE)P(Rd ji RRc,.,n,i RbRRajiijiiin )(21for )(j,and i allfor )(21 region,connected a is )()(1iP(Ri)is a logical predicate property defined over the points in set Riex.P(Ri)=TRUE if all pixel in Ri have the same gray levelLecture 20:Chapter 10 Image
39、SegmentationRegion Growing start with a set of“seed”points growing by appending to each seed those neighbors that have similar properties such as specific ranges of gray levelLecture 20:Chapter 10 Image SegmentationRegion Growingselect all seed points with gray level 255criteria:1.the absolute gray-
40、level difference between any pixel and the seed has to be less than 652.the pixel has to be 8-connected to at least one pixel in that region(if more,the regions are merged)Lecture 20:Chapter 10 Image SegmentationRegion splitting and mergingQuadtree1.Split into 4 disjoint quadrants any region Ri for
41、whichP(Ri)=FALSE2.Merge any adjacent region Rj and Rk for which P(Ri Rk)=TRUE3.Stop when no further merging or splitting is possible.Lecture 20:Chapter 10 Image SegmentationChain codes Chain codes are sequence of direction codes when we walk around the boundary of an object.based on 4 or 8 connectiv
42、ity,the direction code is shown below:Lecture 21:Chapter 11 Representation&DescriptionChain codesLecture 21:Chapter 11 Representation&DescriptionNormalized chain codes treat the chain code as a circular sequence of direction numbers and redefine the starting point so that the resulting sequence of n
43、umbers forms an integer of minimum magnitude;or use rotation of the first difference chain code instead difference=the number of direction changes in a counterclockwise direction ex.code 10103322 normalized code 01033221 difference code is 3133030 circular difference chain code:33133030Lecture 21:Ch
44、apter 11 Representation&DescriptionShape numbersTo get shape number,rotate the difference to minimize the magnitude of it.Lecture 22:Chapter 11 Representation&DescriptionBoundary Descriptors length of a boundary diameters eccentricity curvature shape numbers Fourier descriptorsLecture 22:Chapter 11
45、Representation&DescriptionRegional Descriptors area perimeter compactness topological descriptors textureLecture 22:Chapter 11 Representation&DescriptionPseudo color image processingLecture 25:Chapter 6 Color Image ProcessingPseudocolor image processing consists of assigning colors to gray values ba
46、sed on a specified criterion.The method that maps a color image to another color image so as to enhance image contrast is called false color enhancement.The principal use of pseudocolor is for human visualization and interpretation of gray-scale events in an image or sequence of images.This is called pseudocolor enhancement(assigns colors to monochrome images).
侵权处理QQ:3464097650--上传资料QQ:3464097650
【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。