Digital Image Processing. Lecture 6 (Enhancement) Bu-Ali Sina University Computer Engineering Dep. Fall 2009

Similar documents
Image Enhancement (Spatial Filtering 2)

Enhancement Using Local Histogram

Lecture Outline. Basics of Spatial Filtering Smoothing Spatial Filters. Sharpening Spatial Filters

Review Smoothing Spatial Filters Sharpening Spatial Filters. Spatial Filtering. Dr. Praveen Sankaran. Department of ECE NIT Calicut.

Digital Image Processing: Sharpening Filtering in Spatial Domain CSC Biomedical Imaging and Analysis Dr. Kazunori Okada

Local enhancement. Local Enhancement. Local histogram equalized. Histogram equalized. Local Contrast Enhancement. Fig 3.23: Another example

EDGES AND CONTOURS(1)

Reading. 3. Image processing. Pixel movement. Image processing Y R I G Q

ECE Digital Image Processing and Introduction to Computer Vision. Outline

Local Enhancement. Local enhancement

Lecture 7: Edge Detection

Chapter 3: Image Enhancement in the. Office room : 841

Lecture 04 Image Filtering

CAP 5415 Computer Vision Fall 2011

CAP 5415 Computer Vision

3.8 Combining Spatial Enhancement Methods 137

Image Enhancement: Methods. Digital Image Processing. No Explicit definition. Spatial Domain: Frequency Domain:

Probabilistic Model of Error in Fixed-Point Arithmetic Gaussian Pyramid

Intensity Transformations and Spatial Filtering: WHICH ONE LOOKS BETTER? Intensity Transformations and Spatial Filtering: WHICH ONE LOOKS BETTER?

Digital Image Processing. Chapter 4: Image Enhancement in the Frequency Domain

Midterm Summary Fall 08. Yao Wang Polytechnic University, Brooklyn, NY 11201

Digital Image Processing COSC 6380/4393

Edge Detection. Introduction to Computer Vision. Useful Mathematics Funcs. The bad news

Machine vision. Summary # 4. The mask for Laplacian is given

TRACKING and DETECTION in COMPUTER VISION Filtering and edge detection

Machine vision, spring 2018 Summary 4

Digital Image Processing COSC 6380/4393

Laplacian Filters. Sobel Filters. Laplacian Filters. Laplacian Filters. Laplacian Filters. Laplacian Filters

Physics 5153 Classical Mechanics. Solution by Quadrature-1

Image preprocessing in spatial domain

Introduction to Computer Vision. 2D Linear Systems

Image Gradients and Gradient Filtering Computer Vision

New method for two-point nonuniformity correction of microbolometer detectors

Introduction to the Discrete Fourier Transform

0,0 B 5,0 C 0, 4 3,5. y x. Recitation Worksheet 1A. 1. Plot these points in the xy plane: A

Colorado School of Mines Image and Multidimensional Signal Processing

TLT-5200/5206 COMMUNICATION THEORY, Exercise 3, Fall TLT-5200/5206 COMMUNICATION THEORY, Exercise 3, Fall Problem 1.

Filtering and Edge Detection

Extreme Values of Functions

IMAGE ENHANCEMENT II (CONVOLUTION)

Numerical Methods - Lecture 2. Numerical Methods. Lecture 2. Analysis of errors in numerical methods

Edge Detection. CS 650: Computer Vision

Objectives. By the time the student is finished with this section of the workbook, he/she should be able

Lecture 13: Applications of Fourier transforms (Recipes, Chapter 13)

Math Review and Lessons in Calculus

ECE 2100 Lecture notes Wed, 1/22/03

RATIONAL FUNCTIONS. Finding Asymptotes..347 The Domain Finding Intercepts Graphing Rational Functions

Chapter 4 Imaging. Lecture 21. d (110) Chem 793, Fall 2011, L. Ma

Definition: Let f(x) be a function of one variable with continuous derivatives of all orders at a the point x 0, then the series.

10. Joint Moments and Joint Characteristic Functions

Today s lecture. Local neighbourhood processing. The convolution. Removing uncorrelated noise from an image The Fourier transform

Example: When describing where a function is increasing, decreasing or constant we use the x- axis values.

Signals & Linear Systems Analysis Chapter 2&3, Part II

Fourier Transforms 1D

A Simple Explanation of the Sobolev Gradient Method

Lab on Taylor Polynomials. This Lab is accompanied by an Answer Sheet that you are to complete and turn in to your instructor.

Treatment and analysis of data Applied statistics Lecture 6: Bayesian estimation

The concept of limit

Basics on 2-D 2 D Random Signal

Filtering in Frequency Domain

Computational Photography

Special types of Riemann sums

Least-Squares Spectral Analysis Theory Summary

(C) The rationals and the reals as linearly ordered sets. Contents. 1 The characterizing results

Roadmap. Introduction to image analysis (computer vision) Theory of edge detection. Applications

Lecture 8 Optimization

Additional exercises in Stationary Stochastic Processes

CITS 4402 Computer Vision

Two-step self-tuning phase-shifting interferometry

Convolution Spatial Aliasing Frequency domain filtering fundamentals Applications Image smoothing Image sharpening

18/10/2017. Image Enhancement in the Spatial Domain: Gray-level transforms. Image Enhancement in the Spatial Domain: Gray-level transforms

Categories and Natural Transformations

Asymptotics of integrals

Mesa College Math SAMPLES

9.1 The Square Root Function

Edge Detection. Image Processing - Computer Vision

Image Enhancement in the frequency domain. GZ Chapter 4

New Results on Boomerang and Rectangle Attacks

Notes on Wavelets- Sandra Chapman (MPAGS: Time series analysis) # $ ( ) = G f. y t

ENSC327 Communications Systems 2: Fourier Representations. School of Engineering Science Simon Fraser University

ELEG 3143 Probability & Stochastic Process Ch. 4 Multiple Random Variables

( ) x y z. 3 Functions 36. SECTION D Composite Functions

Computer Vision & Digital Image Processing

COMP344 Digital Image Processing Fall 2007 Final Examination

Roberto s Notes on Differential Calculus Chapter 8: Graphical analysis Section 1. Extreme points

CHAPTER 8 ANALYSIS OF AVERAGE SQUARED DIFFERENCE SURFACES

MSE405 Microstructure Characterization XRD-1 Lab X-ray diffraction in crystallography

Scattering of Solitons of Modified KdV Equation with Self-consistent Sources

Systems & Signals 315

Analysis Scheme in the Ensemble Kalman Filter

Differentiation. The main problem of differential calculus deals with finding the slope of the tangent line at a point on a curve.

3. Several Random Variables

BANDELET IMAGE APPROXIMATION AND COMPRESSION

Computer Vision & Digital Image Processing

Numerical Solution of Ordinary Differential Equations in Fluctuationlessness Theorem Perspective

Relating axial motion of optical elements to focal shift

Digital Image Processing. Filtering in the Frequency Domain

(One Dimension) Problem: for a function f(x), find x 0 such that f(x 0 ) = 0. f(x)

MEASUREMENT UNCERTAINTIES

Lab 3: The FFT and Digital Filtering. Slides prepared by: Chun-Te (Randy) Chu

Transcription:

Digital Image Processing Lecture 6 (Enhancement) Bu-Ali Sina University Computer Engineering Dep. Fall 009

Outline Image Enhancement in Spatial Domain Spatial Filtering Smoothing Filters Median Filter Sharpening High Boost ilter Derivative ilter

Spatial Filtering Image enhancement in the spatial domain can be represented as: The transormation T maybe linear or nonlinear. We will mainly study linear operators T but will see one important nonlinear operation. How to speciy T I the operator T is linear and shit invariant (LSI), characterized by the point-spread sequence (PSS) h(m, n), then (recall convolution):

Spatial Filtering Origin x a b c r s t d e * u v w g h i x y z Simple 3*3 eighbourhood y Image (x, y) e 3*3 Filter Original Image Pixels Filter e processed = v*e + r*a + s*b + t*c + u*d + w* + x*g + y*h + z*i The above is repeated or every pixel in the original image to generate the smoothed image

Chapter 3: Image Enhancement (Spatial Filtering) Spatial Filtering I h(m, n) is a 3 by 3 mask given by :

Chapter 3: Image Enhancement (Spatial Filtering) Spatial Filtering- Smoothing Filters o Image smoothing reers to any image-to-image transormation designed to smooth or latten the image by reducing the rapid pixel-to-pixel variation in grayvalues. o Smoothing ilters are used or: o Blurring: This is usually a preprocessing step or removing small (unwanted) details beore extracting the relevant (large) object, bridging gaps in lines/curves, o oise reduction: Mitigate the eect o noise by linear or nonlinear operations. o Image smoothing by averaging (lowpass spatial iltering) o Smoothing is accomplished by applying an averaging mask. o An averaging mask is a mask with positive weights, which sum to 1. It computes a weighted average o the pixel values in a neighborhood. This operation is sometimes called neighborhood averaging.

Chapter 3: Image Enhancement (Spatial Filtering) Spatial Filtering- Smoothing Filters Some 3 x 3 averaging masks:

Chapter 3: Image Enhancement (Spatial Filtering) Spatial Filtering- Smoothing Filters This operation is equivalent to lowpass iltering. Example o Image Blurring

Chapter 3: Image Enhancement (Spatial Filtering) Spatial Filtering- Smoothing Filters

Chapter 3: Image Enhancement (Spatial Filtering) Spatial Filtering- Smoothing Filters Example o noise reduction :

Chapter 3: Image Enhancement (Spatial Filtering) Spatial Filtering- Median Filter The averaging ilter is best suited or noise whose distribution is Gaussian: The averaging ilter typically blurs edges and sharp details. The median ilter usually does a better job o preserving edges. Median ilter is particularly suited i the noise pattern exhibits strong (positive and negative) spikes. Example: salt and pepper noise. Median ilter is a nonlinear ilter, that also uses a mask. Each pixel is replaced by the median o the pixel values in a neighborhood o the given pixel. Suppose are the pixel values in a neighborhood o a given pixel with Then : Note: Median o a set o values is the center value, ater sorting. For example: I A = {0,1,,4,6,6,10,1,15}, then median(a) = 6.

Spatial Filtering- Median Filter

Chapter 3: Image Enhancement (Spatial Filtering) Spatial Filtering- Median Filter Example o noise reduction :

Chapter 3: Image Enhancement (Spatial Filtering) Spatial Filtering- Median Filter

Chapter 3: Image Enhancement (Spatial Filtering) Spatial Filtering- Median Filter

Spatial Filtering- Sharpening Filter To highlight ine detail or to enhance blurred detail. smoothing ~ integration sharpening ~ dierentiation Categories o sharpening ilters: Derivative operators Basic highpass spatial iltering High-boost iltering

Spatial Dierentiation Dierentiation measures the rate o change o a unction Let s consider a simple 1 dimensional example

Spatial Dierentiation A B

1 st Derivative The ormula or the 1 st derivative o a unction is as ollows: x = ( x + 1) ( x) It s just the dierence between subsequent values and measures the rate o change o the unction

1 st Derivative 8 7 6 5 4 3 1 0 8 6 4 0 - -4-6 -8 5 5 4 3 1 0 0 0 6 0 0 0 0 1 3 1 0 0 0 0 7 7 7 7 0-1 -1-1 -1 0 0 6-6 0 0 0 1 - -1 0 0 0 7 0 0 0

nd Derivative The ormula or the nd derivative o a unction is as ollows: x = ( x + 1) + ( x ( x) Simply takes into account the values both beore and ater the current value 1)

nd Derivative 8 7 6 5 4 3 1 0 5 5 4 3 1 0 0 0 6 0 0 0 0 1 3 1 0 0 0 0 7 7 7 7-1 0 0 0 0 1 0 6-1 6 0 0 1 1-4 1 1 0 0 7-7 0 0 10 5 0-5 -10-15

Using Second Derivatives For Image Enhancement The nd derivative is more useul or image enhancement than the 1 st derivative Stronger response to ine detail Simpler implementation We will come back to the 1 st order derivative later on The irst sharpening ilter we will look at is the Laplacian One o the simplest sharpening ilters We will look at a digital implementation

The Laplacian The Laplacian is deined as ollows: where the partial 1 st order derivative in the x direction is deined as ollows: and in the y direction as ollows: y x + = ), ( ) 1, ( ) 1, ( y x y x y x x + + = ), ( 1), ( 1), ( y x y x y x y + + =

The Laplacian So, the Laplacian can be given as ollows: = [ ( x + 1, y) + ( x 1, y) We can easily build a ilter based on this + ( x, y + 1) + ( x, y 1)] 4 ( x, y) 0 1 0 1-4 1 0 1 0

The Laplacian Applying the Laplacian to an image we get a new image that highlights edges and other discontinuities Original Image Laplacian Filtered Image Laplacian Filtered Image Scaled or Display

But That Is Not Very Enhanced! The result o a Laplacian iltering is not an enhanced image We have to do more work in order to get our inal image Subtract the Laplacian result rom the original image to generate our inal sharpened enhanced image Laplacian Filtered Image Scaled or Display g( x, y) = ( x, y)

Laplacian Image Enhancement - = Original Image Laplacian Filtered Image Sharpened Image In the inal sharpened image edges and ine detail are much more obvious

Laplacian Image Enhancement

Simpliied Image Enhancement The entire enhancement can be combined into a single iltering operation ) 1, ( ) 1, ( [ ), ( y x y x y x + + = 1), ( 1), ( + + + y x y x )], ( 4 y x y x y x g ), ( ), ( = ) 1, ( ) 1, ( ), ( 5 y x y x y x + = 1), ( 1), ( + y x y x

Simpliied Image Enhancement This gives us a new ilter which does the whole job or us in one step 0-1 0-1 5-1 0-1 0

Simpliied Image Enhancement

Variants On The Simple Laplacian There are lots o slightly dierent versions o the Laplacian that can be used: 0 1 0 1-4 1 0 1 0 Simple Laplacian 1 1 1 1-8 1 1 1 1 Variant o Laplacian -1-1 -1-1 9-1 -1-1 -1

1 st Derivative Filtering Implementing 1 st derivative ilters is diicult in practice For a unction (x, y) the gradient o at coordinates (x, y) is given as the column vector: = G G x y = x y

1 st Derivative Filtering The magnitude o this vector is given by: For practical reasons this can be simpliied as: ( ) = mag [ ] 1 x G y G + = 1 + = y x G x G y +

1 st Derivative Filtering There is some debate as to how best to calculate these gradients but we will use: ( z + z + z ) ( z + z z ) + + 7 8 9 1 ( z + z + z ) ( z + z + z ) 3 6 9 1 which is based on these coordinates 4 3 7 z 1 z z 3 z 4 z 5 z 6 z 7 z 8 z 9

Sobel Operators Based on the previous equations we can derive the Sobel Operators -1 - -1 0 0 0 1 1-1 0 1-0 -1 0 1 To ilter an image it is iltered using both operators the results o which are added together

Sobel Example Sobel ilters are typically used or edge detection An image o a contact lens which is enhanced in order to make deects (at our and ive o clock in the image) more obvious

1st Derivative Filtering Chapter 3: Image Enhancement (Spatial Filtering) We may use the approximation : This can implemented using the masks: As ollows: Alternatively, we may use the approximation: This can implemented using the masks: As ollows:

Roberts cross-gradient operator Chapter 3: Image Enhancement (Spatial Filtering) The resulting masks are called Roberts cross-gradient operators. The Roberts operators and the Prewitt/Sobel operators (described later) are used or edge detection and are sometimes called edge detectors. Example: Roberts cross-gradient operator :

Prewitt operators Chapter 3: Image Enhancement (Spatial Filtering) Better approximations to the gradient can be obtained by: This can be implemented using the masks: as ollows: The resulting masks are called Prewitt operators.

Chapter Prewitt 3: Image operators Enhancement (Spatial Filtering)

1 st & nd Derivatives Comparing the 1 st and nd derivatives we can conclude the ollowing: 1 st order derivatives generally produce thicker edges nd order derivatives have a stronger response to ine detail e.g. thin lines 1 st order derivatives have stronger response to grey level step nd order derivatives produce a double response at step changes in grey level

Spatial Filtering- High-boost iltering This is a ilter whose output g is produced by subtracting a lowpass (blurred) version o rom an ampliied version o : This is also reerred to as unsharp masking. Observe that : For A >1, part o the original image is added back to the highpass iltered version o. The result is the original image with the edges enhanced relative to the original image.

Spatial Filtering- High-boost iltering

Chapter Spatial3: Filtering- Image Enhancement High-Boost (Spatial Filtering Filtering)

Chapter Spatial3: Filtering- Image Enhancement Derivative(Spatial ilter Filtering)

Combining Spatial Enhancement Methods Successul image enhancement is typically not achieved using a single operation Rather we combine a range o techniques in order to achieve a inal result This example will ocus on enhancing the bone scan to the right

Combining Spatial Enhancement Methods (a) Laplacian ilter o bone scan (a) (b) Sharpened version o bone scan achieved (c) by subtracting (a) and (b) Sobel ilter o bone scan (a) (d)

Combining Spatial Enhancement Methods The product o (c) and (e) which will be used as a mask (e) Sharpened image which is sum o (a) and () () Result o applying a power-law trans. to (g) (g) (h) Image (d) smoothed with a 5*5 averaging ilter

Combining Spatial Enhancement Methods Compare the original and inal images