0% found this document useful (0 votes)
22 views96 pages

Chap 22

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views96 pages

Chap 22

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Digital Image Processing, 2nd ed. [Link].

com

Objectives of Enhancement

 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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Background Infomation

 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.
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

Chapter 3
Image Enhancement in the
Spatial Domain

 Procedures that operate directly on


pixels.
g ( x, y )  T [ f ( x, y )]

where
 f ( x, y) is the input image
 g ( x, y) is the processed image
 T is an operator on f defined over
some neighborhood of ( x, y)
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

Point Processing

 Neighborhood = 1x1 pixel


 g =depends on only the value of f at ( x, y)
 T = gray level (or intensity or mapping)
transformation function

s  T (r )
 Where
 r =gray level of f ( x, y)
 s=gray level of g ( x, y)

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

3 basic gray-level
transformation functions

 Linear function
 Negative and identity
transformation

 Logarithm function
 Log and inverse-log
transformation

 Power-low function
Additional Source:
 nth power and nth root [Link]
transformation el_transformations.htm
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

Identity function

 Output intensities are


identical to input
intensities.
 Is included in the graph
only for completeness

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Image Negatives

 An image with gray level


in the range [0, L  1]
where L  2n ; n=1,2,…
 Negative transformation :
s  L 1  r
 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.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example of Negative Image (1/2)

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example of Negative Image (2/2)

Input Image Negative Image

Fig. : Negative transformation


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

Log Transformations

s  c log(1  r )
 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
Additional source: while compressing the
[Link] higher-level values.
transformation-of-an-image-using-
python-and-opencv/
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

Examples of Logarithm Image (1/2)

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Examples of Logarithm Image (2/2)

Input Image Logarithmic Image

Fig. : Negative transformation


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

Power-Law Transformations

s  cr 
 c and  are positive constants
 Power-low curves with fractional
values of r map a narrow range of
dark input values with the opposite
being true for higher values of input
levels.
 c=  =1 → Identity function

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Gamma correction

 =2.5

 Gamma correction is
done by preprocessing
the image before
inputting it to the
1/ 
monitor with s  cr

 =1/2.5=4
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

Another example : MRI

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Another example

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Another example

Gamma (γ) = 10 Gamma (γ) = 8 Gamma (γ) = 6

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Piecewise-Linear
Transformation Functions

 Advantage :
 The form of piecewise function can be arbitrarily
complex
 Disadvantage:
 Their specification requires considerably more user
input

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

a b
Contrast Stretching (1/2) c d
 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 :
( r1 , s1 )  ( rmin , 0) and (r2 , s2 )  (rmax , L  1)
 (d) result of thresholding

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

a b
Contrast Stretching (2/2) c d

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

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
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

8 bit planes

Bit-plane 7 Bit-plane 6

Bit- Bit- Bit-


plane 5 plane 4 plane 3
Bit- Bit- Bit-
plane 2 plane 1 plane 0

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Histogram Processing (1/3)


 Histogram of a digital image with gray levels in the
range [0, L-1] is a discrete function

h(rk )  nk
 Where
 rk : the kth gray level
 nk : the number of pixels in the image having gray level rk
h(rk ) : histogram of digital image with gray levels

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Histogram Processing (2/3)

Fig: A gray image patch

Fig: Probability of each intensity level


© 2002 R. C. Gonzalez & R. E. Woods Fig: The corresponding histogram
Digital Image Processing, 2nd ed. [Link]

Histogram Processing (3/3)

Fig: A gray image patch

Fig: probability of each intensity level


© 2002 R. C. Gonzalez & R. E. Woods Fig: The histogram probability
Digital Image Processing, 2nd ed. [Link]

Normalized Histogram

 dividing each of histogram at gray level rk by the


total number of pixels in the image, n
p(rk )  nk / n
for k=0,1,…,L-1
 p(rk ) gives an estimate of the probability of
occurrence of gray level rk

 The sum of all components of a normalized


histogram is equal to 1

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]
h(rk )orp(rk )

Example
rk

 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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Histogram Transformation

s  T (r )
 Where 0 ≤ r ≤ 1
 T(r) satisfies [condition (a)]
 T(r) is single-valued and
monotonically increasing in the
interval 0 ≤ r ≤ 1
 0 ≤ T(r) ≤ 1 for 0 ≤ r ≤ 1
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

Conditions for T(r)

 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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Discrete Transformation
Function
 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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example-Transformation

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example-Result

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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.
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

Histogram Specification

 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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Histogram Specification
Histogram Equalization
Histogram Equalization
using Desired Histogram of
of input image, S.
output image, Z.

vk

zk
1 4 6 13 15 20 24 25 1 8 13 18 20 23 25 25
Accumulative distribution of input Accumulative distribution of output

- S  R’ mapping R  Z
- In continuous space, the two
-Construct LUT as follows: equalize images (R and R’)
+ Map rk to sk using T(r) should be the same.

+ Find vk , which is closest to sk


+ Compute zk using G-1(vk).
+ Repeat for all rk

LUT 0 0 1 2 2 4 5 6

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Histogram Specification
(1) the transformation
function G(z) obtained
from
k
G ( zk )   pz ( zi )  sk
i 0

k  0,1, 2,...L  1
(2) the inverse
transformation G 1 ( s )

 Notice that the output histogram’s


low end has shifted right toward the
lighter region of the gray scale as
desired.
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

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.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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.
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example of AND/OR operation

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Image Subtraction

g ( x, y)  f ( x, y)  h( x, y)
 Enhancement of the
differences between images

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Image Averaging
 consider a noisy image g(x,y) formed by the
addition of noise η(x,y) to an original image f(x,y)

g ( x, y)  f ( x, y)   ( x, y)
 if noise has zero mean and be uncorrelated then it
can be shown that if
g ( x, y )  image formed by averaging
K different noisy images
K
1
g ( x, y ) 
K
 g ( x, y )
i 1
i

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Image Averaging
 then
1 2
 g2( x , y )   ( x, y )
K
 g2( x , y ) , 2( x , y )  var iances of g and 

if K increases, it indicates that the variability (noise) of the pixel at each location
(x,y) decreases.

 thus
E{g ( x, y)}  f ( x, y)
E{g ( x, y )} = expected value of g
(output after averaging)
= original image f ( x, y )
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

Example

-Image corrupted by
additive Gaussian
noise with zero mean
-Results of averaging
k=8, 16, 64, 128

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Chapter 3
Image Enhancement in the
Spatial Domain

Difference images between


the original and enhanced
images in Figure 3.30

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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. 3x3, 5x5,…
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

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.

R  w1 z1  w2 z2  ...  wmn zmn w1 w2 w3


mn
  wi zi
w4 w5 w6

w7 w8 w9
i 1

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Linear Filtering
 Linear Filtering of an image f of size M x N filter
mask of size m x n is defined as
𝑎 𝑏

𝑔 𝑥, 𝑦 = ෍ ෍ 𝑤 𝑠, 𝑡 𝑓(𝑥 + 𝑠, 𝑦 + 𝑡)
𝑠=−𝑎 𝑡=−𝑏

, where a=(m-1)/2 and b=(n-1)/2

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

3x3 Smoothing Linear Filters

Box filter Weighted Average Filter


The center pixel The center is the most
and neighbor important and other pixels
pixels are equally are inversely weighted as a
important function of their distance
from the center of the mask

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

General form : smoothing mask

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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,…,nxn}
 max filter : R=max{Zk | k=1,2,…,nxn}
 min filter : R=min{Zk | k=1,2,…,nxn}
 note : nxn is the size of the mask

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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 such as impulse noise(or salt and pepper
noise), they provide excellent noise-reduction
capabilities, with considering less blurring than linear
smoothing filters of similar size.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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 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
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. [Link]

Example : Median Filters

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Sharpening Spatial Filters


 Sharpening: Highlight fine detail in an image and
enhance detail that has been blurred, either in
error or as a natural effect of a particular method
of image acquisition.
 Blurring vs. Sharpening: Blurring can be done in
spatial domain by pixel averaging in a neighbors.
Since averaging is analogous to integration, we
can guess that the sharpening must be
accomplished by spatial differentiation.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Derivative operator
 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.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

First and second order derivative


 The first order derivative of an one-dimensional
function

 The second order derivative of an one-dimensional


function

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

First and Second-order


derivative of f(x,y)

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Discrete Form of Laplacian

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Laplacian masks

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Effect of Laplacian Operator


 As 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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example

If the center coefficient of


the L mask is negative

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Mask of Laplacian + addition


 To simply the computation, we can create a mask
which do both operations, Laplacian Filter and
Addition on the original image.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Sharpening

f s ( x, y)  f ( x, y)  f ( x, y)
High-pass image = original image – blurred image

 to subtract a blurred version of an image


produces sharpening output image.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

High-boost filtering

 High-pass filter at A=1


 High-boost filter at A ≥ 1,

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

High-boost filtering

 If we use Laplacian filter to create sharpen


image fs(x,y) with addition of original image.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

High-boost Masks

• if A=1, becomes “standard” Laplacian


sharpening

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Gradient Operator

 First derivatives are implemented using the


magnitude of the gradient.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Gradient Mask

 simplest approximation, 2x2

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Gradient Mask

 Roberts cross-gradient operators, 2x2

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Gradient Mask
 Sobel operators, 3x3

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Note
 The summation of coefficients in all
masks equals 0, which means that
they would give a response of 0 in an
area of constant gray level.

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Edge Masks

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

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

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Example of Combining Spatial


Enhancement Methods

 solution :
1. Laplacian to highlight fine detail
2. gradient to enhance prominent edges
3. gray-level transformation to increase the dynamic
range of gray levels

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

© 2002 R. C. Gonzalez & R. E. Woods


Digital Image Processing, 2nd ed. [Link]

Thank You

© 2002 R. C. Gonzalez & R. E. Woods

You might also like