Sie sind auf Seite 1von 21

Chapter 4.

Image Enhancement
! Processing oI images to bring out speciIic Ieatures oI an image
! Highlight certain characteristics oI an image
! to process image so that the result is more suitable than the original image Ior a
speciIic application (very much problem-oriented)
! Categories
- spatial domain method
: based on direct manipulation oI pixels in image
- point processing
- mask processing
- Irequency domain method
: based on modiIying ET oI image
- combination two domain method
! Color image enhancement
4.1 Background
4.1.1 Spatial Domain Method
- contrast and dynamic range modification
- noise reduction
- edge enhancement and detection
! )| , ( | ) , ( v x f T v x g = :
T : operator on f deIined over some neighborhood oI (x,v)
f: input, g: output (processed image)
! neighborhood :
- pixel group processing
- mask, template, window or Iilter
- image is MRE !!
rectangular subimage area centered at (x,y).
! the simplest Iorm oI T :
- neighborhood : 11
- depends only on the value f at (x,v)
- ex) T: gray-level transIormation Iunction ) (r T S =
(a) to produce image oI higher contrast (contrast stretching tech. )
(b) to produce two-level binary image (thresholding)
- point processing technique.
- Simple, powerIul processing technique.
! mask approach :
- larger neighborhood
- 2D array; values oI the arary determine the nature oI process (ex. Image
shapening)
4.1.2 Freq. Domain Method
! convolution theorem :
) , ( ) , ( ) , ( v x f v x h v x g =
where h(x,v) : operator
) , ( ) , ( ) , ( v u F v u H v u G =
H(u,v) : transIer Iunction
! goal :
- to select H(u,v) so that the desired image

1
v u F v u H y x g

= F
exhibits some highlighted Ieature oI f(x,v)
ex) edge enhancement
: use a Iunction H(u,v) that emphasize the high-Irequency components oI
F(u,v)
! H(u,v), h(x,v)
- impulse response
- in optics
h(x,v) : point spread Iunction (blurring (spreading) the point)
- spatial convolution mask
4.2 Enhancement by Point Processing
: the simplest method
4.2.1 Some simple intensity transformations
1)image negatives; (complements)
(a) ) (r T s = , r : intensity oI pixels beIore processing, s : intensity oI pixels aIter
processing
(b)image ,(c) its negative
2) contrast stretching :
! low contrast image :
- poor illumination
- lack oI dynamic range in imaging sensor
- wrong setting oI lens aperture
! basic idea :
- increase the dynamic range oI gray level
(a)transIormation Iunction location (b) low-contrast image
(c) contrast stretched image (d) binary image ) 1 , 0 , (
2 1 2 1
= = = L s s r r
in general
2 1 2 1
, s s r r
3) compression oI dynamic range :
! image with large dynamic range that exceeds the capability oI the display device :
only the brightest parts oI image : visible on screen
(ex. Display oI ET spectrum oI image)
! intensity transIorm :
) 1 log( r c s + =
4) gray-level slicing :
! highlighting a speciIic range oI gray level :
(a)the range oI interest : high gray level, all other : low gray level
(b)the range oI interest : high gray level, all other : preserve
5) bit-plane slicing :
1-bit planes : Irom MSB to LSB
" only 5 highest order bits contain visually signiIicant data
4.2.2 Histogram Processing (Modeling)
" "" " modify an image so that its histogram has a desired shape
! histogram :
- discrete Iunction
n n r p
k k
/ ) ( =
where
k
r : k-th gray level
k
n : number oI pixels with k-th gray level in image
n : total number oI pixels in image
: 0,1,2,.,L-1
- ) (
k
r p : probability oI occurrence oI gray level
k
r
(a) dark (b) bright (c) little dynamic range (low contrast)
(d) large dynamic range (high contrast, well-balanced)
1) histogram equalization (linearization) : global processing
! r : continuos gray level with interval |0,1|
! transIormation
s T(r)
(a) T(r) : single-valued, monotonically increasing (the order Irom black to white in
gray scale); preserve the order Irom black to white
(b) 1 ) ( 0 r T Ior 1 0 r ; _ ~ !_
! inverse transIormation :

1
s 1 r

= 1 0 s
: satisIied two conditions
! s, r : random variables :
- ) (s P
s
, ) (r P
r
: prob. density Iunction
- Irom prob. theory
) (

) ( ) (
s T r
r s
ds
dr
r P s P

=
! transIormation Iunction :

= =
r
r
dw w P r T s
0
) ( ) ( 1 0 r
: cumulative distribution Iunction (CDE) oI r
) (r P
dr
ds
r
=
) (

) (
1
) ( ) (
s T r
r
r s
r P
r P s P

=
= 1 0 s
: uniIorm density !
independent oI the inverse transIormation Iunction
increase in the dynamic range oI pixels
considerable eIIect in appearance oI image
! discrete Iorm :
- prob. oI k-th gray level
- plot oI ) (
k r
r P versus
k
r : called histogram
- histogram equalization (or linearization)
-

=
= =
k
f
i
k k
n
n
r T S
0
) (

=
=
k
f
f r
r P
0
) ( 1 0
k
r and k0,1,2,.,L-1
- inverse transIormation

1
k k
s 1 r

= 1 0
k
s
(a) 512512 8-bit image (b) histogram oI image
(c) the result oI histogram equalization (d) its histogram
- increase in dynamic range
- similar enhancement
: can be achieved by using the contrast stretching
: manual manipulation
: histogram equalization Iully automatic
2) histogram speciIication :
! histogram equalization :
- only one result : uniIorm histogram
- not lend itselI to interactive image enhancement application
! procedure to speciIy particular histogram shape :
i.

= =
r
r
dw w P r T s
0
) ( ) ( ; histogram equalization
ii.

= =
:
:
dw w P : G v
0
) ( ) ( ; speciIy desired density Iunction and obtain xIorm Iunction
) (: P
:
: pdI oI desired image
) (: G : transIormation Iunction
speciIies
iii. apply inverse transIormation Iunction ) (
1
s G x

= to the levels obtained in step
- the new gray level : characterized by the speciIied density ) (: P
:
! combined transIormation Iunction :

1 1
r 1 G s G :

= =
iI
1
r 1 r 1 G =

histogram equalization
! methods to construct a meaningIul histogram :
i. to speciIy a particular pdI (ex. Gaussian Iunction) and then Iorm a histogram by
digitizing the given Iunction
ii. to speciIy a histogram shape by mean oI a graphic device (ex. Interactive screen,
drawing tablet) whose output is Ied into processor executing the histogram
speciIication algorithm
ex.) p. 181
3) local enhancement :
! enhancement in details over small areas :
- transIormation Iunctions based on the gray -level distribution in the
neighborhood oI every pixel in the image
- procedure
# deIine a square oI rectangular neighborhood
# move the center oI the area Irom pixel to pixel
# each location, histogram transIormation is obtained
# map the gray level oI pixel centered in the neighborhood
# window : moved to adjacent pixel location
# the procedure : repeated
# only one new row or column oI neighborhood : changed
# updating the histogram (recursive)
(a): image slightly blurred to reduce its noise center, (b): result oI global histogram
equalization, considerable enhancement oI noise, slight increase in contrast, no new
structural details, (c): local histogram equalization with 77 window, reveal small
square, Iiner noise texture
! local enhancement using pixel intensities :
- intensity mean
# measure oI average brightness
- variance
# measure oI contrast
- transIormation at each location (x,y)
) , ( )] , ( ) , ( | ) , ( ) , ( v x m v x m v x f v x A v x g + =
) , ( / ) , ( v x kM v x A = 1 0 k
where I(x,y) : input image
g(x,y) : output
m(x,y) : gray level mean computed in a neighborhood centered at
(x,y)
(x,y) : gray level standard deviation
M : global mean oI I(x,y)
4.2.3 Image Subtraction
! application areas :
- digital subtraction angiography
- motion detection and tracking
- background elimination
! diIIerence between two images I(x,y) and h(x,y)
) , ( ) , ( ) , ( v x h v x f v x g =
! mask mode radiography
- ) , ( v x h : mask, image
: image captured by intensiIier located opposite as x-ray source
- ) , ( v x f : image
: image acquired aIter injection oI a dye
- ) , ( ) , ( ) , ( v x h v x f v x g =
4.2.4 Image Averaging
! noisy image :
- ) , ( ) , ( ) , ( v x v x f v x g + =
- noise : uncorrelated, zero mean value (assumption)
- by averaging M diIIerent noisy images
iI

=
=
M
i
i
v x g
M
v x g
0
) , (
1
) , ( `
) , ( )} , ( ` v x f v x g E =
2
) , (
2
) , ( `
1
v x v x g
M

=
- standard deviation at any point in average image
) , ( ) , ( `
1
v x v x g
M

=
4.3 Spatial Filtering
! use of spatial masks for image processing
! linear and non-linear spatial filters fro image enhancement
! high-frequency components: edges and sharp details or noises
! low-frequency components: slowly varying characteristics
4.3.1 Background
! LPE : image blurring
! HPE :
- eliminate low Ireq. Components (overall contrast, average intensity)
- sharpening oI edges
! BPE :
- used Ior image restoration
- seldom oI interest in image enhancement
- Iilter in Ireq. Domain
- corresponding spatial Iilter
! spatial Iiltering :
- to sum products between the mask coeIIicients. And the intensities oI the pixels
under mask at a speciIic location in the image
33 mask
-

=
=
9
1 i
i i
: w R
where
i
w : mask coeIIs.
i
: : gray levels oI pixels under mask
! nonlinear Iilters :
- median, max, min Iilters
4.3.2 Smoothing filters
! purpose :
- blurring, noise reduction
- blurring
# removal oI small details Irom image prior to object extraction
# bridging oI small gap in lines oI curves
1)Lowpass spatial Iiltering
! All coeIIs. : positive
- modeled by sampled Gaussian Iunction
: neighborhood averaging
2)Median Iiltering
! Objective :
- noise reduction rather than blurring
-
! Gray level oI each pixel :
- replaced by median oI gray level in mask
! EIIective in reduction oI strong, spikelike noise
! 33 mask :
- median value : 5
th
largest value
! equal value :
ex) (10, 20, 20, 20, 15, 20, 20, 25, 100)

sorting
(10, 15, 20, 20, 20, 20, 20, 25, 100)
median value : 20
! principal Iunction oI median Iilter :
- Iorce points with distinct intensities to be more like their neighbors
ex.)

Das könnte Ihnen auch gefallen