Transcript Document
Digital Image Processing Session 3 Dr. Ghassabi [email protected] Tehran shomal University Spring 2015 1 Outline • • • • • • • • • • • Introduction Digital Image Fundamentals Intensity Transformations and Spatial Filtering Filtering in the Frequency Domain Image Restoration and Reconstruction Color Image Processing Wavelets and Multi resolution Processing Image Compression Morphological Operation Object representation Object recognition 2 Outline Chapter 3 • • • • • • • Background Some Basic Intensity Transformation Functions Histogram Processing Fundamentals of Spatial Filtering Smoothing Spatial Filters Sharpening Spatial Filters Combining Spatial Enhancement Tools Image Enhancement • Methods – Spatial Domain: • Linear • Nonlinear – Frequency Domain: • Linear • Nonlinear IE in Spatial Domain g x, y T f x, y Transformation • • For 11 neighborhood: s T r – Contrast Enhancement/Stretching/Point process For w w neighborhood: – Filtering/Mask/Kernel/Window/Template Processing IE in Spatial Domain Negative nth root Log Identity nth power Inverse Log Input gray level, r Some Basic Intensity Transformation Functions Image Negatives • Image Negatives: s L 1 r Image Negatives y L 0 y=L-x L x Log Transformation Log Transformation Range Compression y y c log10 (1 x) 0 L x c=100 Power-Law(Gamma) Transformations s c r Power-Law(Gamma) Transformations Gamma Correction: r1.8 r 1.8 2.5 1 2.5 r1.8 2.5 Power-Law(Gamma) Transformations Original =0.6 =0.4 =0.3 Power-Law(Gamma) Transformations (Effect of decreasing gamma) Original =3 =4 =5 Power-Law(Gamma) Transformations (Effect of decreasing gamma) Piecewise-Linear Transformation Functions • Contrast Stretching • Contrast slicing • Bite-Plane slicing Contrast Stretching y x y ( x a ) ya ( x b) y b 0 xa a xb b xL yb ya 0 a b a 50, b 150, 0.2, 2, 1, ya 30, yb 200 L x Contrast stretching Original C. S. THR. Contrast Stretching Clipping y 0 y ( x a) (b a ) 0 xa a xb bxL 0 a b a 50, b 150, 2 L x Gray-level Slicing Gray-level Slicing Gray-level Slicing Gray-level Slicing Gray-level Slicing Bit-plane Slicing Highlighting the contribution made to total image appearance by specific bits Suppose each pixel is represented by 8 bits Higher-order bits contain the majority of the visually significant data Useful for analyzing the relative importance played by each bit of the image Bit-plane Slicing Bit-plane Slicing The (binary) image for bit-plane 7 can be obtained by processing the input image with a thresholding gray-level transformation. Map all levels between 0 and 127 to 0 Map all levels between 129 and 255 to 255 Bit-plane Slicing - Fractal Image Bit-plane Slicing - Fractal Image Bit-plane 7 Bit-plane 6 Bit-plane 5 Bit-plane 4 Bit-plane 3 Bit-plane 2 Bit-plane 1 Bit-plane 0 Bit-plane Slicing Histogram Processing Enhancement based on statistical Properties: Local, Global Histogram Definition h(rk)=nk Where rk is the kth gray level and nk is the number of pixels in the image having gray level rk Normalized histogram: P(rk)=nk/n Histogram of an image represents the relative frequency of occurrence of various gray levels in the image Histogram Examples • Histogram Visual Meaning: – Dark – Bright – Low Contrast – High Contrast Histogram Example Histogram Example Histogram Modification • • • Histogram Stretching Histogram Shrink Histogram Sliding Histogram Stretching Histogram Stretching Histogram Stretching Histogram Shrinking Histogram Shrinking Histogram Sliding