数字图像处理冈萨雷斯课件英文Chapter03空域图像增强

上传人:鲁** 文档编号:592595101 上传时间:2024-09-21 格式:PPT 页数:76 大小:5.81MB
返回 下载 相关 举报
数字图像处理冈萨雷斯课件英文Chapter03空域图像增强_第1页
第1页 / 共76页
数字图像处理冈萨雷斯课件英文Chapter03空域图像增强_第2页
第2页 / 共76页
数字图像处理冈萨雷斯课件英文Chapter03空域图像增强_第3页
第3页 / 共76页
数字图像处理冈萨雷斯课件英文Chapter03空域图像增强_第4页
第4页 / 共76页
数字图像处理冈萨雷斯课件英文Chapter03空域图像增强_第5页
第5页 / 共76页
点击查看更多>>
资源描述

《数字图像处理冈萨雷斯课件英文Chapter03空域图像增强》由会员分享,可在线阅读,更多相关《数字图像处理冈萨雷斯课件英文Chapter03空域图像增强(76页珍藏版)》请在金锄头文库上搜索。

1、Digital Image ProcessingDigital Image ProcessingChapter 3: Chapter 3: Image Enhancement in the Image Enhancement in the Spatial DomainSpatial Domain15 June 200715 June 2007Spatial Domain Spatial Domain What is spatial domain The space where all pixels form an image In spatial domain we can represent

2、 an image by f(x,y)where x and y are coordinates along x and y axis with respect to an origin There is duality between Spatial and Frequency DomainsImages in the spatial domain are pictures in the xy planewhere the word “distance” is meaningful.Using the Fourier transform, the word “distance” is los

3、t but the word “frequency” becomes alive.Image EnhancementImage EnhancementImage Enhancement means improvement of images to be suitable for specific applications. Example: Note: each image enhancement technique that is suitable for one application may not be suitable for other applications.(Images f

4、rom Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Image Enhancement ExampleImage Enhancement ExampleOriginal imageEnhanced image using Gamma correction(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.= Image enhancement using

5、processes performed in the Spatial domain resulting in images in the Spatial domain.We can written asImage Enhancement in the Spatial DomainImage Enhancement in the Spatial Domainwhere f(x,y) is an original image, g(x,y) is an output and T is a function defined in the area around (x,y)Note: T may ha

6、ve one input as a pixel value at (x,y) only ormultiple inputs as pixels in neighbors of (x,y) depending in each function. Ex. Contrast enhancement uses a pixel value at (x,y) only for an input while smoothing filte use several pixels around (x,y) as inputs.Types of Image Enhancement in the Spatial D

7、omainTypes of Image Enhancement in the Spatial Domain- Single pixel methods- Gray level transformations Example- Historgram equalization- Contrast stretching- Arithmetic/logic operations Examples- Image subtraction- Image averaging- Multiple pixel methodsExamplesSpatial filtering - Smoothing filters

8、- Sharpening filtersGray Level TransformationGray Level TransformationTransforms intensity of an original image into intensity of an output image using a function:where r = input intensity and s = output intensityExample: Contrast enhancement(Images from Rafael C. Gonzalez and Richard E. Wood, Digit

9、al Image Processing, 2nd Edition.Image NegativeImage NegativeWhiteBlackInput intensityOutput intensityOriginaldigitalmammogramL = the number of gray levels 0L-1L-1Negativedigitalmammogram(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.BlackWhiteLog Transfor

10、mationsLog TransformationsFourierspectrumLog Tr. ofFourierspectrumApplication(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Power-Law TransformationsPower-Law Transformations(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd

11、 Edition.Power-Law Transformations : Power-Law Transformations : Gamma Correction ApplicationGamma Correction ApplicationDesired imageImage displayed atMonitorAfterGammacorrection(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Image displayed atMonitorPower

12、-Law Transformations : Power-Law Transformations : Gamma Correction ApplicationGamma Correction ApplicationMRI Image after Gamma Correction(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Power-Law Transformations : Power-Law Transformations : Gamma Correcti

13、on ApplicationGamma Correction ApplicationAriel imagesafter GammaCorrection(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Contrast StretchingContrast StretchingBefore contrast enhancementAfter Contrast means the difference between the brightest and darkest

14、 intensities(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.How to know where the contrast is enhanced ? How to know where the contrast is enhanced ? Notice the slope of T(r)- if Slope 1 Contrast increases- if Slope 1 Contrast decrease- if Slope = 1 no chan

15、geDrDsSmaller Dr yields wider Ds= increasing Contrast (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Gray Level SlicingGray Level Slicing(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Bit-plane SlicingBit-plane S

16、licingBit 7Bit 6Bit 2Bit 1Bit 5Bit 3(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.HistogramHistogramHistogram = Graph of population frequencies Grades of the course 178 xxxHistogram of an ImageHistogram of an Image pixel pixel= graph of no. of pixels vs i

17、ntensities(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Bright image has histogram on the rightDark image has histogram on the leftHistogram of an Image (cont.)Histogram of an Image (cont.)low contrast image has narrow histogram(Images from Rafael C. Gonz

18、alez and Richard E. Wood, Digital Image Processing, 2nd Edition.high contrast image has wide histogramHistogram ProcessingHistogram Processing = intensity transformation based on histogram information to yield desired histogram - Histogram equalization - Histogram matchingTo make histogram distribut

19、ed uniformlyTo make histogram as the desireMonotonically Increasing FunctionMonotonically Increasing Function= Function that is only increasing or constantProperties of Histogram processing function1. Monotonically increasing function2. Probability Density FunctionProbability Density Functionand rel

20、ation between s and r isHistogram is analogous to Probability Density Function (PDF) which represent density of populationLet s and r be Random variables with PDF ps(s) and pr(r ) respectivelyWe getHistogram EqualizationHistogram EqualizationLetWe get!Histogram EqualizationHistogram EqualizationForm

21、ula in the previous slide is for a continuous PDFFor Histogram of Digital Image, we usenj = the number of pixels with intensity = jN = the number of total pixelsHistogram Equalization ExampleHistogram Equalization ExampleIntensity# pixels0201522531041555610710Total100Accumulative Sum of Pr20/100 = 0

22、.2(20+5)/100 = 0.25(20+5+25)/100 = 0.5(20+5+25+10)/100 = 0.6(20+5+25+10+15)/100 = 0.75(20+5+25+10+15+5)/100 = 0.8(20+5+25+10+15+5+10)/100 = 0.9(20+5+25+10+15+5+10+10)/100 = 1.01.0Histogram Equalization Example (cont.)Histogram Equalization Example (cont.)Intensity (r)No. of Pixels(nj)Acc Sum of PrOu

23、tput valueQuantized Output (s)0200.20.2x7 = 1.41150.250.25*7 = 1.7522250.50.5*7 = 3.533100.60.6*7 = 4.244150.750.75*7 = 5.255550.80.8*7 = 5.666100.90.9*7 = 6.367101.01.0x7 = 77Total100Histogram EqualizationHistogram Equalization(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Proce

24、ssing, 2nd Edition.Histogram Equalization (cont.)Histogram Equalization (cont.)(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Histogram Equalization (cont.)Histogram Equalization (cont.)(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Pro

25、cessing, 2nd Edition.Histogram Equalization (cont.)Histogram Equalization (cont.)(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Histogram Equalization (cont.)Histogram Equalization (cont.)OriginalimageAfter histogram equalization, the imagebecome a low con

26、trast image(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Histogram MatchingHistogram Matching : Algorithm: AlgorithmConcept : from Histogram equalization, we haveWe get ps(s) = 1We want an output image to have PDF pz(z)Apply histogram equalization to pz(z

27、), we getWe get pv(v) = 1Since ps(s) = pv(v) = 1 therefore s and v are equivalentTherefore, we can transform r to z by rT( )sG-1( )zTo transform image histogram to be a desired histogramHistogram Matching : Algorithm (cont.)Histogram Matching : Algorithm (cont.)s = T(r)v = G(z)z = G-1(v)1234(Images

28、from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Histogram Matching ExampleHistogram Matching ExampleIntensity( s )# pixels0201522531041555610710Total100Input imagehistogramIntensity ( z )# pixels0511021532042051561075Total100Desired HistogramExampleUser defineOrigi

29、naldatar(nj)SPrs0200.21150.2522250.533100.644150.755550.866100.967101.07Histogram Matching Example Histogram Matching Example (cont.)(cont.)1. Apply Histogram Equalization to both tablesz(nj)SPzv050.0501100.1512150.323200.544200.755150.8566100.957751.07sk = T(rk)vk = G(zk)rs0112233445566677Histogram

30、 Matching Example Histogram Matching Example (cont.)(cont.)2. Get a mapvz0011224354657677sk = T(rk)zk = G-1(vk)r sv zs vWe getr z0112223344556576z # Pixels0012023031041551561070 Actual Output HistogramHistogram Matching Example (cont.)Histogram Matching Example (cont.)Desired histogramTransfer funct

31、ionActual histogram(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Histogram Matching Example (cont.)Histogram Matching Example (cont.)OriginalimageAfterhistogram equalizationAfterhistogram matchingLocal Enhancement : Local Histogram EqualizationLocal Enhan

32、cement : Local Histogram EqualizationConcept: Perform histogram equalization in a small neighborhoodOrignal imageAfter Hist Eq.After Local Hist Eq.In 7x7 neighborhood(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Local Enhancement : Local Enhancement : His

33、togram Statistic for Image EnhancementHistogram Statistic for Image EnhancementWe can use statistic parameters such as Mean, Variance of Local area for image enhancementImage of tungsten filament taken usingAn electron microscopeIn the lower right corner, there is afilament in the background which i

34、svery dark and we want this to be brighter.We cannot increase the brightness of the whole image since the white filament will be too bright.(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Local EnhancementLocal EnhancementExample: Local enhancement for this

35、 taskOriginal imageLocal Varianceimage Multiplicationfactor(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Local EnhancementLocal EnhancementOutput image(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Logic Operati

36、onsLogic OperationsANDORResult Region of InterestImage maskOriginalimageApplication:Crop areas of interest(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Arithmetic Operation: SubtractionArithmetic Operation: SubtractionError imageApplication: Error measure

37、ment(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Arithmetic Operation: Subtraction (cont.)Arithmetic Operation: Subtraction (cont.)Application: Mask mode radiography in angiography work(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Pr

38、ocessing, 2nd Edition.Arithmetic Operation: Image AveragingArithmetic Operation: Image AveragingApplication : Noise reductionAveraging results in reduction of Noise varianceDegraded image(noise)Image averaging(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

39、Arithmetic Operation: Image Averaging (cont.)Arithmetic Operation: Image Averaging (cont.)(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Sometime we need to manipulate values obtained from neighboring pixelsExample: How can we compute an average value of

40、pixelsin a 3x3 region center at a pixel z?446761922275226445212133429577358222Pixel zImageBasics of Spatial FilteringBasics of Spatial Filtering446761922275226445212133429577358222Pixel zStep 1. Selected only needed pixels467691334Basics of Spatial Filtering (cont.)Basics of Spatial Filtering (cont.

41、)467691334Step 2. Multiply every pixel by 1/9 and then sum up the values111111111XMask orWindow orTemplateBasics of Spatial Filtering (cont.)Basics of Spatial Filtering (cont.)Question: How to compute the 3x3 average values at every pixels?446761922275226445212133429577Solution: Imagine that we have

42、a 3x3 window that can be placedeverywhere on the imageMasking WindowBasics of Spatial Filtering (cont.)Basics of Spatial Filtering (cont.)4.3Step 1: Move the window to the first location where we want to compute the average value and then select only pixels inside the window.446761922275226445212133

43、429577Step 2: Computethe average valueSub image pOriginal image419223297Output imageStep 3: Place theresult at the pixelin the output image Step 4: Move the window to the next location and go to Step 2Basics of Spatial Filtering (cont.)Basics of Spatial Filtering (cont.) The 3x3 averaging method is

44、one example of the mask operation or Spatial filtering.w The mask operation has the corresponding mask (sometimes called window or template).w The mask contains coefficients to be multiplied with pixelvalues.w(2,1) w(3,1)w(3,3)w(2,2)w(3,2)w(3,2)w(1,1)w(1,2)w(3,1)Mask coefficients111111111Example : m

45、oving averaging The mask of the 3x3 moving average filter has all coefficients = 1/9Basics of Spatial Filtering (cont.)Basics of Spatial Filtering (cont.)The mask operation at each point is performed by:1. Move the reference point (center) of mask to the location to be computed 2. Compute sum of pro

46、ducts between mask coefficients and pixels in subimage under the mask.p(2,1)p(3,2)p(2,2)p(2,3)p(2,1)p(3,3)p(1,1)p(1,3)p(3,1)Subimagew(2,1) w(3,1)w(3,3)w(2,2)w(3,2)w(3,2)w(1,1)w(1,2)w(3,1)Mask coefficientsMask frameThe reference pointof the maskBasics of Spatial Filtering (cont.)Basics of Spatial Fil

47、tering (cont.)The spatial filtering on the whole image is given by:1.Move the mask over the image at each location.2.Compute sum of products between the mask coefficeints3.and pixels inside subimage under the mask.3.Store the results at the corresponding pixels of the 4.output image.4.Move the mask

48、to the next location and go to step 25.until all pixel locations have been used.Basics of Spatial Filtering (cont.)Basics of Spatial Filtering (cont.)Examples of Spatial Filtering MasksExamples of the masksSobel operators011002-1-2-1-2 -11020-1011111111113x3 moving average filter-1 -1-18-1-1-1-1-13x

49、3 sharpening filterSmoothing Linear Filter : Moving AverageSmoothing Linear Filter : Moving AverageApplication : noise reductionand image smoothingDisadvantage: lose sharp details(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Smoothing Linear Filter (cont.

50、)Smoothing Linear Filter (cont.)(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Order-Statistic FiltersOrder-Statistic FilterssubimageOriginal imageMoving windowStatistic parametersMean, Median, Mode, Min, Max, Etc.Output imageOrder-Statistic Filters: Media

51、n FilterOrder-Statistic Filters: Median Filter(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Sharpening Spatial FiltersSharpening Spatial FiltersThere are intensity discontinuities near object edges in an image(Images from Rafael C. Gonzalez and Richard E.

52、 Wood, Digital Image Processing, 2nd Edition.Laplacian Sharpening : How it worksLaplacian Sharpening : How it worksIntensity profile1st derivative2nd derivativep(x)EdgeLaplacian Sharpening : How it works (cont.)Laplacian Sharpening : How it works (cont.) Laplacian sharpening results in larger intens

53、ity discontinuity near the edge.p(x)Laplacian Sharpening : How it works (cont.)Laplacian Sharpening : How it works (cont.)p(x)Before sharpeningAfter sharpeningLaplacian MasksLaplacian Masks-1 -1-18-1-1-1-1-1-1004-1-10-10111-811111100-411010Application: Enhance edge, line, pointDisadvantage: Enhance

54、noiseUsed for estimating image LaplacianorThe center of the mask is positiveThe center of the mask is negativeLaplacian Sharpening ExampleLaplacian Sharpening Examplep(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Laplacian Sharpening (cont.)Laplacian Shar

55、pening (cont.)Mask for1 11-811111-1 -1-19-1-1-1-1-1-1 005-1-10-101 00-411010orMask foror(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.Unsharp Masking and High-Boost FilteringUnsharp Masking and High-Boost Filtering-1-1-1k+8-1-1-1-1-1-100k+4-1-10-10Equatio

56、n:The center of the mask is negativeThe center of the mask is positiveUnsharp Masking and High-Boost Filtering (cont.)Unsharp Masking and High-Boost Filtering (cont.)(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.First Order DerivativeFirst Order Derivativ

57、e2040608010012014016018020000.51050100150200-0.200.205010015020000.10.2Intensity profile1st derivative2nd derivativep(x)EdgesFirst Order Partial Derivative:First Order Partial Derivative:Sobel operators011002-1-2-1-2-11020-101PFirst Order Partial Derivative: Image GradientFirst Order Partial Derivat

58、ive: Image GradientGradient magnitudeA gradient image emphasizes edges(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.First Order Partial Derivative: Image GradientFirst Order Partial Derivative: Image GradientPImage Enhancement in the Spatial Domain : Imag

59、e Enhancement in the Spatial Domain : Mix things up !+-ASharpeningsmoothBECD(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.ECMultiplicationFImage Enhancement in the Spatial Domain : Image Enhancement in the Spatial Domain : Mix things up !ASGHPowerLaw Tr.(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 工作计划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号