11
Digital Image ProcessingDigital Image Processing
Introduction Introduction
SridharSridhar
2004-01-19 Digital Image Processing 2
About Digital ImagesAbout Digital Images
►This Talk is about digital images and what can be done to digital images. This Talk is about digital images and what can be done to digital images.
►A digital image is simply an image that can be stored in a computer, i.e. a A digital image is simply an image that can be stored in a computer, i.e. a
discrete function of position (in 2D or 3D space, time and spectral band) discrete function of position (in 2D or 3D space, time and spectral band)
and greylevel. and greylevel.
►For example, in the 2D case the image data contains information of the For example, in the 2D case the image data contains information of the
graylevel at each position in the image.graylevel at each position in the image.
A digital image
of a rat.
A magnification
of the rat’s
nose.
2004-01-19 Digital Image Processing 3
Digital ImagesDigital Images
A digital image can be thought of as a matrix of graylevels, or
intensity values.
The magnification of the rat’s nose.
94 100 104 119 125 136 143 153 157 158
103 104 106 98 103 119 141 155 159 160
109 136 136 123 95 78 117 149 155 160
110 130 144 149 129 78 97 151 161 158
109 137 178 167 119 78 101 185 188 161
100 143 167 134 87 85 134 216 209 172
104 123 166 161 155 160 205 229 218 181
125 131 172 179 180 208 238 237 228 200
131 148 172 175 188 228 239 238 228 206
161 169 162 163 193 228 230 237 220 199
Intensity values of the rat’s nose.
2004-01-19 Digital Image Processing 4
Why put the image into a computer ?Why put the image into a computer ?
What are computers good at compared to people?What are computers good at compared to people?
HumanHuman ComputerComputer
+ identify objects+ identify objects+ measure absolute values+ measure absolute values
+ describe relationships+ describe relationships+ perform complicated+ perform complicated
+ interpret images using+ interpret images using calculations calculations
experienceexperience+ does not get tired / cheaper + does not get tired / cheaper
- difficulties with - difficulties with + fast+ fast
normalizing intensitynormalizing intensity + objective+ objective
- subjective - subjective
2004-01-19 Digital Image Processing 5
Digital Images: ApplicationsDigital Images: Applications
►Environmental and agricultural applicationsEnvironmental and agricultural applications
Multi spectral
satellite image
Aerial image of a
forest
Microscopy image of wood
2004-01-19 Digital Image Processing 6
Digital Images: Applications
Hydrography and weather
Satellite image
Multi spectral
aerial image of
the Stockholm
archipelago
2004-01-19 Digital Image Processing 7
Medical ApplicationsMedical Applications
►DiagnosisDiagnosis
X-ray image
MR (Magnetic
Resonance)
PET (Positron Emission
Tomography)
2004-01-19 Digital Image Processing 8
Medical ApplicationsMedical Applications
►Research and DevelopmentResearch and Development
(Fluorescence microscopy)
cultured and
stained celles
AIDS-virus particles
(Electron microscopy)
stained cell nuclei
in cancer tumor
2004-01-19 Digital Image Processing 9
Medical ApplicationsMedical Applications
►Research and DevelopmentResearch and Development
(Light microscopy)
breast tissue image SLO (Scanner Laser
Ophthalmoscope)
image of the retina
histological section
of bone implant
2004-01-19 Digital Image Processing 10
Other ApplicationsOther Applications
►Food imagesFood images
►Quality controlQuality control
(Digital camera)
MR (magnetic resonance)
Pork meat
Beef meat
2004-01-19 Digital Image Processing 11
Other ApplicationsOther Applications
►Radar imagesRadar images
2004-01-19 Digital Image Processing 12
Other applicationsOther applications
Quality controlQuality control
Biometry (face recognition, fingerprint…)Biometry (face recognition, fingerprint…)
Handwriting recognitionHandwriting recognition
Automatic surveillanceAutomatic surveillance
……..
2004-01-19 Digital Image Processing 13
The Fundamental Steps in Digital Image ProcessingThe Fundamental Steps in Digital Image Processing
Image
acquisition
Preprocessing
Segmentation
Representation
and description
Recognition
and
interpretation
Problem Solution
2004-01-19 Digital Image Processing 14
The Fourier transformThe Fourier transform
Original image The power spectra after
Fourier transformation
Image after reverse
transform of filtered
power spectra.
2004-01-19 Digital Image Processing 15
Filtering in the spatial domainFiltering in the spatial domain
“Lena” with noise After median filtering Edge detection
2004-01-19 Digital Image Processing 16
Image restorationImage restoration
►Restoration of images degraded by bad focusing, Restoration of images degraded by bad focusing,
motion etc.motion etc.
Blur caused by motion After restoration
2004-01-19 Digital Image Processing 17
ColorColor
►Color representation and useColor representation and use
RGB-space CIE’s chromaticity diagram
2004-01-19 Digital Image Processing 18
SegmentationSegmentation
►Segmentation means to divide an image into objects Segmentation means to divide an image into objects
and background. This is a necessary step prior to and background. This is a necessary step prior to
feature extraction.feature extraction.
Original image Segmented (binary) image
2004-01-19 Digital Image Processing 19
Binary image operations, morphology and Binary image operations, morphology and
feature extractionfeature extraction
Gray scale image
… the same image
after segmentation.
… after morphological
closing...
… after
skeletonization...
2004-01-19 Digital Image Processing 20
Classification and decisionClassification and decision
►Classification can either be made on the object level (based Classification can either be made on the object level (based
on object features such as size and shape) or on the pixel on object features such as size and shape) or on the pixel
level (based on intensity in spectral or texture information)level (based on intensity in spectral or texture information)
Original image Result of classification
2004-01-19 Digital Image Processing 21
What do you need to do Image What do you need to do Image
Processing?Processing?
►MathematicsMathematics
►PhysicsPhysics
►StatisticsStatistics
►Computer ScienceComputer Science
►Artificial intelligenceArtificial intelligence
►““area” knowledgearea” knowledge
►……
2004-01-19 Digital Image Processing 22
Image Analysis (bildanalys) vs Image Analysis (bildanalys) vs
Image Processing ( bildbehandling)Image Processing ( bildbehandling)
world
data image
Image Analysis (Bildanalys)
Computer Graphics (Datorgrafik)
Image Processing
(Bildbehandling)
Imaging
Visualisation
“knowledge”
Image understanding (Bildförståelse)
Computer vision (Datorseende)
2004-01-19 Digital Image Processing 23
Digital imagesDigital images
A 2D grayscale image f(x,y)
• x and y are the spatial coordinates
• the value of f(x,y) is the greylevel or
intensity at position (x,y)
A digital image must be sampled (digitized):
•in space (x,y): image sampling (S: rastrering)
•in amplitude f(x,y): grey-level quantization
(S: kvantisering)
2004-01-19 Digital Image Processing 24
Image sampling (x,y)Image sampling (x,y)
2004-01-19 Digital Image Processing 26
Methods for image sampling (in space)Methods for image sampling (in space)
•Uniform - same sampling frequency everywhere
•Adaptive - higher sampling frequency in areas with
greater detail (not very common)
•The discrete sample is called a pixel (from picture
element) in 2D and voxel (from volume element) in 3D
and is usually square (cubic), but can also have other
shapes.
2004-01-19 Digital Image Processing 28
Methods for quantization (in amplitude)Methods for quantization (in amplitude)
•Uniform (linear) - intensity of object is lineary
mapped to gray-levels of image
•Logarithmic - higher intensity resolution in
darker areas (the human eye is logarithmic)
object intensity
i
m
a
g
e
i
n
t
e
n
s
i
t
y
object intensity
i
m
a
g
e
i
n
t
e
n
s
i
t
y
2004-01-19 Digital Image Processing 29
Common quantization levelsCommon quantization levels
f(x,y) is given integer values [0-max], max=2
n
-1
n=1 [0 1] ”binary image”
n=5 [0 31] maximum the human
eye can resolve (locally)
n=8 [0 255] 1 byte, very common
n=16 [0 65535] common in research
n=24 [0 16.2*10
6
] common in color images
(i.e. 3*8 for RGB)
2004-01-19 Digital Image Processing 30
ResolutionResolution
•Spatial resolution: the smallest discernible detail in
the image
•Gray-level resolution: the smallest discernible change
in gray level
•GW: L-level digital image of size M x N:
•spatial resolution M x N
•gray-level resolution L
2004-01-19 Digital Image Processing 31
Choice of samplingChoice of sampling
•What will the image be used for?
•What are the limitations in memory and speed?
•Will we only use the image for visual interpretation or
do we want to do any image analysis?
•What information is relevant for the analysis (i.e.
color, spatial and/or graylevel resolution)?
2004-01-19 Digital Image Processing 32
Zooming and ShrinkingZooming and Shrinking
• Pixel replication, nearest neighbor interpolation –
produce checkerboard effect
•Bilinear interpolation – better results
Zooming phisical resolution?
2004-01-19 Digital Image Processing 33
Image Sensing and AcquisitionImage Sensing and Acquisition
2004-01-19 Digital Image Processing 34
Image StorageImage Storage