image enhancement using arithmetic/logical operations
TRANSCRIPT
Digital Image Processing
Image Enhancement Using Arithmetic/Logical Operations
Enhancement Using Arithmetic/Logic
Operations
AND
OR
NOT
Subtraction
Addition
Multiplication
Division
Image subtraction
Enhancement of differences between images
),(),(),( yxhyxfyxg
Mask mode radiography
Image Averaging
Averaging K different noisy images
),(),(),( yxyxfyxg
K
i
i yxgK
yxg1
),(1
),(
),(),( yxfyxgE
2
),(
2
),(
1yxyxg
K
),(),(
1yxyxg
K ,
Basics of Spatial Filtering
)1,1()1,1(
),1()0,1(
),()0,0(
),1()0,1(
)1,1()1,1(
yxfw
yxfw
yxfw
yxfw
yxfwR
Image size:
Mask size:
and
and
NM nm
a
as
b
bt
tysxftswyxg ),(),(),(
2/)1( ma 2/)1( nb
1,...,2,1,0 Mx 1,...,2,1,0 Ny
9
1
992211
...
i
ii zw
zwzwzwR
Smoothing Spatial Filters
Smoothing
Noise reduction
Smoothing of false contours
Reduction of irrelevant detail
9
19
1
i
izR
a
as
b
bt
a
as
b
bt
tsw
tysxftsw
yxg
),(
),(),(
),(
Order-statistic filters
median filter: Replace the value of a pixel by the median of the gray levels in the neighborhood of that pixel
Noise-reduction
Sharpening Spatial Filters
Foundation
The first-order derivative
The second-order derivative
)()1( xfxfx
f
)(2)1()1(2
2
xfxfxfx
f
Use of second derivatives for enhancement-The Laplacian
Development of the method
),(2),1(),1(2
2
yxfyxfyxfx
f
2
2
2
22
y
f
x
ff
),(2)1,()1,(2
2
yxfyxfyxfy
f
),(4)]1,(
)1,(),1(),1([2
yxfyxf
yxfyxfyxff
positive is
mask Laplacian theof
tcoefficiencenter theif
),(),(
negative is
mask Laplacian theof
t coefficiencenter theif
),(),(
),(
2
2
yxfyxf
yxfyxf
yxg
Simplifications
)]1,(
)1,(),1(),1([),(5
),(4)]1,(
)1,(),1(),1([),(),(
yxf
yxfyxfyxfyxf
yxfyxf
yxfyxfyxfyxfyxg
Unsharp masking and high-boost filtering
Unsharp masking
Substract a blurred version of an image from the image itself
: The image, : The blurred image
),(),(),( yxfyxfyxfs
),( yxf ),( yxf
High-boost filtering
),(),(),( yxfyxAfyxfhb
),(),(),()1(),( yxfyxfyxfAyxfhb
),(),()1(),( yxfyxfAyxf shb
Use the Laplacian as the sharpening filtering
positive is
mask Laplacian theof
tcoefficiencenter theif
),(),(
negative is
mask Laplacian theof
t coefficiencenter theif
),(),(
2
2
yxfyxAf
yxfyxAf
fhb
Use of first derivatives for enhancement—The gradient
y
fx
f
G
G
y
xf
The magnitude is rotation invariant (isotropic)
2
122
21
22
)(mag
y
f
x
f
GGf yxf
yx GGf
Computing using cross differences, Roberts cross-gradient operators
)( 59 zzGx )( 68 zzGy and
21
2
68
2
59 )()( zzzzf
6859 zzzzf
Sobel operators
A weight value of 2 is to achieve some smoothing by giving more importance to the center point
)2()2(
)2()2(
741963
321987
zzzzzz
zzzzzzf
Combining Spatial Enhancement
Methods
An example
Laplacian to highlight fine detail
Gradient to enhance prominent edges
Smoothed version of the gradient image used to mask the Laplacian image
Increase the dynamic range of the gray levels by using a gray-level transformation
Example 2
Arithmetic Operations
Write a computer program capable of performing the four arithmetic operations between two images. This project is generic, in the sense that it will be used in other projects to follow. In addition to multiplying two images, your multiplication function must be able to handle multiplication of an image by a constant.