Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods  Process an image so that the result will be more suitable.

Slides:



Advertisements
Similar presentations
Digital Image Processing
Advertisements

Spatial Filtering (Chapter 3)
Image Processing Lecture 4
CS & CS Multimedia Processing Lecture 2. Intensity Transformation and Spatial Filtering Spring 2009.
Spatial Filtering.
Local Enhancement Histogram processing methods are global processing, in the sense that pixels are modified by a transformation function based on the gray-level.
Chapter 3 Image Enhancement in the Spatial Domain.
Lecture 6 Sharpening Filters
Chapter - 2 IMAGE ENHANCEMENT
Intensity Transformations (Chapter 3)
EE 4780 Image Enhancement. Bahadir K. Gunturk2 Image Enhancement The objective of image enhancement is to process an image so that the result is more.
EE663 Image Processing Histogram Equalization Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Digital Image Processing
Image Enhancement in the Spatial Domain II Jen-Chang Liu, 2006.
Image Enhancement in the Spatial Domain
Intensity Transformations
Digital Image Processing
Lecture 4 Digital Image Enhancement
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
Chapter 3: Image Enhancement in the Spatial Domain
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Image Enhancement To process an image so that the result is more suitable than the original image for a specific application. Spatial domain methods and.
6/9/2015Digital Image Processing1. 2 Example Histogram.
Machine Vision and Dig. Image Analysis 1 Prof. Heikki Kälviäinen CT50A6100 Lectures 6&7: Image Enhancement Professor Heikki Kälviäinen Machine Vision and.
Digital Image Processing
1 Lecture 12 Neighbourhood Operations (2) TK3813 DR MASRI AYOB.
Image Enhancement.
Lecture 2. Intensity Transformation and Spatial Filtering
Chapter 3 Image Enhancement in the Spatial Domain.
ECE 472/572 - Digital Image Processing Lecture 4 - Image Enhancement - Spatial Filter 09/06/11.
Chapter 3 (cont).  In this section several basic concepts are introduced underlying the use of spatial filters for image processing.  Mainly spatial.
Lecture 4 Digital Image Enhancement
Chapter 3: Image Enhancement in the Spatial Domain
Chap2 Image enhancement (Spatial domain)
 Image Enhancement in Spatial Domain.  Spatial domain process on images can be described as g(x, y) = T[f(x, y)] ◦ where f(x,y) is the input image,
Chapter 10: Image Segmentation
Digital Image Processing
Spatial Filtering: Basics
Digital Image Processing Image Enhancement Part IV.
University of Ioannina - Department of Computer Science Intensity Transformations (Point Processing) Christophoros Nikou Digital Image.
Chapter 3 Image Enhancement in the Spatial Domain.
Digital Image Processing
DIGITAL IMAGE PROCESSING
CIS 601 Image ENHANCEMENT in the SPATIAL DOMAIN Dr. Rolf Lakaemper.
Digital Image Processing Lecture 5: Neighborhood Processing: Spatial Filtering Prof. Charlene Tsai.
Intensity Transformations or Translation in Spatial Domain.
Image Restoration Chapter 5.
Digital Image Processing Image Enhancement in the Spatial Domain.
Lecture 5 Mask/Filter Transformation 1.The concept of mask/filters 2.Mathematical model of filtering Correlation, convolution 3.Smoother filters 4.Filter.
Spatial Filtering.
Ch5 Image Restoration CS446 Instructor: Nada ALZaben.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
Image Subtraction Mask mode radiography h(x,y) is the mask.
Digital Image Processing EEE415 Lecture 3
Lecture Reading  3.1 Background  3.2 Some Basic Gray Level Transformations Some Basic Gray Level Transformations  Image Negatives  Log.
EE 7730 Image Enhancement. Bahadir K. Gunturk2 Image Enhancement The objective of image enhancement is to process an image so that the result is more.
Digital Image Processing Image Enhancement in Spatial Domain
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 3 Image Enhancement in the Spatial Domain Chapter.
Image Processing Lab Section 28/3/2016 Prepared by Mahmoud Abdelsatar Demonstrator at IT Dep. Faculty of computers and information Assuit University.
Image Enhancement in the Spatial Domain.
Chapter 3: Image Enhancement in the Spatial Domain
Fundamentals of Spatial Filtering:
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Image Enhancement.
Intensity Transformations and Spatial Filtering
Image Enhancement in the Spatial Domain
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
IT523 Digital Image Processing
IT523 Digital Image Processing
Image Enhancement in the Spatial Domain
Presentation transcript:

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  Process an image so that the result will be more suitable than the original image for a specific application.  The suitableness is up to each application.  A method which is quite useful for enhancing an image may not necessarily be the best approach for enhancing another images Objectives of Enhancement

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  Spatial Domain : Techniques are based on direct manipulation of pixels in an image  Frequency Domain : Techniques are based on modifying the Fourier transform of an image  Good Images  For human visual The visual evaluation of image quality is a highly subjective process. It is hard to standardize the definition of a good image.  For machine perception The evaluation task is easier. A good image is one which gives the best machine recognition results.  A certain amount of trial and error usually is required before a particular image enhancement approach is selected. Background Infomation

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 3 Image Enhancement in the Spatial Domain Chapter 3 Image Enhancement in the Spatial Domain  Procedures that operate directly on pixels. where  is the input image  is the processed image  is an operator on defined over some neighborhood of

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Point Processing  Neighborhood = 1 x 1 pixel  =depends on only the value of at  = gray level (or intensity or mapping) transformation function  Where  =gray level of

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Contrast Stretching and Thresholding Contrast Stretching and Thresholding (a) Produce higher contrast than the original by darkening the levels below m in the original image Brightening the levels above m in the orginal image (b) Produce a two-level (binary) image

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods 3 basic gray-level transformation functions 3 basic gray-level transformation functions  Linear function  Negative and identity transformation  Logarithm function  Log and inverse-log transformation  Power-low function  nth power and nth root transformation

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Identity function  Output intensities are identical to input intensities.  Is included in the graph only for completeness

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Image Negatives  An image with gray level in the range where ; n=1,2,…  Negative transformation :  Reversing the intensity levels of an image.  Suitable for enhancing white or gray detail embedded in dark regions of an image, especially when the black area dominant in size.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example of Negative Image

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Log Transformations  c is a contrast and r≥0  Log curve maps a narrow range of low gray-level values in the input image into a wider range of output levels.  Used to expand the values of dark pixels in an image while compressing the higher-level values.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Examples of Logarithm Image

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Power-Law Transformations  c and are positive constants  Power-low curves with fractional values of map a narrow range of dark input values with the opposite being true for higher values of input levels.  c= =1 → Identity function

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Gamma correction =2.5 =1/2.5=4 Gamma correction is done by preprocessing the image before inputting it to the monitor with

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Another example : MRI

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Another example

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Piecewise-Linear Transformation Functions  Advantage :  The form of piecewise function can be arbitrarily complex  Disadvantage:  Their specification requires considerably more user input

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Contrast Stretching Increase the dynamic range of the gray levels in the image (b) a low-contrast image: result from poor illumination, lack of dynamic range in the imaging sensor, or even wrong setting of a lens aperture of image acquisition (c) result of contrast stretching : and (d) result of thresholding ab cd

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Gray-level slicing Highlighting a specific range of gray levels in an image Display a high value of all gray levels in the range of interest and a low value of all other gray levels (a) transformation highlights range [A,B] of gray level and reduces all others to a contrast level (b) transformation highlights range [A,B] but preserves all other levels

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Bit-plane slicing  Highlighting the contribution made to total image appearance by specific bits  Suppose each pixel is represented by 8bits  Higher-order bits contain the majority of the visually significant data  Useful for analyzing the relative important played by each bit of the image

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example The(binary) image for bit-plane 7 can be obtained by processing the input image with a thresholding gray-level transformations. Map all levels between 0 and 127 to 0 Map all levels between 129 and 255 to 255

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods 8 bit planes Bit-plane 7Bit-plane 6 Bit- plane 5 Bit- plane 4 Bit- plane 3 Bit- plane 2 Bit- plane 1 Bit- plane 0

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Histogram Processing  Histogram of a digital image with gray levels in the range [0,L-1] is a discrete function  Where  : the kth gray level  : the number of pixels in the image having gray level  : histogram of digital image with gray levels

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Normalized Histogram  dividing each of histogram at gray level r k by the total number of pixels in the image, for k=0,1,…,L-1  gives an estimate of the probability of occurrence of gray level r k  The sum of all components of a normalized histogram is equal to 1

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Histogram Processing  Basic for numerous spatial domain processing techniques  Used effectively for image enhancement  Information inherent in histograms also is useful in image compression and segmentation

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example Dark image components of histogram are concentrated on the low side of the gray scale Bright image components of histogram are concentrated on the high side of the gray scale

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example Low-contrast image histogram is narrow and centered toward the middle of the gray scale High-contrast image histogram covers broad range of the gray scale and the distribution of pixels is not too far from uniform, with very few vertical lines being much higher than the others

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Histogram Transformation  Where 0 ≤ r ≤ 1  T(r) satisfies  T(r) is single-vlaued and monotonically increasing in the interval 0 ≤ r ≤ 1  0 ≤ T(r) ≤ 1 for 0 ≤ r ≤ 1

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  Single-valued (one-to-one relationship) guarantees that the inverse transformation will exist  Monotonicity condition preserves the increasing order from black to white in the output image thus it won’t cause a negative image  0 ≤ T(r) ≤ 1 for 0 ≤ r ≤ 1 guarantees that the output gray levels will be in the same range as the input levels.  The inverse transformation from s back to r is r = T -1 (s) ; 0 ≤s ≤1 Conditions for T(r)

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  The gray levels in an image may be viewed as random variables in the interval [0,1]  The normalized histogram may viewed as a Probability Density Function (PDF)  Review the file “review_of_probabiliy.ppt” Histogram and Probability Density Function)

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  The PDF of the transformed variable s is determined by  the gray-level PDF of the input image  and the chosen transformation function  If p r (r) and T(r) are known and T -1 (s) satisfies condition (a) then p s (s) can be obtained using a formula :, where pr(r) and ps(s) denote the PDF of random variable r and s PDF and Point Transformation

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  A transformation function is a cumulative distribution function (CDF) of random variable r : where w is a dummy variable of integration  Note that T(r) depends on p r (r) and satisfies the conditions of transformation function Transformation Function Example: Histogram Equalization

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  PDF for the image transformed by T(r)= CDF Using CDF as a Transformation Function

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  As p s (s) is a probability function, it must be zero outside the interval [0,1] in this case because its integral over all values of s must equal 1.  Called p s (s) as a uniform probability density function  p s (s) is always a uniform, independent of the form of p r (r) Using CDF as a Transformation Function yield

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  The probability of occurrence of gray level in an image is approximated by, where k = 0, 1, …, L-1  The discrete version of transformation, where k = 0, …, L-1 Discrete Transformation Function

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization  As the low-contrast image’s histogram is narrow and centered toward the middle of the gray scale, if we distribute the histogram to a wider range the quality of the image will be improved.  We can do it by adjusting the probability density function of the original histogram of the image so that the probability spread equality  Equalization can be achieved by the following transformation function

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example-Transformation

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example-Result

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example Image is dominated by large, dark areas, resulting in a histogram characterized by a large concentration of pixels in pixels in the dark end of the gray scale

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Image Equalization The histogram equalization doesn’t make the result image look better than the original image. Consider the histogram of the result image, the net effect of this method is to map a very narrow interval of dark pixels into the upper end of the gray scale of the input image. As a consequence, the output image is light and has a washed-out appearance.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  Histogram equalization has a disadvantage which is that it can generate only one type of output image.  With Histogram Specification, we can specify the shape of the histogram that we wish the output image to have.  It doesn’t have to be a uniform histogram Histogram Specification

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Histogram Specification vkvk zkzk Histogram Equalization of input image, S. -Construct LUT as follows: + Map r k to s k using T(r) + Find v k, which is closest to s k + Compute z k using G -1 (v k ). + Repeat for all r k Histogram Equalization using Desired Histogram of output image, Z. - S  R’ mapping R  Z - In continuous space, the two equalize images (R and R’) should be the same.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  Histogram equalization has a disadvantage which is that it can generate only one type of output image.  With Histogram Specification, we can specify the shape of the histogram that we wish the output image to have.  It doesn’t have to be a uniform histogram Histogram Specification

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  Transform an input image with the PDF a) to the output image having the PDF b) Example ( continuous space) a)b)

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  Obtain the Transformation function T(r)  Obtain the transformation function G(z) Example ( continuous space)

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods  Obtain the inverse transform function G -1  We can guarantee that 0 ≤ z ≤ 1 when 0 ≤ r ≤ 0 Example ( continuous space)

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Histogram Specification (1) the transformation function G(z) obtained from (2) the inverse transformation Notice that the output histogram’s low end has shifted right toward the lighter region of the gray scale as desired.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Note  Histogram specification is s trial-and-error process  There are no rules for specifying histograms, and one must resort to analysis on a case-by-case basis for any given enhancement task.  Histograms processing methods are global processing, in the sense that pixels are modified by a transformation function based in the gray- level content of an entire image.  Sometimes, we may need to enhance details over small areas in an image, which in called a local enhancement.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Local Enhancement  define a square or rectangular neighborhood and move the center of this area from pixel to pixel.  at each location, the histogram of the points in the neighborhood is computed and either histogram equalization or histogram specification transformation function is obtained.  another approach used to reduce computation is to utilize nonoverlapping regions, but it usually produces an undesirable checkerboard effect.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Enhancement using Arithmetic/Logic Operations  Arithmetic/Logic operations perform on pixel by pixel basis between two or more images  except NOT operation which perform only on a single image

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Logic Operations  Logic operation performs on gray-level images, the pixel values are processed as binary numbers  light represents a binary 1, and dark represents a binary 0  NOT operation=negative transformation

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example of AND/OR operation

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Image Subtraction  Enhancement of the differences between images

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Note  We may have to adjust the gray-scale of the subtracted image to be [0,255] (if 8-bit is used)  first, find the minimum gray value of the subtracted image  second, find the maximum gray value of the subtracted image  Set the minimum value to be zero and the maximum to be 255  While the rest are adjusted according to the interval [0,255], by timing each value with 255/max  Subtraction is also used in segmentation of moving pictures to track the changes  After subtract the sequenced images, what is left should be the moving elements in the image, plus noise

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Image Averaging  consider a noisy image g(x,y) formed by the addition of noise η(x,y) to an original image f(x,y)  if noise has zero mean and be uncorrelated then it can be shown that if

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Image Averaging  then if K increase, it indicates that the variability (noise) of the pixel at each location (x,y) decreases.  thus

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example -Image corrupted by additive Gaussian noise with zero mean -Results of averaging k=8, 16, 64, 128

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 3 Image Enhancement in the Spatial Domain Chapter 3 Image Enhancement in the Spatial Domain Difference images between the original and enhanced images in Figure 3.30

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Spatial Filtering  use filter (can also be called as mask/kernel/template or window)  the values in a filter subimage are referred to as coefficients, rather than pixel  our focus will be on masks of odd sizes, e.g. 3 x 3, 5 x 5,…

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Spatial Filtering Process  simply move the filter mask from point to point in an image.  at each point (x,y), the response of the filter at that point is calculated using a predefined relationship. w1w1 w2w2 w3w3 w4w4 w5w5 w6w6 w7w7 w8w8 w9w9

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Linear Filtering

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Smoothing Spatial Filters  used for blurring and for noise reduction  blurring is used in preprocessing steps, such as  removal of small details from an image prior to object extraction  bridging of small gaps in lines or curves  noise reduction can be accomplished by blurring with a linear filter and also by a nonlinear filter

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Smoothing Linear Filters  output is simply the average of the pixels contained in the neighborhood of the filter mask.  called averaging filters or lowpass filters.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods 3 x 3 Smoothing Linear Filters Weighted Average: the center is the most important and other pixels are inversely weighted as a function of their distance from the center of the mask Box filter Weighted Average Filter

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods General form : smoothing mask

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example Note: big mask is used to eliminate small objects from an image the size of the mask establishes that relative size of the objects that will be blended with the background.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods 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{Z k | k=1,2,…,n x n}  max filter : R=max{Z k | k=1,2,…,n x n}  min filter : R=min{Z k | k=1,2,…,n x n}  note : n x n is the size of the mask

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Median Filters  replaces 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 noise → salt and pepper noise), they provide excellent noise-reduction capabilities, with considering less blurring than linear smoothing filters of similar size.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Median Filters  forces the points with distinct gray levels to be more like their neighbors.  isolated clusters of pixels that are light or dark with respect to their neighbors, and whose area is less than n2/2 (one-half the filter area), are eliminated by an n x n median filter.  forced to have the value equal the median intensity of the neighbors.  larger clusters are affected considerably less

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example : Median Filters

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Sharpening Spatial Filters  to highlight fine detail in an image  or to enhance detail that has been blurred, either in error or as a natural effect of a particular method of image acquisition

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Blurring vs. Sharpening  as we know that blurring can be done in spatial domain by pixel averaging in a neighbors  since averaging is analogous to integration  thus, we can guess that the sharpening must be accomplished by spatial differentiation.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Derivative operator  the strength of the response of a derivative operator is proportional to the degree of discontinuity of the image at the point at which the operator is applied.  thus, image differentiation  enhances edges and other discontinuities (noise)  deemphasizes area with slowly varying gray-level values.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods First-order derivative

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Second-order derivative

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods First and Second-order derivative of f(x,y)

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Discrete Form of Laplacian

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Laplacian masks

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Effect of Laplacian Operator  as it a derivative operator,  it highlights gray-level discontinuities in an image  it deemphasizes regions with slowly varying gray levels  tends to produce images that have  grayish edge lines and other discontinuities, all superimposed on a dark,  featureless background.  Correct the Effect of featureless background

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Mask of Laplacian + addition  to simply the computation, we can create a mask which do both operations, Laplacian Filter and Addition the original image.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Unsharp masking sharpened image = original image – blurred image  to subtract a blurred version of an image produces sharpening output image.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods High-boost filtering  generalized form of unsharp masking  A ≥ 1

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods High-boost filtering  If we use Laplacian filter to create sharpen image f s (x,y) with addition of original image. If center coefficient of the L mask is negative

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods High-boost Masks if A=1, becomes “standard” Laplacian sharpening

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Gradient Operator magnitude of the gradient  first derivatives are implemented using the magnitude of the gradient.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Gradient Mask  simplest approximation, 2 x 2

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Gradient Mask  Roberts cross-gradient operators, 2 x 2

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Gradient Mask  Sobel operators, 3 x 3

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Note  the summation of coefficients in all masks equals 0, indicating that they would give a response of 0 in an area of contrast gray level.

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Masks

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example of Combining Spatial Enhancement Methods want to sharpen the original image and bring out more skeletal detail. problems : narrow dynamic range of gray level and high noise content makes the image difficult to enhance

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Example of Combining Spatial Enhancement Methods  solve : 1. Laplacian to highlight fine detail 2. gradient to enhance prominent edges 3. gray-level transformation to increase the dynamic range of gray levels

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods

Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 3 Image Enhancement in the Spatial Domain Chapter 3 Image Enhancement in the Spatial Domain