0% found this document useful (0 votes)
53 views

Digital Image Processing: Lecture # 4

This document provides an overview of digital image processing techniques for image enhancement. It discusses point processing methods that transform pixel values based on their individual values, including linear, logarithmic, and power law transformations. Linear transformations include negative images and intensity scaling. Logarithmic transformations map a narrow range of input values to a wider range of output values. Power law transformations with gamma values less than 1 expand dark pixel values and compress bright values, enhancing contrast. These point processing techniques can improve image quality and enhance features for analysis.

Uploaded by

Saba Mehmood
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)
53 views

Digital Image Processing: Lecture # 4

This document provides an overview of digital image processing techniques for image enhancement. It discusses point processing methods that transform pixel values based on their individual values, including linear, logarithmic, and power law transformations. Linear transformations include negative images and intensity scaling. Logarithmic transformations map a narrow range of input values to a wider range of output values. Power law transformations with gamma values less than 1 expand dark pixel values and compress bright values, enhancing contrast. These point processing techniques can improve image quality and enhance features for analysis.

Uploaded by

Saba Mehmood
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/ 44

Digital Image Processing

Lecture # 4
( Dr M Mohsin Riaz )
Study Assignment??

 Bilinear Interpolation

 Bicubic Interpolation

2
Contents

• Image Enhancement
• Types of Enhancement Operations
• Point Processing
• Linear, Logarithmic & Power Law Transformations
• Contrast Stretching
• Gray Level Slicing
• Bit-Plane Slicing
Image Enhancement

4
Image Enhancement

5
Image Enhancement

 Process an image so that the result is more suitable than


the original image for a specific application

 Image Enhancement Methods


◼ Spatial Domain: Direct manipulation of pixels in an image
◼ Frequency Domain: Process the image by modifying the
Fourier transform of an image

6
Types of image enhancement
Point/Pixel operations
Output value at specific coordinates (x,y)
is dependent only on the input value at
(x,y)

Local operations
The output value at (x,y) is dependent on
the input values in the neighborhood of
(x,y)

Global operations
The output value at (x,y) is dependent on
all the values in the input image
7
Basic Concepts

A square or rectangular sub-image area centered at (x,y)


Origin x

(x, y)

y Image f (x, y)
8
Point Processing

 In a digital image, point = pixel

 Point processing transforms a pixel’s value as


function of its value alone;

 It does not depend on the values of the pixel’s


neighbors.

9
Basic Concepts

 Most spatial domain enhancement operations


can be generalized as:
g ( x, y) = T  f ( x, y )

f (x, y) = the input image


g (x, y) = the processed/output image
T = some operator defined over some neighbourhood of (x, y)

10
Point Processing

 Neighborhood of size 1x1:


 g depends only on f at (x,y)

 T: Gray-level/intensity transformation/ mapping


function
s = T (r )

◼ r = gray level of f at (x,y)


◼ s = gray level of g at (x,y)

11
Point Processing using Look-up Tables
255

E.g.: index value


... ...
output value

101 64
102 68
127

103 69
104 70
105 70
106 71
0

0 127 255 ... ...


input value input output

12
Point Processing using Look-up Tables

input output
...0 ... 0
cell index

contents
64
...32
a pixel with ...
is mapped to
this value this value
128 128
... ...
192 224
... ...
255 255

13
Point Processing Transformations
 There are many kinds of gray level transformations
◼ Linear
⚫ Negative/Identity

◼ Logarithmic
⚫ Log/Inverse log

◼ Power law
⚫ nth power/nth root

14
Point Processing : Negative Images

 Reverses the gray level order


 For L gray levels, the transformation has the form:
s = ( L − 1) − r
 Negative images are useful for enhancing white or grey
detail embedded in dark regions of an image

15
Point Processing : Negative Images

16
Point Processing : Intensity Scaling

s = T (r ) = a.r

17
Point Processing : Thresholding

 Segmentation of an object of interest from a


background

1.0 r > threshold


s=
0.0 r <= threshold

18
Point Processing : Thresholding

1.0 r > threshold


s=
0.0 r <= threshold

19
Logarithmic Transformations

 The general form of the log transformation is

s = c  log(1 + r )

 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 the opposite
transformation

20
Logarithmic Transformations

 Properties
◼ For lower amplitudes of input
image the range of gray levels
is expanded
◼ For higher amplitudes of input
image the range of gray levels
is compressed

21
Logarithmic Transformations

Fourier spectrum: image values The result of log transformation


ranging from 0 to 1.5x106 with c = 1

22
Power Law Transformations

 Power law transformations have the following form

s = c  r
 Map a narrow range
of dark input values
into a wider range of
output values or vice
versa
 Varying γ gives a whole
family of curves

23
Power Law Transformations

 For < 1: Expands values of dark pixels, compress


values of brighter pixels

 For  > 1: Compresses values of dark pixels, expand


values of brighter pixels

 If =1 & c=1: Identity transformation (s = r)

 Gamma () correction


The process used to correct the power-law response phenomena
24
Power Law Transformations
Contrast Enhancement

The images to the


right show a magnetic
resonance (MR)
image of a fractured
human spine

25
Power Law Transformations
Contrast Enhancement
γ = 0.6
1
Transformed Intensities

0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1
Old Intensities

26
Power Law Transformations
Contrast Enhancement

γ = 0.4
1
0.9
Transformed Intensities

0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1
Original Intensities

27
Power Law Transformations
Contrast Enhancement

γ = 0.3
1
0.9
Transformed Intensities

0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1
Original Intensities

28
Power Law Transformations
Contrast Enhancement

MR image of Result after Result after Result after


fractured human spine Power law Power law Power law
transformation transformation transformation
c = 1,  = 0.6 c = 1,  = 0.4 c = 1,  = 0.3
29
Power Law Transformations
Contrast Enhancement

30
Power Law Transformations
Contrast Enhancement

Image has a washed-out


appearance – needs γ > 1

31
Image Enhancement

Aerial Result of
Power law
Image
transformation
c = 1,  = 3.0
(suitable)

Result of
Power law
Result of transformation
Power law c = 1,  = 5.0
transformation (high contrast,
c = 1,  = 4.0 some regions are
(suitable) too dark)

32
Piecewise Linear Transformation
Functions
 Contrast stretching

 Intensity level slicing

 Bit-Plane slicing

33
Contrast Stretching

 Increase the dynamic range


of the gray levels for low
contrast images
 Rather than using a well
defined mathematical
function we can use arbitrary
user-defined transforms

34
Contrast Stretching

35
Grey Level Slicing

 Highlights a specific range of gray levels in an


image
◼ Similar to thresholding
◼ Other levels can be suppressed or maintained
◼ Useful for highlighting features in an image

36
Grey Level Slicing

Highlights
range [A,B] of Highlights
gray levels and range [A,B]
reduces all but preserves
others to a all other gray
contrast level levels

37
Grey Level Slicing

38
Bit Plane Slicing

 Objective: Highlights the contribution made to the


image appearance by specific bits
⚫ Suppose an image is of 8 bits
i.e. each pixel is represented
by 8 bits

⚫ Higher-order bits contain the


majority of the visually
significant data

⚫ Useful for analyzing the


relative importance played by
each bit of the image. It is
useful in compression
39
Bit Plane Slicing

40
[10000000] [01000000]

[00100000] [00001000]

[00000100] [00000001]

41
Bit Plane Slicing

Bit planes 1 through 8

42
Bit Plane Slicing

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

43
Questions??

44

You might also like