You are on page 1of 37

Digital Image Processing

ELE-4707

Dr Hassan Ahmed
Introduction
Instructor Hassan Ahmed
TA Usman Tariq, Mohammad Hanif
Lecture timings Tuesday (4.00-5.30) – room N5
Thursday (2:30-4:00) – room 211
Lab Session Friday (10.00-1.00) – Lab-2A

Text books and notes


1. R. C. Gonzalez and R. E. woods, “Digital Image
Processing”, 2nd edition, Pearson
Education, Inc., 2002.
2. “Digital Image Processing using MATLAB”
R. C. Gonzalez , R. E. Woods and S.L. Eddins
Pearson Education, Inc., 2004.
3. Class Slides
Prerequisites
1. Knowledge of probability and random variables,
Vectors and Matrices.
2. Working knowledge of Matlab
3. Signals and Systems course especially the concepts
of Convolution, Fourier Transform, filtering,
etc.
Marking Scheme

 
• Sessional 1:
~10%
• Sessional 2:
~15%
• Surprise Quizzes:  ~10%
• Assignments ( written + programming) ~15%
• Final: ~50%

Marking Scheme can change without any notice, during


the semester in benefit of all the students
Assignments

• Assignments will have ~15% weight in the total marks.


• Assignments may be programming assignments.
• The deadline for the submission of assignment will be given
with the assignment.
• Assignments submitted after the deadline will not be
accepted and will carry ZERO MARKS.
• Cheated assignments will get ZERO MARKS.
Motivation

Image processing is used for two somewhat different


purposes:
• improving the visual appearance of images (pictorial
information ) to a human viewer, and
• Preparing (processing) images for measurement of the
features and structures present.
– autonomous machine perception.

The techniques that are appropriate for each of these tasks


are not always the same, but there is considerable overlap.
This course covers methods that are used for both
purposes.
What Is Digital Image Processing

• The field of digital image processing refers to processing


digital images by means of a digital computer.
• A digital image can be defined as a two-dimensional
function,
f (x, y), where
x and y are spatial coordinates, and f intensity or gray level
of the image at that point.
Classification of DIP and Computer Vision Processes

• Image Processing image in -> image out


• Image Analysis image in -> measurements out
• Image Understanding image in -> high-level description out

These are somewhat artificial boundary


• Low-level process: (DIP)
– Primitive operations where inputs and outputs are images Major
functions: image pre-processing like noise reduction, contrast
enhancement, image sharpening, etc.
• Mid-level process (DIP and Computer Vision and Pattern Recognition)
– Inputs are images, outputs are attributes (e.g., edges). major
functions: segmentation, description, classification / recognition of
objects
• High-level process (Computer Vision)
– make sense of an ensemble of recognized objects; perform the
cognitive functions normally associated with vision

08/12/09 8
Example of DIP

Examples:
(a) Image of cell
corrupted by noise
(b) The result of
averaging
(c) Image of Martian
surface corrupted by
interference in
transmission
(d) The result of
computer processing
(e) Poorly exposed
x-ray image
(f) The result from
contrast and edge
enhancement
(g) Image blurred by
motion
(h) The result of de-
blurring
Poorly illuminated CCTV image and the result of
histogram equalisation.
Finding the outline and shape of image
objects, e.g. character recognition.
Satellite imagery in false
colour and infrared to track
vegetation changes
Face detection

08/12/09 14
Face Tracking

08/12/09 15
Applications of Digital Image Processing (DIP)
include:
1)Biological Research: e.g. DNA typing and matching;
automatic counting and classification of cell structures in
bone and tissue.

2) Defence and Intelligence: e.g. Reconnaissance photo-


interpretation of objects in satellite images; target
acquisition and missile guidance.

3) Document Processing: e.g. Scanning, archiving and


transmission (fax); automatic detection and recognition of
printed text (postal sorting office, tax return processing,
banking cheques).

4) Factory Automation: e.g. Visual quality inspection, defect


5) Law Enforcement Forensics: e.g. Photo-ID kits, criminal
photo-search, automatic fingerprint matching, DNA
matching and fibre analysis.

6) Materials Research: e.g. Automatic counting and


classification of object characteristics such as impurities and
grain size; surface and structural defect analysis (x-ray
analysis for aircraft wing cracks)

7) Photography: e.g. Retouching defects, altering colours,


zooming; adding and subtracting objects to a scene; special
effects such as blending and warping.

8) Publishing: e.g. Layout composition, inserting pictures,


generating graphics; colour separation for 4-colour printing
(cyan, magenta, yellow and black)
9) Remote Sensing: e.g. Land cover analysis (water, roads,
cities and cultivation), vegetation features (water content
and temperature) and crop yield analysis; 3-D terrain
rendering from satellite or aircraft data (road and dam
planning); fire and smoke detection.

10) Space exploration and Astronomy: e.g. Image


compression for transmission, correction of detector
deficiency; automatic satellite navigation and altitude
control using star positions.

11) Video and Film Special Effects: Animation, dangerous


stunts (explosions) and special effects (Star Wars).
12) Other examples/areas ??

More examples can be found in Gonzalez’s Book


• The imaging machines can cover almost the entire EM
spectrum, ranging from gamma to radio waves. These
include
– Gamma ray images
– x-ray band images
– ultra-violet band images
– visual light and infra-red images
– Imaging based on micro-waves and radio waves
• Non-EM band Imaging
– Acoustic and ultrasonic images (Geological application, ??)
– Transmission Electron Microscopy
– Computer-generated synthetic images
• Thus, digital image processing encompasses a wide and
varied field of applications.
EM Spectrum

08/12/09 20
Image Processing Steps

Physical world

Image acquisition
Imaging
Digitization, quantization and
compression

Enhancement and restoration Image Processing

Image segmentation Imaging Analysis


(Computer Vision and
Feature selection/extraction Pattern recognition)
Image representation
Image understanding
Image interpretation
(Computer Vision and
Pattern recognition)
Physical action
08/12/09 21
Image acquisition is the first process shown in the previous
slide
• Note that acquisition could be as simple as being given an
image that is already in digital form. Generally, the image
acquisition stage involves pre-processing, such as scaling
etc.
Image Acquisition

08/12/09 23
Image description

f (x,y): intensity/brightness of the image at spatial coordinates (x,y)

0< f (x,y)<∞ and determined by 2 factors:


illumination component i(x,y): amount of source light incident
reflectance component r(x,y): amount of light reflected by objects

f (x,y) = i(x,y) r(x,y)


where
0< i(x,y)<∞: determined by the light source
0< r(x,y)<1: determined by the characteristics of objects

08/12/09 24
Sampling and Quantization

quantization
08/12/09
sampling sampling 25
Sampling and Quantization

Sampling: Digitization of the spatial coordinates (x,y)


Quantization: Digitization in amplitude (also called gray-
level quantization)

8 bit quantization: 28 = 256 gray levels (0: black, 255: white)


Binary (1 bit quantization): 2 gray levels (0: black, 1: white)

Commonly used number of samples (resolution)


Digital still cameras: 640x480, 1024x1024, up to 4064 x 2704
Digital video cameras: 640x480 at 30 frames/second
1920x1080 at 60 f/s (HDTV)

08/12/09 26
Sampling and Quantization

An M x N digital image is expressed as

Columns
 f (0,0) f (0,1) . . . f (0, N − 1) 
 f (1,0) f (1, N − 1) 
Rows

 f (1,1) . . .
 . . . . . . 
 
 . . . . . . 
 . . . . . . 
 
 f ( M − 1,0) f ( M − 1,1) . . . f ( M − 1, N − 1) 

N : No of Columns
M : No of Rows

08/12/09 27
Digital Images

Digital images are 2D arrays (matrices) of


numbers:

08/12/09 28
Sampling

08/12/09 29
Sampling

08/12/09 30
Effect of Sampling and Quantization

250 x 210 125 x 105 50 x 42 25 x 21


samples 256 samples samples samples
gray levels

1608/12/09
gray 8 gray 4 gray Binary 31
levels levels levels image
Step in Image Processing
• Image enhancement is the simplest and most appealing
areas of digital image processing. Basically, the idea behind
enhancement techniques is to bring out detail that is
obscured, or simply to highlight certain features of interest
in an image. A familiar example of enhancement is when
we increase the contrast of an image because “it looks
better.”
• Image restoration is an area that also deals with improving
the appearance of an image. However, unlike
enhancement, which is subjective, image restoration is
objective, in the sense that restoration techniques tend to
be based on mathematical or probabilistic models of image
degradation. Enhancement, on the other hand, is based on
human subjective preferences regarding what constitutes a
“good” enhancement result.
• Color image processing is an area that has been gaining in
importance because of the significant increase in the use of
digital images over the Internet.
• Compression, as the name implies, deals with techniques
for reducing the storage required to save an image, or the
bandwidth required to transmit it.

• Segmentation procedures partition an image into its


constituent parts or objects. In general, autonomous
segmentation is one of the most difficult tasks in digital
image processing

• Representation and description almost always follow the


output of a segmentation stage
• Recognition is the process that assigns a label (e.g.,
“vehicle”) to an object based on its descriptors.
Reading Assignment for this week

• Chapters 1 and 2 of “Digital Image Processing” by


Gonzalez.
• Chapters 2 of “Digital Image Processing using MATLAB” by
Gonzalez.

You might also like