image enhancement in spatial domain
DESCRIPTION
this ppt consist of the image enhancement in spatial domain.TRANSCRIPT
-
5/28/2018 image enhancement in spatial domain
1/68
Image Enhancement
(Spatial Domain Methods)
-
5/28/2018 image enhancement in spatial domain
2/68
What Is Image Enhancement?
Image enhancement is the process of making
images more useful
The reasons for doing this include:
Highlighting interesting detail in images
Removing noise from images
Making images more visually appealing
-
5/28/2018 image enhancement in spatial domain
3/68
Image Enhancement
Enhance otherwise hidden information Filter important image features
Discard unimportant image features Emphasize, sharpen or smoothen image
features
-
5/28/2018 image enhancement in spatial domain
4/68
Classification of Image enhancement
Spatial Domain
Process intensity of pixels
Two types- intensity transformation and spatialfiltering
Transform Domain
Transform image, process it and then find inversetransform to get image in spatial domain
-
5/28/2018 image enhancement in spatial domain
5/68
Basic of Spatial Domain Filtering
Origin y
x Image f (x, y)
(x, y)
g (x, y) = T[ f (x, y)]
f (x, y)is the
input image
g (x, y)is
the processed image
and Tis operator definedover some neighbourhood
of (x, y)
-
5/28/2018 image enhancement in spatial domain
6/68
Point Processing
Point processing operations take the form
s = T ( r )
srefers to the processed image pixel value and rrefers to the original image pixel value
Tis referred to as agrey level transformation function
or apoint processing operationf(x,y) g(x,y)
-
5/28/2018 image enhancement in spatial domain
7/68
Spatial Domain
The operator T can be defined over
The set of pixels (x,y) of the image
The set of neighborhoods, N(x,y) ofeach pixel
-
5/28/2018 image enhancement in spatial domain
8/68
Point operation
Mask operation
Global operation
Classification of spatial domain
-
5/28/2018 image enhancement in spatial domain
9/68
Brightness modification
Contrast manipulation
Histogram manipulation
Point operation
-
5/28/2018 image enhancement in spatial domain
10/68
Operation on the set of image-pixels
6 8 2 0
12 200 20 10
3 4 1 0
6 100 10 5
Spatial Domain
(Operator: Div. by 2)
-
5/28/2018 image enhancement in spatial domain
11/68
Operation on the set of neighborhood
6 8 2 0
12 200 20 10
226
Spatial Domain
6 8
12 200
(Operator: sum)
-
5/28/2018 image enhancement in spatial domain
12/68
Global Operation
6 8 2 0
12 200 20 10
Spatial Domain
5 5 1 0
2 20 3 4
11 13 3 0
14 220 23 14
(Operator: sum)
-
5/28/2018 image enhancement in spatial domain
13/68
Gray Level/Intensity Transformations
Brightness modification
Image negatives Piecewise-Linear transformationFunctions
Log transformations Power Law transformations
Transformations
-
5/28/2018 image enhancement in spatial domain
14/68
Intensity Level Transformations
Linear
Negative/Identity
Logarithmic
Log/Inverse log
Power law
nth
power/nth
root
-
5/28/2018 image enhancement in spatial domain
15/68
Suited for enhancing white or grey detail embedded indark region and black area predominates
Image Negative
Input gray level
O
utputgraylev
el g(x,y)= 255- f(x,y)
-
5/28/2018 image enhancement in spatial domain
16/68
Logarithmic Transformations
The log transformation maps a narrow range of low
input grey level values into a wider range of output
values
The inverse log transformation performs theopposite transformation
g(x,y) = c * log (1+ f(x,y))
-
5/28/2018 image enhancement in spatial domain
17/68
Log Transformations
InvLog Log
Input grey level values has large range of values
T f i
-
5/28/2018 image enhancement in spatial domain
18/68
Log Transformations
Logarithm of FT reveals more details
Range, 0 to 106becomes 0 to 6.2
P L T f ti
-
5/28/2018 image enhancement in spatial domain
19/68
Power Law Transformations
T(f) = c*f
f
-
5/28/2018 image enhancement in spatial domain
20/68
> 1
Compresses dark values Expands bright values
< 1 Expands dark values Compresses bright values
Transformations
-
5/28/2018 image enhancement in spatial domain
21/68
Power Law Transformations
s = c * r
Map a narrow range of dark input values into awider range of output values or vice versa
Varying gives a whole family of curves
-
5/28/2018 image enhancement in spatial domain
22/68
Application of gamma correction
A cathode ray tube (CRT) converts a video signal
to light in a nonlinear way.
The light intensityIis proportional to a power ()
of the source voltage V, (I=V)
For a computer CRT, is about 2.2
To view image on monitors -correction is required
Application of gamma correction
-
5/28/2018 image enhancement in spatial domain
23/68
Application of gamma-correction
-
5/28/2018 image enhancement in spatial domain
24/68
Power Law Example
Magnetic Resonance
(MR) image of a
fractured human
spine
-
5/28/2018 image enhancement in spatial domain
25/68
Power Law Example ( = 0.6)
= 0.6
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.2 0.4 0.6 0.8 1
Old Intensities
TransformedInte
nsities
l ( )
-
5/28/2018 image enhancement in spatial domain
26/68
Power Law Example ( = 0.4)
= 0.4
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.2 0.4 0.6 0.8 1
Original Intensities
TransformedIntensities
-
5/28/2018 image enhancement in spatial domain
27/68
Power Law Example ( = 0.3)
= 0.3
0
0.1
0.2
0.3
0.4
0.5
0.60.7
0.8
0.9
1
0 0.2 0.4 0.6 0.8 1
Original Intensities
TransformedInten
sities
P L E l ( )
-
5/28/2018 image enhancement in spatial domain
28/68
Power Law Example (cont)
s = r 0.6
s=
r0.4
Power Law Example
-
5/28/2018 image enhancement in spatial domain
29/68
Power Law Example
(Image with washed out appearance)
An aerial view
of a runway
-
5/28/2018 image enhancement in spatial domain
30/68
Image after gamma correction (> 1)
= 5.0
0
0.1
0.2
0.3
0.4
0.5
0.60.7
0.8
0.9
1
0 0.2 0.4 0.6 0.8 1
Original Intensities
TransformedInten
sities
-
5/28/2018 image enhancement in spatial domain
31/68
Different
curves
highlight
different
detail
s = r 3.0
s=
r4.0
Brightness/contrast modification
-
5/28/2018 image enhancement in spatial domain
32/68
Brightness/contrast modification
g(m,n) = f(m,n) + k (increase brightness)
g(m,n) = f(m,n)k (decrease brightness)
Piecewise Linear Transformations
-
5/28/2018 image enhancement in spatial domain
33/68
Thresholding Function
g(x,y) = L-1, f(x,y) > t
= 0, f(x,y) < t
t = threshold level
Piecewise Linear Transformations
Input gray level
Outputg
raylevel
Thresholding
-
5/28/2018 image enhancement in spatial domain
34/68
Thresholding
Thresholding transformations are particularly useful
for segmentation in which we want to isolate an
object of interest from a background
s =1.0
0.0 r threshold
Contrast stretching
-
5/28/2018 image enhancement in spatial domain
35/68
Contrast stretching
Gray/Intensity Level Slicing
-
5/28/2018 image enhancement in spatial domain
36/68
Highlight a specific range of gray values
Two approaches:
Display high value for range of interest, lowvalue else (discard background)
Display high value for range of interest,original value else (preserve background)
y y g
Gray Level Slicing, example
-
5/28/2018 image enhancement in spatial domain
37/68
y g, p
-
5/28/2018 image enhancement in spatial domain
38/68
Bit Plane Slicing
Isolate particular bits ofintensity value
Shows contribution of
each bit
Higher-order bits usually
contain most of the
significant visual
informationLower-order bits
contain subtle details
Intensity= (b7b6b5b4b3b2b1b0)
-
5/28/2018 image enhancement in spatial domain
39/68
y 6 5 3 0
BP 7
BP 5
BP 0
Bit Plane Slicing (example)
-
5/28/2018 image enhancement in spatial domain
40/68
Bit Plane Slicing (example)
Intensity= (b7
b6
b5
b4
b3
b2
b1
b0
)
-
5/28/2018 image enhancement in spatial domain
41/68
Bit Plane Slicing (plane 1)
i l Sli i ( l 2)
-
5/28/2018 image enhancement in spatial domain
42/68
Bit Plane Slicing (plane 2)
Bi Pl Sli i ( l 3)
-
5/28/2018 image enhancement in spatial domain
43/68
Bit Plane Slicing (plane 3)
Bi Pl Sli i ( l 4)
-
5/28/2018 image enhancement in spatial domain
44/68
Bit Plane Slicing (plane 4)
Bit Pl Sli i ( l 5)
-
5/28/2018 image enhancement in spatial domain
45/68
Bit Plane Slicing (plane 5)
Bit Pl Sli i ( l 6)
-
5/28/2018 image enhancement in spatial domain
46/68
Bit Plane Slicing (plane 6)
Bit Pl Sli i ( l 7)
-
5/28/2018 image enhancement in spatial domain
47/68
Bit Plane Slicing (plane 7)
Bit Pl Sli i ( l 8)
-
5/28/2018 image enhancement in spatial domain
48/68
Bit Plane Slicing (plane 8)
Bit Plane Slicing (cont )
-
5/28/2018 image enhancement in spatial domain
49/68
Bit Plane Slicing (cont)
Reconstructed image
using only bit planes 8
and 7
Reconstructed image
using only bit planes 8, 7
and 6
Reconstructed image
using only bit planes 7, 6
and 5
Histogram
-
5/28/2018 image enhancement in spatial domain
50/68
gray level
Number
ofPixels
0 1 2 3
1 3 0 1
4
1 2
5
Plot of number of occurrences of grey levels against
grey level values
Histogram of image
-
5/28/2018 image enhancement in spatial domain
51/68
Histogram Examples
-
5/28/2018 image enhancement in spatial domain
52/68
g p
Histogram Examples (cont)
-
5/28/2018 image enhancement in spatial domain
53/68
g p ( )
Histogram Examples (cont)
-
5/28/2018 image enhancement in spatial domain
54/68Histogram Examples (cont)
-
5/28/2018 image enhancement in spatial domain
55/68Histogram Examples (cont)
-
5/28/2018 image enhancement in spatial domain
56/68
High contrast
image has the mostevenly spaced histogram
Histogram Equalization
-
5/28/2018 image enhancement in spatial domain
57/68
Equal number of pixels for every gray-value Histogram is constant Preprocessing technique to enhance contrast in
natural images
Find gray level transformation function T to transformimage f such that the histogram of T(f) is equalized
Spreading out the frequencies in an image (orequalising the image) improves dark or washed out
images
Equalisation Transformation Function
-
5/28/2018 image enhancement in spatial domain
58/68Histogram Equalisation
-
5/28/2018 image enhancement in spatial domain
59/68
rk:input intensity
sk:processed intensity k: the intensity range
nj:the frequency of intensityj
n: the sum of all frequencies
)( kk rTs
k
j
jj rp1
)(
k
j
j
n
n
1
Histogram Equalisation
-
5/28/2018 image enhancement in spatial domain
60/68
Spread out gray levels to evenly distributein the range
Find cumulative frequency distribution Normalize by dividing by total number ofpixels
Multiply by maximum gray value
Map gray levels
Equalisation Transformation Functions
-
5/28/2018 image enhancement in spatial domain
61/68
Histogram Equalization
-
5/28/2018 image enhancement in spatial domain
62/68How does it work ?
-
5/28/2018 image enhancement in spatial domain
63/68
Mean value (or average gray level)
-
5/28/2018 image enhancement in spatial domain
64/68
m = irip(ri)
=1*0.3+2*0.1+3*0.2+4*0.1+5*0.2+6*0.1=2.6
Mean value represents overall brightness
P(r)
0.3
0.2
0.1
0.01 2 3 4 5 6 r
Variance
-
5/28/2018 image enhancement in spatial domain
65/68
gives a measure of the distribution of
histogram values around the mean
0.3
0.2
0.1
0.0
0.3
0.2
0.10.0
V1 =3.34 V2=0.24
v = 2= i(ri-m)2p(ri) M=2.6, v1=(1-2.6)2x0.3+
Standard Deviation
A l th l l i h i
-
5/28/2018 image enhancement in spatial domain
66/68
A value on the gray level axis, showing average
distance of all pixels to the mean
0.3
0.2
0.1
0.0
0.3
0.2
0.1
0.0
D1 > D2
= sqrt(v)
Histograms
V i d St d d D i ti f th
-
5/28/2018 image enhancement in spatial domain
67/68
Variance and Standard Deviation of the
histogram represent average contrast of the
image
The higher the Variance (=the higher the
Standard Deviation), the higher the imagescontrast
Histograms
Hi t ith d St d d d i ti
-
5/28/2018 image enhancement in spatial domain
68/68
Histograms with mean and Standard deviation
M=0.73 D=0.32 M=0.71 D=0.27