Introduction to Image Processing #5/7
Total Page:16
File Type:pdf, Size:1020Kb
Outline Introduction to Image Processing #5/7 Thierry Geraud´ EPITA Research and Development Laboratory (LRDE) 2006 Thierry Geraud´ Introduction to Image Processing #5/7 Outline Outline 1 Introduction 2 Distributions About the Dirac Delta Function Some Useful Functions and Distributions 3 Fourier and Convolution 4 Sampling 5 Convolution and Linear Filtering 6 Some 2D Linear Filters Gradients Laplacian Thierry Geraud´ Introduction to Image Processing #5/7 Outline Outline 1 Introduction 2 Distributions About the Dirac Delta Function Some Useful Functions and Distributions 3 Fourier and Convolution 4 Sampling 5 Convolution and Linear Filtering 6 Some 2D Linear Filters Gradients Laplacian Thierry Geraud´ Introduction to Image Processing #5/7 Outline Outline 1 Introduction 2 Distributions About the Dirac Delta Function Some Useful Functions and Distributions 3 Fourier and Convolution 4 Sampling 5 Convolution and Linear Filtering 6 Some 2D Linear Filters Gradients Laplacian Thierry Geraud´ Introduction to Image Processing #5/7 Outline Outline 1 Introduction 2 Distributions About the Dirac Delta Function Some Useful Functions and Distributions 3 Fourier and Convolution 4 Sampling 5 Convolution and Linear Filtering 6 Some 2D Linear Filters Gradients Laplacian Thierry Geraud´ Introduction to Image Processing #5/7 Outline Outline 1 Introduction 2 Distributions About the Dirac Delta Function Some Useful Functions and Distributions 3 Fourier and Convolution 4 Sampling 5 Convolution and Linear Filtering 6 Some 2D Linear Filters Gradients Laplacian Thierry Geraud´ Introduction to Image Processing #5/7 Outline Outline 1 Introduction 2 Distributions About the Dirac Delta Function Some Useful Functions and Distributions 3 Fourier and Convolution 4 Sampling 5 Convolution and Linear Filtering 6 Some 2D Linear Filters Gradients Laplacian Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution Sampling Convolution and Linear Filtering Some 2D Linear Filters Filtering Filtering images is a low-level process can be linear or not (!) is often useful either to get “better” data e.g., with enhanced contrast, less noise, etc. or to transform data to make it suitable for further processing Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution Sampling Convolution and Linear Filtering Some 2D Linear Filters New Approach An image is a function. We have sampling: image values are only known at given points 2 Ip with p = (r, c) ∈ N quantization: image values belong to a restricted set for instance [0, 255] for a gray-level with 8 bit encoding An image is a digital signal (contrary: analog). Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution Sampling Convolution and Linear Filtering Some 2D Linear Filters Background This lecture background is digital signal processing. Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Outline 1 Introduction 2 Distributions About the Dirac Delta Function Some Useful Functions and Distributions 3 Fourier and Convolution 4 Sampling 5 Convolution and Linear Filtering 6 Some 2D Linear Filters Gradients Laplacian Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Dirac Delta Function (1/2) The Dirac delta function, denoted by ↑, is defined by: Z ∞ s(t) ↑(t) dt = s(0) −∞ where s is a test function. Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Dirac Delta Function (2/2) Please note that: ↑ is not a function, it is a distribution (or generalized function). We have: Z ∞ ↑(t) dt = 1. −∞ Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Weird Definition (1/2) Just think of ↑ being something like: 1 × ∞ if t = 0 ↑(t) = 0 if t 6= 0. but it cannot be a proper definition! Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Weird Definition (2/2) Here α is a constant in R or C. We do not have α↑ = ↑, but: α × ∞ if t = 0 ↑(t) = 0 if t 6= 0. R ∞ Indeed we should have −∞ α↑(t)dt being equal to α. Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Dirac Representation Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Outline 1 Introduction 2 Distributions About the Dirac Delta Function Some Useful Functions and Distributions 3 Fourier and Convolution 4 Sampling 5 Convolution and Linear Filtering 6 Some 2D Linear Filters Gradients Laplacian Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Foreword Understand that the Dirac delta function is the most important distribution we can think of. Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Sinc (1/2) The (unnormalized, historical, mathematical) sinc function is: sin(t) sinc(t) = . t The normalized sinc function is: sin(πt) sinc(t) = . πt so that: Z ∞ sinc(t) dt = 1. −∞ Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Sinc (2/2) Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Sign Function (1/2) The sign function is: −1 if t < 0 sgm(t) = 0 if t = 0 1 if t > 0. Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Sign Function (2/2) Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Heaviside Step Function (1/2) 0 if t < 0 1 u(t) = (1 + sgn(t)) = 1/2 if t = 0 2 1 if t > 0. We have: Z t u(t) = ↑(τ) dτ. −∞ Put differently u˙ = ↑. Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Heaviside Step Function (2/2) Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Rect (1/2) The rectangular function is: 1 if |t| < 1/2 rect(t) = 1/2 if |t| = 1/2 0 if |t| > 1/2. We have: rect(t) = u(t + 1/2) u(1/2 − t). Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Rect (2/2) Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Tri (1/2) The triangular function is: 1 − t if |t| < 1 tri(t) = 0 if |t| ≥ 1. Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Tri (2/2) Thierry Geraud´ Introduction to Image Processing #5/7 Introduction Distributions Fourier and Convolution About the Dirac Delta Function Sampling Some Useful Functions and Distributions Convolution and Linear Filtering Some 2D Linear Filters Dirac Delta Function as a Limit We can define ↑ as a limit of functions dα in the sense that: Z ∞ lim s(t) dα(t) dt = s(0). α→0 −∞ We can choose dα in: t → N (0; α)(t) normal distribution t →