Chapter 3 Image Enhancement in the Spatial Domain

Similar documents
Digital Image Processing. Image Enhancement in the Spatial Domain (Chapter 4)

Neighbourhood Operations

Chapter 3: Intensity Transformations and Spatial Filtering

CHAPTER 3 IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

EEM 463 Introduction to Image Processing. Week 3: Intensity Transformations

Digital Image Processing, 2nd ed. Digital Image Processing, 2nd ed. The principal objective of enhancement

Outlines. Medical Image Processing Using Transforms. 4. Transform in image space

3 Image Enhancement in the Spatial Domain

SYDE 575: Introduction to Image Processing

Sharpening through spatial filtering

EELE 5310: Digital Image Processing. Lecture 2 Ch. 3. Eng. Ruba A. Salamah. iugaza.edu

EELE 5310: Digital Image Processing. Ch. 3. Eng. Ruba A. Salamah. iugaza.edu

Fig. 3.1: Interpolation schemes for forward mapping (left) and inverse mapping (right, Jähne, 1997).

Vivekananda. Collegee of Engineering & Technology. Question and Answers on 10CS762 /10IS762 UNIT- 5 : IMAGE ENHANCEMENT.

3.4& Fundamentals& mechanics of spatial filtering(page 166) Spatial filter(mask) Filter coefficients Filter response

Digital Image Processing

1.Some Basic Gray Level Transformations

Introduction to Digital Image Processing

Review for Exam I, EE552 2/2009

Lecture 3 - Intensity transformation

Image Enhancement in Spatial Domain (Chapter 3)

Digital Image Processing. Image Enhancement - Filtering

Intensity Transformation and Spatial Filtering

Lecture 4 Image Enhancement in Spatial Domain

Image Enhancement: To improve the quality of images

Selected Topics in Computer. Image Enhancement Part I Intensity Transformation

Biomedical Image Analysis. Spatial Filtering

Digital Image Processing

Image Processing. Traitement d images. Yuliya Tarabalka Tel.

EE795: Computer Vision and Intelligent Systems

Babu Madhav Institute of Information Technology Years Integrated M.Sc.(IT)(Semester - 7)

In this lecture. Background. Background. Background. PAM3012 Digital Image Processing for Radiographers

Image Enhancement in Spatial Domain. By Dr. Rajeev Srivastava

Image Processing. BITS Pilani. Dr Jagadish Nayak. Dubai Campus

Digital Image Processing. Prof. P. K. Biswas. Department of Electronic & Electrical Communication Engineering

Digital Image Analysis and Processing

Point Operations and Spatial Filtering

MAPI Computer Vision. Multiple View Geometry

Point and Spatial Processing

UNIT - 5 IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Filtering and Enhancing Images

What will we learn? Neighborhood processing. Convolution and correlation. Neighborhood processing. Chapter 10 Neighborhood Processing

IMAGE ENHANCEMENT in SPATIAL DOMAIN by Intensity Transformations

EECS 556 Image Processing W 09. Image enhancement. Smoothing and noise removal Sharpening filters

Lecture 4: Spatial Domain Transformations

JNTUWORLD. 4. Prove that the average value of laplacian of the equation 2 h = ((r2 σ 2 )/σ 4 ))exp( r 2 /2σ 2 ) is zero. [16]

Anno accademico 2006/2007. Davide Migliore

Chapter - 2 : IMAGE ENHANCEMENT

Chapter 10 Image Segmentation. Yinghua He

Segmentation algorithm for monochrome images generally are based on one of two basic properties of gray level values: discontinuity and similarity.

Intensity Transformations and Spatial Filtering

Islamic University of Gaza Faculty of Engineering Computer Engineering Department

Biomedical Image Analysis. Point, Edge and Line Detection

ECG782: Multidimensional Digital Signal Processing

Classification of image operations. Image enhancement (GW-Ch. 3) Point operations. Neighbourhood operation

Digital Image Processing

Digital Image Procesing

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

Point operation Spatial operation Transform operation Pseudocoloring

Digital Image Processing

Digital Image Processing. Lecture 6

Chapter 10: Image Segmentation. Office room : 841

Lecture 4. Digital Image Enhancement. 1. Principle of image enhancement 2. Spatial domain transformation. Histogram processing

Introduction to Digital Image Processing

IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

Digital Image Processing

Edge and local feature detection - 2. Importance of edge detection in computer vision

Lecture 6: Edge Detection

CS 490: Computer Vision Image Segmentation: Thresholding. Fall 2015 Dr. Michael J. Reale

Digital Image Processing. Lecture # 3 Image Enhancement

Digital Image Processing, 3rd ed.

PROCESS > SPATIAL FILTERS

Sampling and Reconstruction

Filtering Images. Contents

Unit - I Computer vision Fundamentals

ECG782: Multidimensional Digital Signal Processing

Computer Vision. Image Segmentation. 10. Segmentation. Computer Engineering, Sejong University. Dongil Han

ES 240: Scientific and Engineering Computation. a function f(x) that can be written as a finite series of power functions like

THE FINANCIAL CALCULATOR

Lecture 7: Most Common Edge Detectors

Basic relations between pixels (Chapter 2)

x' = c 1 x + c 2 y + c 3 xy + c 4 y' = c 5 x + c 6 y + c 7 xy + c 8

An introduction to image enhancement in the spatial domain.

C2: Medical Image Processing Linwei Wang

Lecture 4: Image Processing

Image Processing Lecture 10

Digital Image Processing. Image Enhancement (Point Processing)

Noise Model. Important Noise Probability Density Functions (Cont.) Important Noise Probability Density Functions

Piecewise polynomial interpolation

IMAGING. Images are stored by capturing the binary data using some electronic devices (SENSORS)

Lecture Image Enhancement and Spatial Filtering

CS485/685 Computer Vision Spring 2012 Dr. George Bebis Programming Assignment 2 Due Date: 3/27/2012

Linear Operations Using Masks

EECS490: Digital Image Processing. Lecture #19

Intensity Transformations. Digital Image Processing. What Is Image Enhancement? Contents. Image Enhancement Examples. Intensity Transformations

Fundamentals of Digital Image Processing

UNIT #2 TRANSFORMATIONS OF FUNCTIONS

Interpolation is a basic tool used extensively in tasks such as zooming, shrinking, rotating, and geometric corrections.

Other Linear Filters CS 211A

Edge detection. Stefano Ferrari. Università degli Studi di Milano Elaborazione delle immagini (Image processing I)

Transcription:

Chapter 3 Image Enhancement in the Spatial Domain Yinghua He School o Computer Science and Technology Tianjin University

Image enhancement approaches Spatial domain image plane itsel Spatial domain methods Based on direct manipulation o pixels in an image. Frequency domain methods Based on modiying the Fourier transorm o an image

Outline Background Some Basic Gray Level Transormations Histogram Processing Enhancement Using Arithmetic/Logic Operations Basics o Spatial Filtering Smoothing Spatial Filters Sharpening Spatial Filters Combining Spatial Enhancement Methods

Spatial domain:the aggregate o pixels composing an image. Spatial domain methods: procedures that operate directly on these pixels. Spatial domain processes: denoted by the expression: [ ( x, )] g ( x, y) = T y (x,y):the input image g(x,y):the processed image T: an operator on, deined over some neighborhood o (x,y).

s = T (r) Gray-level transormation unction o the orm r: the gray level o (x,y) s: the gray level o g(x,y) Larger neighborhoods masks:is a small 2-D array. the mask coeicients determine the nature o the process, such as image sharpening. Masking processing Enhancement techniques based on this type o approach oten are reerred to as masking processing.

Outline Background Some Basic Gray Level Transormations Histogram Processing Enhancement Using Arithmetic/Logic Operations Basics o Spatial Filtering Smoothing Spatial Filters Sharpening Spatial Filters Combining Spatial Enhancement Methods

Three basic types o unctions used requently or image enhancement: Linear (negative and identity transormations) Logarithmic (log and inverse-log transormations) Power-law (nth power and nth root transormations)

Image negatives The negative o an image with gray levels in the range[0,l-1] is obtained by using the negative transormation in Fig. 3.3, which is given by the expression s=l-1-r

Log Transormations The general orm o the log transormation shown in Fig. 3.3 is s = c log( 1+ r) where c is a constant, and it is assumed that r>=0. This transormation maps a narrow range o low gray-level values in the input image into a wider range o output levels.

Power-Law Transormations Power-law transormations have the basic orm γ γ s = cr Where c and are positive constants.

2.5 s = s = r 1/ 2. 5 r

Piecewise-Linear Transormation Functions

Outline Background Some Basic Gray Level Transormations Histogram Processing Enhancement Using Arithmetic/Logic Operations Basics o Spatial Filtering Smoothing Spatial Filters Sharpening Spatial Filters Combining Spatial Enhancement Methods

Outline Background Some Basic Gray Level Transormations Histogram Processing Enhancement Using Arithmetic/Logic Operations Basics o Spatial Filtering Smoothing Spatial Filters Sharpening Spatial Filters Combining Spatial Enhancement Methods

Arithmetic/logic operations involving images are perormed on a pixel-by-pixel basis between two or more images. O the our arithmetic operations, subtraction and addition are the most useul or image enhancement. Masking sometimes is reerred to as region o interest(roi) processing.

Image subtraction Image Averaging

Image subtraction g( x, y) = ( x, y) h( x, y)

Image subtraction Image Averaging

Consider a noisy image g(x,y) ormed by the addition o noise to an original image (x,y); that is I an image is ormed by averaging K dierent noisy images, ), ( y x η ), ( ), ( ), ( y x y x y x g η + = ), ( y x g = = K i i y x g K y x g 1 ), ( 1 ), (

Then it ollows that And { g( x, y) } ( x, y) E = σ = 2 g ( x, y) 1 K σ 2 η ( x, y)

Outline Background Some Basic Gray Level Transormations Histogram Processing Enhancement Using Arithmetic/Logic Operations Basics o Spatial Filtering Smoothing Spatial Filters Sharpening Spatial Filters Combining Spatial Enhancement Methods

Some neighborhood operations work with the values o the image pixels in the neighborhood and the corresponding values o a subimage that gas the same dimensions as the neighborhood. The values in a ilter subimage are reerred to as coeicients, rather than pixels. For linear spatial iltering, the response is given by a sum o products o the ilter coeicients and the corresponding image pixels in the area spanned by the ilter mask.

The result, R, o linear iltering with the ilter mask at a point(x,y) in the image is R = w( 1, 1) ( x 1, y 1) + w( 1,0) ( x 1, y) +... + w(0,0) ( x, y) +... + w(1,0) ( x + 1, y) + w(1,1) ( x + 1, y + 1) In general, linear iltering o an image o size M*N with a ilter mask o size m*n is given by the expression: a b g ( x, y) = w( s, t) ( x + s, y + t) s= at= a

When interest lies on the response, R, o an m*n mask at any point(x,y), it is common pratice to simpliy the notation by using the ollowing expression: R = w1 z1 + w2 z 2 +... + w mn z mn = mn i= 1 w i z i

For the 3*3 general mask shown below, the response at any point(x,y) in the image is given by

I the center o the mask moves any closer to the border, one or more rows or columns o the mask will be located outside the image plane. There are several ways to handle this situations. To limit the excursions o the center o the mask to be at a distance no less than (n-1)/2 pixels rom the border. To ilter all pixels only with the section o the mask that is ully contained in the image. Padding the image by adding rows and columns o 0 s, or padding by replicating rows and columns.

Outline Background Some Basic Gray Level Transormations Histogram Processing Enhancement Using Arithmetic/Logic Operations Basics o Spatial Filtering Smoothing Spatial Filters Sharpening Spatial Filters Combining Spatial Enhancement Methods

Smoothing ilters are used or blurring and or noise reduction. Blurring is used in preprocessing steps, such as removal o small details rom an image prior to object extraction, and bridging o small gaps in lines or curves. Noise reduction can be accomplished by blurring with a linear ilter and also by non-linear iltering.

Smoothing Linear Filter Order-Statistics Filter

The output o a smoothing, linear spatial ilter is simply the average o the pixels contained in the neighborhood o the ilter mask. This ilters sometimes are called averaging ilters. They also reerred to a lowpass ilter.

The general implementation or iltering an M*N image with a weighted averaging ilter o size m*n is given by the expression = = 9 1 9 1 i z i R = = = = + + = a a s b b t a a s b b t t s w t y s x t s w y x g ), ( ), ( ), ( ), (

Smoothing Linear Filter Order-Statistics Filter

Order-statistics ilters are nonlinear spatial ilters whose response is based on ordering (rankng) the pixels contained in the image area encompassed by the ilter, and then replacing the value o the center pixel with the value determined by the ranking result. The best-known example in this category is the ilter, which, as its name implies, replaces the value o a pixel by the median o the gray levels in the neighborhood o that pixel.

Outline Background Some Basic Gray Level Transormations Histogram Processing Enhancement Using Arithmetic/Logic Operations Basics o Spatial Filtering Smoothing Spatial Filters Sharpening Spatial Filters Combining Spatial Enhancement Methods

The principal objective o sharpening is to highlight ine detail in an image or to enhance detail that has been blurred, either in error or as a natural eect o a particular method o image acquisition. Averaging is analogous to integration; Sharpening could be accomplished by spatial dierentiation.

Foundation Use o Second Derivatives or Enhancement- The Laplacian Use o First Derivatives or Enhancement- The Gradient

We require that any deinition we use or a irst derivative. Must be zero in lat segments(areas o constant gray-level values); Must be nonzero at the onset o a gray-level step or ramp; Must be nonzero along ramps.

The deinition o a second derivative Must be zero in lat areas; Must be nonzero at the onset and end o a graylevel step or ramp; Must be zero along ramps o constant slope.

A basic deinition o the irst-order derivative o a one-dimensional unction (x) is the dierence. x = ( x + 1) ( x) We deine a second-order derivative as the dierence. 2 x 2 = ( x + 1) + ( x 1) 2 ( x)

Comparing the response between irst- and secondorder derivatives, we arrive at the ollowing conclusions. First-order derivatives generally produce thicker edges in an image. Second-order derivatives have a stronger response to ine detail, such as thin lines and isolated points. First-order derivatives generally have a stronger response to a gray level step. Second-order derivatives produce a double response at step changes in gray level.

Second-order derivatives that, or similar changes in gray-level values in an image, their response is stranger to a line than to a step, and to a point than to a line.

Foundation Use o Second Derivatives or Enhancement- The Laplacian Use o First Derivatives or Enhancement- The Gradient

We are interested in isotropic( 同向性 ) ilters, whose response is independent o the direction o the discontinuities in the image to which the ilter is applied. Isotropic ilters are rotation invariant.

The simplest isotropic derivative operator is the Laplacian, which, or a unction (image)(x,y) o two variables is deined as 2 2 2 = + 2 2 x y Because derivatives o any order are linear operations, the Laplacian is a linear operator.

We use the ollowing notation or the partial second-order derivative in the x-direction: And, similarly in the y-direction, as ), ( 2 ) 1, ( ) 1, ( 2 2 y x y x y x x + + = ), ( 2 1), ( 1), ( 2 2 y x y x y x y + + =

The digital implementation o the twodimensional Laplacian is obtained by summing these two components. [ ] ), ( 4 1), ( 1), ( ) 1, ( ) 1, ( 2 y x y x y x y x y x + + + + + =

Because the Laplacian is a derivative operator, its use highlights gray-level discontinuities in an image and deemphasizes regions with slowly varying gray levels. The basic way in which we use the Laplacian or image enhancement is as ollows: g( x, y) = ( x, ( x, y) y) + 2 2 ( x, ( x, y) y) i the center coeicient o Laplacian mask is negative i the center coeicient o Laplacian mask is positive the the

Simpliications [ ] [ ] 1), ( 1), ( ) 1, ( ) 1, ( ), ( 5 ), ( 4 1), ( 1), ( ) 1, ( ) 1, ( ), ( ), ( + + + + + = + + + + + + = y x y x y x y x y x y x y x y x y x y x y x y x g

Unsharp masking and highyboost iltering A process used or many years in the publishing industry to sharpen images consists o subtracting a blurred version o an image rom the image itsel. This process, called unsharp masking, is expressed as s ( x, y) = ( x, y) ( x, y) Where s ( x, y) denotes the sharpened image obtained by unsharp masking and ( x, y) is a blurred version o ( x, y).

A slight urther generalization o unsharp masking is called high-boost iltering. A highboost iltered image, hb, is deined at any point (x,y) as hb ( x, y) = A ( x, y) ( x, y) where A>=1 The equation may be written as hb ( x, y) = ( A 1) ( x, y) ( x, y) s

I we select to use the Laplacian, the above equation becomes 2 i the center coeicient o the A ( x, y) ( x, y) Laplacian mask is negative hb = 2 i the center coeicient o the A ( x, y) + ( x, y) Laplacian mask is positive When A=1, high-boost iltering becomes standard Laplacian sharpening.

For unction (x,y), the gradient o at coordinates (x,y) is deined as the twodimensional column vector The magnitude o this vector is given by = = y x G G y x [ ] 2 1 2 2 2 1 2 2 ) ( + = + = = y x G G mag y x

In order to reduce the computational burden, it is common practice to approximate the magnitude o the gradient by using absolute values instead o squares and square roots: G x + G y

The simplest approximations to a irst-order derivative that satisy the conditions stated are = z 8 z ) and = z 6 z ). G x ( 5 G y ( 5 The other deinitions proposed by Roberts in the early development o digital image processing use cross dierences: and = z 8 z G x = z 9 z ) ) ( 5 G y ( 6

We compute the gradient as or An approximation using absolute values, still at point, but using a 3*3 mask, is [ ] 2 1 2 6 8 2 5 9 ) ( ) ( z z z z + = 6 8 5 9 z z z z + z 5 ) 2 ( ) 2 ( ) 2 ( ) 2 ( 7 4 1 9 6 3 3 2 1 9 8 7 z z z z z z z z z z z z + + + + + + + + +

Sobel operators Roberts crossgradient operators

Outline Background Some Basic Gray Level Transormations Histogram Processing Enhancement Using Arithmetic/Logic Operations Basics o Spatial Filtering Smoothing Spatial Filters Sharpening Spatial Filters Combining Spatial Enhancement Methods