0% found this document useful (0 votes)
27 views27 pages

Lec10 Image Enhancment

This document discusses image enhancement techniques in both the spatial and frequency domains. Some key points: 1) Spatial domain techniques operate directly on pixel values using neighborhood operations like point processing, contrast stretching, and mask/filter processing. 2) Frequency domain techniques modify the Fourier transform of an image. 3) Common spatial techniques include contrast stretching, point processing functions like log and power transforms, and mask/filter processing for sharpening and smoothing. 4) The log transform maps a narrow range of low pixel values to a wider output range, compressing higher values, while the inverse log expands higher values.

Uploaded by

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

Lec10 Image Enhancment

This document discusses image enhancement techniques in both the spatial and frequency domains. Some key points: 1) Spatial domain techniques operate directly on pixel values using neighborhood operations like point processing, contrast stretching, and mask/filter processing. 2) Frequency domain techniques modify the Fourier transform of an image. 3) Common spatial techniques include contrast stretching, point processing functions like log and power transforms, and mask/filter processing for sharpening and smoothing. 4) The log transform maps a narrow range of low pixel values to a wider output range, compressing higher values, while the inverse log expands higher values.

Uploaded by

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

Lecture # 13:

Image Enhancement:-
Principle Objective of Enhancement

 To Process an image so that the result will be more suitable


than the original image for a specific application.

 The suitableness is up to each application.

 A method which is quite useful for enhancing an image may


not necessarily be the best approach for enhancing another
images

2
2 Domains

 Spatial Domain : (image plane)


 Techniques are based on direct manipulation of pixels in an
image

 Frequency Domain :
 Techniques are based on modifying the Fourier transform
of an image

 There are some enhancement techniques based on various


combinations of methods from these two categories.

3
Good Images
 For human visualization

 The visual evaluation of image quality is a highly subjective


process.
 It is hard to standardize the definition of a good image.

 For machine perception

 The evaluation task is easier.


 A good image is one which gives the best machine
recognition results.

 A certain amount of trial and error usually is required before a


particular image enhancement approach is selected.

4
Spatial Domain

 It includes Procedures that


operate directly on pixels.

g(x,y) = T[f(x,y)]

where:
 f(x,y) is the input image

 g(x,y) is the processed image

 T is an operator on f defined
over some neighborhood of
(x,y)

5
Mask /Filter

 Neighborhood of a point (x,y) can


be defined by using a square/
(x,y) rectangular (common used) or
circular subimage area centered at
(x,y)

 The center of the subimage is
moved from pixel to pixel starting
at the top of the corner

6
Point Processing

 Neighborhood = 1x1 pixel


 g depends on only the value of f at (x,y)
 T = gray level (or intensity or mapping) transformation
function s = T(r)

 Where
 r = gray level of f(x,y)
 s = gray level of g(x,y)

7
Contrast Stretching

 Produces higher contrast than


the original by:

 Darkening the levels


below m in the original
image

 Brightening the levels


above m in the original
image

8
Contrast Stretching

 A limiting Case, where the


possible outputs includes 0 &
1 only.

 Produce a two-level (binary)


image

9
Mask Processing /Filtering

 Neighborhood is larger than 1x1 pixel.

 Use a function of the values of input Image f in a predefined


neighborhood of (x,y) to determine the value of output Image
g at (x,y)

 The value of the mask coefficients determine the nature of the


process.

 Used in techniques
 Image Sharpening
 Image Smoothing

10
Basic Gray Level Transformations

 Linear function
Negative  Negative
nth root  Identity transformations
Output gray level, s

Log
nth power
 Logarithm function
 Log
 Inverse-log transformation

 Power-law function
Identity Inverse Log  nth power
 nth root transformations

Input gray level, r


11
IDENTITY Function

Negative

nth root
 Output intensities are
identical to input intensities.
Output gray level, s

Log
nth power

 Is included in the graph only


for completeness.

 The output Image is identical


Identity Inverse Log to the Input Image.

Input gray level, r


12
NEGATIVE Function

 An image with gray level in the


Negative
range [0, L-1] can have

nth root
 Negative transformation :
s = L – 1 –r
Output gray level, s

Log
nth power
 Reversing the intensity levels of
an image.

 Suitable for enhancing white or


gray detail embedded in dark
Identity Inverse Log regions of an image, especially
when the black area dominant in
size.
Input gray level, r
13
LOG Function

Negative
s = c log (1+r)
nth root
c is a constant
r0
Log
Output gray level, s

nth power
 Log curve maps a narrow
range of low gray-level values
in the input image into a
wider range of output levels.

Identity Inverse Log  Used to expand the values of


dark pixels in an image while
compressing the higher-level
values.
Input gray level, r

14
LOG Function

 It compresses the dynamic range of images with large


variations in pixel values.

 Example of image with dynamic range: Fourier spectrum image

 It can have intensity range from 0 to 106 or higher.

 We can’t see the significant degree of detail as it will be lost in


the display.

15
Example of Logarithm Image

Fourier Spectrum with range = 0 to Result after apply the log


1.5 x 106 transformation with c = 1, range =
0 to 6.2

16
Inverse Logarithm Transformations

 Used to expand the values of high pixels in an image while


compressing the darker-level values.

17
Inverse Logarithm Transformations

s = cr
 c and  are positive constants
Output gray level, s

 Power-law curves with


fractional values of  map a
narrow range of dark input
values into a wider range of
output values.

 If c =  = 1, It becomes an
Identity function
Input gray level, r
Plots of s = cr for various values of 
(c = 1 in all cases)

Used to expand the values of high pixels in an image while compressing the 18
darker-level values.
Gaama Correction

Monitor  Cathode ray tube (CRT)


devices have an intensity-
to-voltage response that is
a power function, with 
varying from 1.8 to 2.5
Gamma
 = 2.5
correction

 The picture will become


darker.

Monitor  Gamma correction is done


by preprocessing the image
before inputting it to the
monitor with s = cr1/
 =1/2.5 = 0.4
19
a b
Another Example MRI c d

(a) A magnetic resonance image of an


upper thoracic human spine with a
fracture dislocation and spinal cord
impingement
 The picture is predominately dark
 An expansion of gray levels are
desirable  needs  < 1
(b) result after power-law
transformation with  = 0.6, c=1
(c) transformation with  = 0.4
(best result)
(d) transformation with  = 0.3
(under acceptable level)

20
Effect of decreasing gamma

 When the  is reduced too much, the image


begins to reduce contrast to the point where the
image started to have very slight “wash-out” look,
especially in the background

21
a b
Another Example c d

(a) image has a washed-out


appearance, it needs a
compression of gray levels 
needs  > 1
(b) result after power-law
transformation with  = 3.0
(suitable)
(c) transformation with  = 4.0
(suitable)
(d) transformation with  = 5.0
(high contrast, the image has
areas that are too dark, some
detail is lost)

22
Contrast Stretching
 (a)increase the dynamic range
of the gray levels in the image

 (b) a low-contrast image :


result from poor illumination,
lack of dynamic range in the
imaging sensor

 (c) result of contrast stretching:


(r1,s1) = (rmin,0) and (r2,s2) = (rmax,L-1)

 (d) result of thresholding

23
Gray Level Slicing

 Highlighting a specific range


of gray levels in an image
 Display a high value of all
gray levels in the range of
interest and a low value
for all other gray levels

 (a) transformation highlights


range [A,B] of gray level and
reduces all others to a
constant level

 (b) transformation highlights


range [A,B] but preserves all
other levels

a b 24
Bit-plane slicing

 Highlighting the contribution


made to total image appearance
One 8-bit byte
Bit-plane 7 by specific bits.
(most significant)

 Suppose each pixel is


represented by 8 bits.

 Higher-order bits contain the


majority of the visually
significant data.
Bit-plane 0
(least significant)
 Useful for analyzing the relative
importance played by each bit of
the image.

25
Example

 The (binary) image for bit-


plane 7 can be obtained by
processing the input image
with a thresholding gray-level
transformation.

 Map all levels between 0


and 127 to 0
 Map all levels between
129 and 255 to 255

An 8-bit fractal image


26
8 Bit Planes

Bit-plane Bit-plane
7 6

Bit- Bit- Bit-


plane plane plane
5 4 3
Bit- Bit- Bit-
plane plane plane
2 1 0

27

You might also like