0% found this document useful (0 votes)
11 views18 pages

UCSE715 - Slide 3

Uploaded by

u21cse1034
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views18 pages

UCSE715 - Slide 3

Uploaded by

u21cse1034
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

08-08-2024

Intensity Transformation
Spatial Filtering
Image Enhancement

UNIT- II

Spatial Domain vs. Transform Domain

► Spatial domain
image plane itself, directly process the intensity values of
the image plane

► Transform domain
process the transform coefficients, not directly process the
intensity values of the image plane

1
08-08-2024

Spatial Domain Process

g ( x, y )  T [ f ( x, y )])
f ( x, y ) : input image
g ( x, y ) : output image
T : an operator on f defined over
a neighborhood of point ( x, y)

Spatial Domain Process

2
08-08-2024

Spatial Domain Process

Intensity transformation function


s  T (r )

Some Basic Intensity Transformation


Functions

3
08-08-2024

Image Negatives

Image negatives
s  L 1 r

Example: Image Negatives

Small
lesion

4
08-08-2024

Log Transformations

Log Transformations
s  c log(1  r )

Example: Log Transformations

5
08-08-2024

Power-Law (Gamma) Transformations

s  cr 

Example: Gamma Transformations

6
08-08-2024

Example: Gamma Transformations


Cathode ray tube
(CRT) devices have an
intensity-to-voltage
response that is a
power function, with
exponents varying
from approximately
1.8 to 2.5

s  r1/ 2.5

Example: Gamma Transformations

7
08-08-2024

Example: Gamma Transformations

Piecewise-Linear Transformations

► Contrast Stretching
— Expands the range of intensity levels in an image so that it spans
the full intensity range of the recording medium or display device.

► Intensity-level Slicing
— Highlighting a specific range of intensities in an image often is of
interest.

8
08-08-2024

Highlight the major


blood vessels and
study the shape of the
flow of the contrast
medium (to detect
blockages, etc.)

Measuring the actual


flow of the contrast
medium as a function
of time in a series of
images

9
08-08-2024

Bit-plane Slicing

Bit-plane Slicing

10
08-08-2024

Bit-plane Slicing

Histogram Processing

► Histogram Equalization

► Histogram Matching

► Local Histogram Processing

► Using Histogram Statistics for Image Enhancement

11
08-08-2024

Histogram Processing

Histogram h( rk )  nk
rk is the k th intensity value
nk is the number of pixels in the image with intensity rk

nk
Normalized histogram p( rk ) 
MN
nk : the number of pixels in the image of
size M  N with intensity rk

12
08-08-2024

Histogram Equalization
The intensity levels in an image may be viewed as
random variables in the interval [0, L-1].
Let pr (r ) and ps ( s) denote the probability density
function (PDF) of random variables r and s.

Histogram Equalization

s  T (r ) 0  r  L 1

a. T(r) is a strictly monotonically increasing function


in the interval 0  r  L -1;
b. 0  T (r )  L -1 for 0  r  L -1.

13
08-08-2024

Histogram Equalization

s  T (r ) 0  r  L 1

a. T(r) is a strictly monotonically increasing function


in the interval 0  r  L -1;
b. 0  T ( r )  L -1 for 0  r  L -1.

T (r ) is continuous and differentiable.

ps (s)ds  pr (r)dr

Histogram Equalization

r
s  T ( r )  ( L  1)  pr ( w)dw
0

ds dT (r ) d r
  ( L  1)   pr ( w)dw
dr dr dr  0 
 ( L  1) pr ( r )

pr ( r ) dr pr ( r ) p (r ) 1
ps ( s )    r 
ds  ds   ( L  1) pr (r )  L  1
 
 dr 

14
08-08-2024

Example
Suppose that the (continuous) intensity values
in an image have the PDF

 2r
 , for 0  r  L-1
pr (r )   ( L  1) 2
 0, otherwise

Find the transformation function for equalizing


the image histogram.

Example
r
s  T ( r )  ( L  1)  pr ( w)dw
0

r 2w
 ( L  1)  dw
0 ( L  1) 2
r2

L 1

15
08-08-2024

Histogram Equalization
Continuous case:
r
s  T (r )  ( L  1)  pr ( w)dw
0

Discrete values:
k
sk  T (rk )  ( L  1) pr (rj )
j 0
k nj L 1 k
 ( L  1)   nj k=0,1,..., L-1
j  0 MN MN j 0

Example: Histogram Equalization


Suppose that a 3-bit image (L=8) of size 64 × 64 pixels (MN = 4096)
has the intensity distribution shown in following table.
Get the histogram equalization transformation function and give the
ps(sk) for each sk.

16
08-08-2024

Example: Histogram Equalization

0
s0  T ( r0 )  7  pr ( rj )  7  0.19  1.33 1
j 0
1
s1  T (r1 )  7 pr ( rj )  7  (0.19  0.25)  3.08 3
j 0
s2  4.55  5 s3  5.67  6
s4  6.23  6 s5  6.65  7
s6  6.86  7 s7  7.00  7

Example: Histogram Equalization

17
08-08-2024

1 3 4 2

18

You might also like