Sie sind auf Seite 1von 37

Image Processing

-Multimedia Design Technologies-


3rd Lecture

Instructor: Dahlan Nariman


Institute of ICT,
Ritsumeikan Asia Pacific University

Office: B-II Building, Room 373


Phone’s extension number: 4373 1
Contents
z we will look at image enhancement techniques
working in the spatial domain:
{What is image enhancement?
{Different kinds of image enhancement
{Histogram processing
{Point processing
{What is point processing?
{Negative images
{Thresholding
{Logarithmic transformation
{Power law transforms
{Grey level slicing
What Is Image Enhancement?
z Image enhancement is the process of making images
more useful
z The reasons for doing this include:
{ Highlighting interesting detail in images
{ Removing noise from images
{ Making images more visually appealing
Image Enhancement Examples (cont…)
Image Enhancement Examples (cont…)
Spatial & Frequency Domains

zThere are two broad categories of image


enhancement techniques
{Spatial domain techniques
zDirect manipulation of image pixels
{Frequency domain techniques
zManipulation of Fourier transform or wavelet
transform of an image
zwe will concentrate on techniques that
operate in the spatial domain
A Note About Grey Levels
z So far when we have spoken about image grey level values we
have said they are in the range [0, 255] ← (8bits greyscale image)
{ Where 0 is black and 255 is white
Black white
0 1 2 3 4 ………. ….. N

z For many of the image processing operations in this lecture grey


levels are assumed to be given in the range [0.0, 1.0]

Black white

0.0 0.1 0.2 0.3 0.4 ………. ….. 1.0


Color intensity levels in the image
(Gray scale image)

Grey intensity levels x


255 5 5 255 255 255

255 65 56 76 255 255

10
Original Object A Bitmap Image 96 96 9 255 255
(8bits Grey Scale)
65
92 175 210 255 255
Black white
70
90 175 162 165 255
0 1 2 3 4 5 6 … ………..255

y
Image Histograms
zThe histogram of an image shows us the
distribution of grey levels in the image
zMassively useful in image processing,
especially in segmentation
Frequencies

0 1 2…. Grey Levels 255


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Histogram Examples (cont…)


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Histogram Examples (cont…)


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Histogram Examples (cont…)


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Histogram Examples (cont…)


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Histogram Examples (cont…)


Histogram Examples (cont…)

z A selection of images and


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

their histograms
z Notice the relationships
between the images and
their histograms
z Note that the high contrast
image has the most
evenly spaced histogram
Histogram Equalisation

zSpreading out the frequencies in an image


(or equalising the image) is a simple way to
improve dark or washed out images
zThe formula for histogram s k = T ( rk )
equalisation is given where k
{rk: input intensity = ∑ pr ( r j )
{sk: processed intensity j =1
{k: the intensity range k nj
(e.g 0.0 – 1.0) =∑
{nj: the frequency of intensity j j =1 n
{n: the sum of all frequencies
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Equalisation Transformation Function


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Equalisation Examples
1
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Equalisation Examples
2
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Equalisation Examples (cont…)

4
3
Equalisation Transformation Functions

zThe functions used to equalise the images


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

in the previous examples


Basic Spatial Domain Image Enhancement
z Most spatial domain enhancement operations can
be reduced to the form
z g (x, y) = T[ f (x, y)] Origin x

z where f (x, y) is the


input image, g (x, y) is
the processed image
and T is some (x, y)
operator defined over
some neighbourhood
of (x, y)
y Image f (x, y)
Point Processing
z The simplest spatial domain operations occur when the
neighbourhood is simply the pixel itself
z In this case T is referred to as a grey level transformation function or
a point processing operation
z Point processing operations take the form
z s=T(r)
z where s refers to the processed image pixel value and r refers to the
original image pixel value

Original Image Enhanced Image x


x

r s = T[ r] s

y Image f (x, y) y Image f (x, y)


Point Processing Example:
Negative Images
z Negative images are useful for enhancing white or grey detail
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

embedded in dark regions of an image


{ Note how much clearer the tissue is in the negative image of the
mammogram below

s = intensitymax - r

Original Negative
s = 1.0 - r
Image Image
Point Processing Example:
Thresholding
z Thresholding transformations are particularly
useful for segmentation in which we want to
isolate an object of interest from a background

1.0 r > threshold


s=
0.0 r <= threshold
Basic Grey Level Transformations

z There are many different kinds of grey level


transformations
z Three of the most
common are shown
here
{Linear
z Negative/Identity
{Logarithmic
z Log/Inverse log
{Power law
z nth power/nth root
Logarithmic Transformations (cont…)
z Log functions are particularly useful when the input grey level values
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

may have an extremely large range of values


z In the following example the Fourier transform of an image is put
through a log transform to reveal more detail

s = log(1 + r)
Power Law Transformations
z Power law transformations have the following form
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

z s=c*rγ
z Map a narrow range
of dark input values
into a wider range of
output values or vice
versa
z Varying γ gives a whole
family of curves
Power Law Example (cont…)

γ = 0.3
1
Transformed Intensities 0.9
0.8
0.7
0.6
Original image 0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1
Original Intensities
Power Law Example (cont…)
z The images to the
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

right show a
s = r 0.6
magnetic resonance
(MR) image of a
fractured human
spine s=

s = r 0.4
r 0.3
z Different curves
highlight different
detail
Power Law Example
Power Law Example (cont…)

γ = 5.0
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
Power Law Transformations (cont…)
z An aerial photo
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of a runway is
shown s = r 3.0
z This time
power law
transforms are

s = r 4.0
used to darken s=
r 5.0
the image
z Different curves
highlight
different detail
Gray Level Slicing
zHighlights a specific range of grey levels
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

{Similar to thresholding
{Other levels can be
suppressed or maintained
{Useful for highlighting features
in an image
Working with Photoshop for processing a digital image
Summary

zWe have looked at:


{Different kinds of image enhancement
{Histograms
{Histogram equalisation
{Different kinds of point processing image
enhancement
Exercise
Grey intensity levels Negative image and thresholding transformations are
of an original image defined by the following equations:
x •Negative Image:
255 175 85
s = intensitymax - r
215 125 240 •Thresholding: 1.0 , r > threshold

10 25 40 s=
0.0 , r <= threshold
where s refers to the processed image pixel value
y a pixel’s intensity level and r refers to the original image pixel value.

1) Calculate pixels’ intensity levels of the negative image


processed from the left side original image!
2) Calculate pixels’ intensity levels of thresholding
transformation image, when the threshold’s value is 200.

Das könnte Ihnen auch gefallen