Professional Documents
Culture Documents
CEN 545
Digital Image Processing
Lecture Notes 1 and 2
Introduction
Images as Signals:
Signal: x(t)
CEN 545
Image : f ( x, y) Intensity at x,y (continuous)
f ( x, y) Intensity at pixel x,y (discrete)
Video image: function of space and each space point is function of time.
h ( m, n )
g ( m, n) f (m, n) h( m, n)
In frequency domain
G (u , v) F (u , v ) H (u , v)
Where a and b are chosen to achieve a desired intensity variation in the image.
Note that the output g ( m, n) here depends only on the input f (m, n) at m,n.
2. Local Operations: determine the output pixel intensity as some function of a
relatively small neighborhood of input pixels in the vicinity of the output location. A
general linear operator can be expressed as weighted of picture elements within a
local neighborhood N.
g ( m, n) a
k , l N
k ,l f (m k , n l )
Simple local smoothing (for noise reduction) and sharpening (for deploring or edge
enhancement) operators can be both linear and non-linear.
3. Global Operations: the outputs depend on all input pixels values. If linear, global
operators can be expressed using two-dimensional convolution.
g (m, n) f (m, n) h(m, n) h( k , l ) f ( m k , n l )
k , l N
f (m, n) g ( m, n)
Statistical
estimate
5. Non-Linear Filters:
Median/order statistics
Non-linear local operations
0 255
0 255
Optimal contrast
0 255
By allowing the gray level value to vary continuously, over [0, 1]: p(r), 0 r 1 is called
gray level probability density function (glpdf).
How do transformations (i.e., point operations) affect contrast (glpdf) of the image?
Point
f (m, n) operation g ( m, n)
Suppose g (m, n) af (m, n) b
Let r g l in the input image
s g l in the output image
s ar b T (r ) s
s a r b
pg(s) T(r)
2s a 2
2r
Proof:
pf(r)
2s 2
E[(s s ) ]
E[(ar b a r b) 2 ] r
E[ a 2 (r r ) 2 ] a 2 2r #
For a > 1 contrast increasing stretching
Example:
Consider s r 2
g l below 1
2 are compressed and above
1
2 are
stretched 12
Enhances contrast for bright images.
p f (r )
p g ( s)
ds
dr r T 1 ( s )
Example:
Find pg(s) in terms of pf(r) if (a) s ar b (b) s r 2
(a) s T (r ) ar b
s b
r T 1 ( s )
a Pf s a b
Pg ( s )
ds a
a
dr
(b) Pg ( s )
Pf s
2 s
Histogram Equalization
Find s = T(r) such that Pg ( s ) 1 0 s 1
(uniform)
r k
ds
dr
Pf ( r ) s Pf ( x) dx or l Pf ( j )
j 0
?
0
(b) Pf (r ) 1 cos 2r
r r
sin 2x sin 2r
T ( r ) (1 cos 2x ) dx x r
0 2 0 2
Example:
(Artifacts of quantization) practical issues
2k
Pf (k ) 0k 7
56
(a) What T(k) that best enhances the contrast of this
image?
(b) Plot Hg(l).
Solution:
(a)
k k
2j 2 2 k (k 1) k (k 1)
T (k ) 56 56 j 56 2
56
j 0 j 0
(b)