1. Trang chủ
  2. » Công Nghệ Thông Tin

Lecture 03,04,05 intensity transformation and spatial filtering

46 88 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 46
Dung lượng 3 MB

Nội dung

Intensity transformation and spatial filtering Digital Image Processing Lecture – Intensity Transformation& Spatial Filtering Lecturer: Ha Dai Duong Faculty of Information Technology I Introduction „ Spatial Domain vs Transform Domain ‰ Spatial Domain „ ‰ Image plane itself, directly process the intensity values of the image plane Transform (Frequency) domain „ Process the transform coefficients, not directly process the intensity values of the image plane Digital Image Processing Intensity transformation and spatial filtering I Introduction „ Spatial Domain Process g ( x, y ) = T [ f ( x, y )]) f ( x, y ) : input image g ( x, y ) : output image T : an operator on f defined over a neighborhood of point ( x, y ) Digital Image Processing I Introduction „ Spatial Domain Process Digital Image Processing Intensity transformation and spatial filtering II Intensity transformation function Intensity transformation function s = T (r ) Digital Image Processing II Intensity transformation function „ Some basic Functions Digital Image Processing intensity transformation Intensity transformation and spatial filtering II.1 Negative Image negatives s = L −1− r Digital Image Processing II.1 Negative Small lesion Digital Image Processing Intensity transformation and spatial filtering II.2 Log Transform Log Transformations s = c log(1 + r ) Digital Image Processing II.2 Log Transform Digital Image Processing 10 Intensity transformation and spatial filtering II.3 Power – Law s = cr γ Digital Image Processing 11 II.3 Power – Law Digital Image Processing 12 Intensity transformation and spatial filtering II.3 Power – Law Digital Image Processing 13 II.4 Piecewise-Linear Transform Contrast Stretching „ ‰ Expands the range of intensity levels in an image so that it spans the full intensity range of the recording medium or display device Intensity-level Slicing „ ‰ Highlighting a specific range of intensities in an image often is of interest Digital Image Processing 14 Intensity transformation and spatial filtering II.4 Piecewise-Linear Transform… Digital Image Processing 15 Digital Image Processing 16 Intensity transformation and spatial filtering II.5 Bit – Plane Slicing Digital Image Processing 17 II.5 Bit – Plane Slicing Digital Image Processing 18 Intensity transformation and spatial filtering III Histogram processing „ „ „ „ Histogram Equalization Histogram Matching Local Histogram Processing Using Histogram Statistics Enhancement Digital Image Processing for Image 19 III Histogram processing Histogram h(rk ) = nk rk is the k th intensity value nk is the number of pixels in the image with intensity rk nk MN nk : the number of pixels in the image of Normalized histogram p (rk ) = size M × N with intensity rk Digital Image Processing 20 10 Intensity transformation and spatial filtering V Spatial Filtering „ Example ‰ M=3, N=3 3x3 ‰ Or M=5, N=5 5x5 … Digital Image Processing 63 V.1 Smoothing Filters Smoothing filters are used for blurring and for noise reduction Blurring is used in removal of small details and bridging of small gaps in lines or curves Smoothing spatial filters include linear filters and nonlinear filters Digital Image Processing 64 32 Intensity transformation and spatial filtering V.1 Smoothing Filters „ Linear filters The general implementation for filtering an M × N image with a weighted averaging filter of size m × n is given a g ( x, y ) = b ∑ ∑ w(s, t ) f ( x + s, y + t ) s =− a t =− b a b ∑ ∑ w(s, t ) s =− a t =− b where m = 2a + 1, n = 2b + Digital Image Processing 65 V.1 Smoothing Filters „ Linear filters ‰ Averaging Filter Masks Digital Image Processing 66 33 Intensity transformation and spatial filtering V.1 Smoothing Filters a b c d e f Example „ Averaging Filter Masks a) original image 500x500 pixel b) - f) results of smoothing with square averaging filter masks of size n = 3, 5, 9, 15 and 35, respectively ‰ Note: ‰ „ „ Big mask is used to eliminate small objects from an image The size of the mask establishes the relative size of the objects that will be blended with the background 67 Digital Image Processing V.1 Smoothing Filters „ Example original image result after smoothing with 15x15 averaging mask result of thresholding we can see that the result after smoothing and thresholding, the remains are the largest and brightest objects in the image Digital Image Processing 68 34 Intensity transformation and spatial filtering V.1 Smoothing Filters Order-Statistics Filters (Nonlinear Filters) „ The response is based on ordering (ranking) the pixels contained in the image area encompassed by the filter Example ‰ ‰ „ „ „ ‰ Median filter : R = median{zk |k = 1,2,…,n x n} Max filter : R = max{zk |k = 1,2,…,n x n} Min filter : R = min{zk |k = 1,2,…,n x n} Note: n x n is the size of the mask Digital Image Processing 69 V.1 Smoothing Filters Median Filter „ ‰ ‰ ‰ Median: X= {x1,x2,…, x2b+1}, x is called the median of X if x greater than or equal b elements and less than or equal b other elements in X; For example: X={3,2,3,2,3,4,5,6,5} (b=4) -> Median is Peplaces the value of a pixel by the median of the gray levels in the neighborhood of that pixel (the original value of the pixel is included in the computation of the median) Quite popular because for certain types of random noise (impulse impulse noise > salt and pepper noise) noise , they provide excellent noisenoisereduction capabilities, capabilities with considering less blurring than linear smoothing filters of similar size Digital Image Processing 70 35 Intensity transformation and spatial filtering V.1 Smoothing Filters „ Median Filter ‰ Example Digital Image Processing 71 V.2 Sharpening Spatial Filters „ Foundation „ Laplacian Operator „ Unsharp Masking and Highboost Filtering „ Using First-Order Derivatives for Nonlinear Image Sharpening - The Gradient Digital Image Processing 72 36 Intensity transformation and spatial filtering V.2 Sharpening Spatial Filters ‰ The first-order derivative of a one-dimensional function f(x) is the difference ∂f = f ( x + 1) − f ( x) ∂x ‰ The second-order derivative of f(x) as the difference ∂2 f = f ( x + 1) + f ( x − 1) − f ( x) ∂x Digital Image Processing 73 V.2 Sharpening Spatial Filters „ Foundation Digital Image Processing 74 37 Intensity transformation and spatial filtering V.3 Method based on Laplace Operator „ Laplace Operator The second-order isotropic derivative operator is the Laplacian for a function (image) f(x,y) ∂2 f ∂2 f ∇ f = + ∂x ∂y ∂2 f = f ( x + 1, y ) + f ( x − 1, y ) − f ( x, y ) ∂x ∂2 f = f ( x , y + 1) + f ( x , y − 1) − f ( x , y ) ∂y ∇ f = f ( x + 1, y ) + f ( x − 1, y ) + f ( x, y + 1) + f ( x, y − 1) - f ( x, y ) Digital Image Processing 75 V.3 Method based on Laplace Operator „ Masks Digital Image Processing 76 38 Intensity transformation and spatial filtering V.3 Method based on Laplace Operator „ Image sharpening in the way of using the Laplacian: where g(x,y) sharpened image Digital Image Processing 77 V.3 Method based on Laplace Operator „ Example Digital Image Processing 78 39 Intensity transformation and spatial filtering V.4 Unsharp Masking and Highboost Filtering Digital Image Processing 79 V.4 Unsharp Masking and Highboost Filtering Digital Image Processing 80 40 Intensity transformation and spatial filtering V.4 Unsharp Masking and Highboost Filtering Digital Image Processing 81 V.4 Unsharp Masking and Highboost Filtering „ Example Digital Image Processing 82 41 Intensity transformation and spatial filtering V.4 Unsharp Masking and Highboost Filtering „ Example 83 Digital Image Processing V.5 Method based Derivatives (Gradient) on First-Order For function f ( x, y ), the gradient of f at coordinates ( x, y ) is defined as ⎡ ∂f ⎤ ⎡ g x ⎤ ⎢ ∂x ⎥ ∇f ≡ grad( f ) ≡ ⎢ ⎥ = ⎢ ⎥ ⎣ g y ⎦ ⎢ ∂f ⎥ ⎢⎣ ∂y ⎥⎦ The magnitude of vector ∇f , denoted as M ( x, y ) M ( x, y ) = mag(∇f ) = g x + g y Digital Image Processing 84 42 Intensity transformation and spatial filtering V.5 Method based Derivatives (Gradient) on First-Order The magnitude of vector ∇f , denoted as M ( x, y ) M ( x, y ) = mag(∇f ) = g x + g y M ( x, y ) ≈| g x | + | g y | z1 z2 z3 z4 z5 z6 z7 z8 z9 M ( x, y ) =| z8 − z5 | + | z6 − z5 | 85 Digital Image Processing V.5 Method based Derivatives (Gradient) on First-Order Roberts Cross-gradient Operators M ( x, y ) ≈| z9 − z5 | + | z8 − z6 | z1 z2 z3 z4 z5 z6 z7 z8 z9 Digital Image Processing Sobel Operators M ( x, y ) ≈| ( z7 + z8 + z9 ) − ( z1 + z2 + z3 ) | + | ( z3 + z6 + z9 ) − ( z1 + z4 + z7 ) | 86 43 Intensity transformation and spatial filtering V.5 Method based Derivatives (Gradient) on 87 Digital Image Processing V.5 Method based Derivatives (Gradient) „ First-Order on First-Order Example Digital Image Processing 88 44 Intensity transformation and spatial filtering V.6 Combining Spatial Enhancement Methods „ Solve: Laplacian to highlight fine detail Gradient to enhance prominent edges Gray-level transformation to increase the dynamic range of gray levels Digital Image Processing 89 V.6 Combining Spatial Enhancement Methods „ Exampe Digital Image Processing 90 45 Intensity transformation and spatial filtering V.6 Combining Spatial Enhancement Methods „ Exampe Digital Image Processing 91 46 ... Processing I Introduction „ Spatial Domain Process Digital Image Processing Intensity transformation and spatial filtering II Intensity transformation function Intensity transformation function s... Processing 14 Intensity transformation and spatial filtering II.4 Piecewise-Linear Transform… Digital Image Processing 15 Digital Image Processing 16 Intensity transformation and spatial filtering. .. Digital Image Processing II Intensity transformation function „ Some basic Functions Digital Image Processing intensity transformation Intensity transformation and spatial filtering II.1 Negative

Ngày đăng: 01/04/2019, 10:40

TỪ KHÓA LIÊN QUAN