51
Image Enhancement in the Spatial Domain Raul Queiroz Feitosa

Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

  • Upload
    others

  • View
    9

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

Image Enhancement in the

Spatial Domain

Raul Queiroz Feitosa

Page 2: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 2

Enhancement in the Spatial

Domain Contents

Introduction

Background

Point Processing

Histogram Processing

Local Enhancement

Spatial Filters

Smoothing Filters

Sharpening Filters

Page 3: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 3

Introduction

Two Groups of Enhancement Techniques :

In the Spatial Domain

Based on the direct manipulation of the pixels in an image.

In the Frequency Domain

Based on modifying the Fourier Transform of an image.

pre-

processing

segmen-

tation

feature

extraction

feature

selection

classifi-

cation

post-

processing data label

Page 4: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 4

Background

Notation

g(x,y) =T [ f(x,y) ] where

f(x,y) is the input image,

g(x,y) is the output image, and

T is an operator defined over a neighborhood of (x,y).

x

y

(x,y)

Page 5: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 5

Background

Two groups of approaches:

Point Processing: when the neighborhood is of size

1×1, it becomes a gray level (or intensity or mapping)

transformation function of the form:

s =T (r)

where r and s denote the gray level at f(x,y) and g(x,y)

at any point g(x,y) .

Larger neighborhoods: it bases on the use of small

arrays called mask, whose coefficients determine the

nature of the process.

Page 6: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 6

Point Processing

Image Negatives

Ou

tpu

t g

ray

leve

l -

s

Input gray level - r

T(r)

Page 7: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 7

Point Processing

(r1,s1)

(r2,s2)

T(r)

Ou

tpu

t g

ray

leve

l -

s

Input gray level - r

Contrast Stretching

Page 8: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 8

Point Processing

Power Law-Transformation

Correção Gama

Input gray level - r

maxmax/where, rsccrs

Ou

tpu

t g

ray

leve

l -

s

γ=0.04

γ=0.1

γ=0.2

γ=0.4

γ=0.67

γ=1

γ=1.5

γ=2.5

γ=5.0

γ=10

γ=25

Page 9: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 9

Point Processing

Power Law-Transformation

γ=0.04

γ=0.1

γ=0.2

γ=0.4

γ=0.67

γ=1

γ=1.5

γ=2.5

γ=5.0

γ=10

γ=25

Correção Gama

Input gray level - r

maxmax/where, rsccrs

Ou

tpu

t g

ray

leve

l -

s

γ=0.04

γ=0.1

γ=0.2

γ=0.4

γ=0.67

γ=1

γ=1.5

γ=2.5

γ=5.0

γ=10

γ=25

Page 10: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 10

Point Processing

Brightness Adjustment

10 tosubjected, sbrs

Input gray level - r

Ou

tpu

t g

ray

leve

l -

s

Page 11: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 11

Histogram Processing

Definition

The histogram of a digital image with gray levels

in the range [0,L-1] is a discrete function

h (rk) = nk/n

where

rk is the kth gray level,

nk is the number of pixels having gray level rk, and

n is the number of pixels in the image.

Page 12: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 12

Histogram Processing

Example: dark image

Page 13: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 13

Histogram Processing

Example: bright image

Page 14: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 14

Histogram Processing

Example: image with low contrast

Page 15: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 15

Histogram Processing

Example: image with high contrast

Page 16: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 16

Histogram Processing

Equalization

Problem formulation:

Design a function s =T (r) that transforms a given input

image so that the output image has uniformly

distributed gray levels.

Page 17: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 17

Histogram Processing

Equalization

Solution:

Let pr(r) and ps(s) be the histogram of the input and of the output

images, respectively.

Assume that r and s represent continuous gray levels in the

interval [0,1].

Search for the transformation function T (r) satisfying the

following conditions:

a) T(r) is a single-valued and monotonically increasing in [0,1].

b) 0 ≤ T(r) ≤ 1, for 0 ≤ r≤ 1,

c) the inverse function T-1(s) must also meet the above conditions.

Page 18: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 18

Histogram Processing

Equalization

In the continuous case

In the discrete case

for k = 0,1,…,L-1

r

rrdwwprTs

0

10)()(

j

k

j

r

k

j

j

kkrp

n

nrTs

00

sk

rk

Page 19: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 19

Histogram Processing

Equalization: example

T(r)

r

Equalization

Page 20: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 20

Histogram Processing Histogram Matching

Problem formulation:

Design a transformation function s =T (r) that transforms a given

input image so that the output image has a specified histogram.

Solution:

Let pr(r) and ps(s) be the histogram respectively of the input image and

the desired histogram. The function s =T (r) will be computed by:

r

rdwwprH

0

.)()( s

sdwwpsG

0

.)()(

.1rHGz

)(1

zG

pr(r) uniform ps(s)

Page 21: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

Histogram Processing

Histogram Matching : example

8/21/2019 Enhancement in the Spatial Domain 21

Source: Matthew Perry

Page 22: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 22

Local Enhancement

The parameters of most functions presented so far are

computed based on the whole image.

To enhance details in small image areas (example):

1. Select a neighborhood, whose center moves from pixel to pixel

over the image.

2. At each position find the transformation function based on the

pixel neighborhood.

3. Apply the function to the pixel at the center of the neighborhood.

4. Move the center to the next pixel and repeat steps 2 and 3 till all

image is covered.

Page 23: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 23

Local Enhancement

Example: local histogram equalization

Original Image After Global Equalization After Local Equalization

Page 24: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 24

Local Enhancement

Histogram Statistic for Enhancement

Global statistics: the nth moment about the mean

where

Local statistics: Let (x,y) be the pixel coordinates and Sxy a neighborhood with

a given size around (x,y). We define

the average gray level around Sxy

the contrast around Sxy

i

L

i

n

inrpmrr

1

0

1

0

L

i

iirprm

xy

xyxy

Sts

tsStsSrpmr

),(

,

2

,

2

xy

xy

Sts

tstsSrprm

,

,,

Page 25: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 25

Local Enhancement Histogram Statistic for Enhancement (example)

f (x,y) / g (x,y) the input/output images,

MG and DG are the global mean and standard deviation respectively,

E, k0, k1 e k2, are specified parameters.

only dark, non uniform areas

with low contrast are modified

where, otherwise,,

AND if,,

210

yxf

DkDkMkmyxfEyxg

GSGGSxyxy

{E=4;k0=0.4;k1=0.02;k2=0.4}

Page 26: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 26

Local Enhancement Histogram Statistic for Enhancement (example)

f (x,y) / g (x,y) the input/output images,

MG and DG are the global mean and standard deviation respectively,

E, k0, k1 e k2, are specified parameters;

only dark, non uniform areas with low contrast are modified

where , otherwise , ,

AND if , ,

2 1 0

y x f

D k D k M k m y x f E y x g

G S G G S xy xy

0 M k m G S xy

1 D k S G xy

2 D k G S xy

Page 27: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 27

Region of Interest Processing

(ROI) • logical matrices called masks can be used to define regions in

an image (roi) where an operator is to be applied.

• Example: blurring uninteresting regions

input image mask (roi) output image

Page 28: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 28

Spatial Filters

Operation: g(x,y)=T [ f(x,y)],

w1 w3 w2

w7 w9 w8

w4 w6 w5

Response of a linear spatial filter

R=w1z1+ w2z2+ . . .+ w9z9

w1

w1

w1

w1 w3 w2

w7 w9 w8

w4 w6 w5

w1

w1

w1

w1 w3 w2

w7 w9 w8

w4 w6 w5

w1

w1

w1

w1

w1

w1

w1 w3 w2

w7 w9 w8

w4 w6 w5

w1

w1

w1

w1

w1

w1

w1

w1

w1

w1 w3 w2

w7 w9 w8

w4 w6 w5

w1

w1

w1 . . .

w1 w1 w1

w1 w3 w2

w7 w9 w8

w4 w6 w5

w1 w1 w1 w1 w1 w1 w1

w1

w1

w1

w1 w3 w2

w7 w9 w8

w4 w6 w5

Image

a

as

b

bt

tysxftswyxg ,,,

Page 29: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 29

Smoothing Filters

Aplications:

Removal of small details prior to large object extraction.

Noise reduction.

Side Effect

It blurs the image.

Smoothing masks

All elements are non-negative, and

sum up to 1.

Masks

1 1 1

1 1 1

1 1 1 1/9

averaging filter 3×3

1 1 7

1 1 7

7 7 54 1/88

gaussian filter 3×3

Page 30: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 30

Smoothing Filters

Examples of applying an averaging filter :

original 3×3 5×5

7×7 15×15 25×25

Page 31: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 31

Smoothing Filters

Order Statistic Filters

are non-linear spatial filters whose response is

based on ordering (ranking) the pixels contained

in the image area encompassed by the mask, and

then replacing the value of the center pixel with

the value determined by the ranking result.

Page 32: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 32

Smoothing Filters

Order Statistic Filters:

Median Filter

replaces the value of a pixel by the median of the gray

levels in its neighborhood

A median ξ of a set of values is such that half of the

values in the set is lower than ξ and half of the values

in the set is greater than or equal to ξ .

Percentile Filter

replaces the value of a pixel by n-th percentile of the

gray levels in its neighborhood.

Page 33: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 33

Smoothing Filters

Examples :

Original image Image with salt-and-pepper noise

After average 5x5 filtering After median filtering

Page 34: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 34

Adaptive Filter

The output g(x,y) of a adaptive filter depends on

the statistical characteristics of the input image

f(x,y) inside a m×n rectangular window Sxy

centered at (x,y).

L

L

myxfyxfyxg ),(),(),(2

2

variance in Sxy mean in Sxy

variance of the noise (?)

Page 35: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 35

Adaptive Filter

Example

image corrupted by

additive Gaussian

noise of zero mean

and variance 1000

result of an adaptive

noise reduction filter

result of an arithmetic

mean filter

Page 36: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 36

Sharpening Filters

Applications

Highlight of fine details.

Enhance details that have been blurred due to the

acquisition method.

Side Effect

Emphasizes the noise.

Page 37: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 37

Sharpening Filters

Accomplished by spatial differentiation:

Approximation for the 1ª derivative

Approximation for the 2ª derivative

xfxf

x

xfxxf

x

xf

ox

1lim

121

22

2

lim

xfxfxf

x

xxfxfxfxxf

x

xf

ox

Page 38: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 38

Sharpening Filters

Illustration

Page 39: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 39

Sharpening Filters

From the previous slide we may conclude:

1. First-order derivatives generally produce thicker

edges in the image,

2. Second-order derivatives have a stronger response at

the fine details,

3. First-order derivatives generally have a stronger

response to a gray-level step, and

4. Second-order derivatives have a double-response at

step changes in gray level.

Page 40: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 40

Sharpening Filters

Laplacian Filter

Starting from

we obtain

2

2

2

2

2

y

f

x

ff

yxfyxfyxfyxfyxff ,41,1,,1,12

yxfyxfyxfx

f,1,2,1

2

2

1,,21,2

2

yxfyxfyxf

y

f

Page 41: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 41

Sharpening Filters

Laplacian Filter: example of masks

0 1 0

0 1 0

1 -4 1

1 4 1

1 4 1

4 -20 4

1 1 1

1 1 1

1 -8 1

Page 42: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 42

Sharpening Filters

)(2

xf

)( xf

)()(2

xfxf

shaper

transition

Laplacian based filter : an example

if center coefficient <0

if center coefficient >0

The sharpening effect in 1-D

yxfCyxf

yxfCyxfyxf

s

,,

,,,

2

2

Page 43: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 43

Sharpening Filters

Laplacian based filter: a mask example

= 1 0 0

0 0 0

0 0 0

-4 1 1

1 0 0

1 0 0

4C+1 - C - C

-C 0 0

- C 0 0

-C

Page 44: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 44

Sharpening Filters

Laplacian Filter: application example

Imagem Original C=4

C=10 C=6

C=2

C=8

Page 45: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 45

Sharpening Filters

Unsharp masking

Subtracts a blurred version of an image from the image

itself

Example of a mask

yxfyxfyxfum

,,,

= 1 0 0

0 0 0

0 0 0

8/9 -1/9 -1/9

-1/9 -1/9 -1/9

-1/9 -1/9 -1/9

- 1 1 1

1 1 1

1 1 1

1/9

output of a smoothing filter

Page 46: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 46

Sharpening Filters

Filter High-Boost

It is a generalization of unsharp masking, given by

If we elect to use the Laplacian filter for sharpening

if center coefficient <0

if center coefficient >0

1for ,,, AyxfyxAfyxfhb

output of a sharpening filter

yxfyxAf

yxfyxAfyxf

hb

,,

,,,

2

2

1for ,,1, AyxfyxfAyxfshb

Page 47: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 47

Sharpening Filters

Filter High-Boost: example

original

image

high-boost

with A=1

laplacian

high-boost

with A=1.7

Page 48: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 48

Sharpening Filters

The Gradient

y

f

x

f

f

2/122

y

f

x

fmagf f

Page 49: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 49

Sharpening Filters

Masks for the Gradient

-1 0

0 1

0 -1

1 0

Roberts

0 0 0

1 1 1

-1 -1 -1

0 1 -1

0 -1

1

0 -1 1

Prewitt

0 0 0

2 1 1

-2 -1 -1

0 2 -2

0 -1

1

0 -1 1

Sobel

Page 50: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 50

Sharpening Filters Gradient: example

original image

|Gx|+|Gy| (sobel)

|Gy| (sobel) |Gx| (sobel)

Page 51: Image Enhancement in the Spatial Domainraul/ImageAnalysis/Enhancement.pdf · 8/21/2019 Enhancement in the Spatial Domain 22 Local Enhancement The parameters of most functions presented

8/21/2019 Enhancement in the Spatial Domain 51

Next Topic

Image Enhancement

in the Frequency

Domain