Digital Image Processing
Lect-1
1
Text Book & References:
• Rafael C. Gonzalez and Richard E.
Woods, Digital Image Processing,
4th Edition, 2018
• Rafael C. Gonzalez and Richard E. Woods,
Digital Image Processing using MATLAB,
3rd Edition, 2020
• Class slides, Class notes & selected
research papers to be shared by the
instructor
Course Contents
• Introduction to Image processing (Chapter – 1, 2)
• Image processing Fundamentals (Chapter-2)
• Image Enhancement (Spatial & Frequency Domain) (Chapter – 3, 4)
• Color Processing (Chapter – 6)
• Morphological operations (Chapter – 9)
• Segmentation (Chapter – 10, Online material, David Forsyth)
• Texture analysis (Chapter – 11, Online material, David Forsyth )
• Image representation and description (Chapter – 11)
• Introduction to Machine Learning and Convolutional Neural Networks (Chapter – 12 &
Stanford course on CNN)
i n g
ss I
ce ma
g
ro eA
nal
e P ysis
ag
Im
r nin g
Lea g
hi ne in
Mac rn
ea
Com p L
pute e
r Vis
ion De
Image Processing & Machine Vision
From Image Processing to Machine Vision:
low, mid and high-level processes
Low Level Process
Input: Image
Output: Image
Examples: Noise
removal, image
sharpening
Image Processing
5
Example: Low Level Processing
6
Image Processing & Machine Vision
From Image Processing to Machine Vision:
low, mid and high-level processes
Low Level Process Mid Level Process
Input: Image Input: Image
Output: Image Output: Attributes
Examples: Noise Examples: Object
removal, image recognition,
sharpening segmentation
Image Processing
7
Example: Mid Level Processing
Segmentation of image into regions
8
Image Processing & Machine Vision
From Image Processing to Machine Vision:
low, mid and high-level processes
Low Level Process Mid Level Process High Level Process
Input: Image Input: Image Input: Attributes/Image
Output: Image Output: Attributes Output: Understanding
Examples: Noise Examples: Object Examples: Scene
removal, image recognition, understanding,
sharpening segmentation autonomous navigation
Image Processing Machine Vision
9
Example: High Level Processing
Object Classification
10
Image Processing & Machine Vision
From Image Processing to Machine Vision:
low, mid and high-level processes InInthis
thiscourse
course
Some
Someofofthis
thisas
aswell
well
Low Level Process Mid Level Process High Level Process
Input: Image Input: Image Input: Attributes/Image
Output: Image Output: Attributes Output: Understanding
Examples: Noise Examples: Object Examples: Scene
removal, image recognition, understanding,
sharpening segmentation autonomous navigation
Image Processing Machine Vision
11
Why Image Processing?
• Images and video are everywhere!
Personal photo albums Movies, news, sports
Surveillance and security Medical and scientific images
Slide credit; L. Lazebnik
Summary of Applications
Problem Domain Application Input Pattern Output Class
Document Image Optical Character Document Image Characters/words
Analysis Recognition
Document Classification Internet search Text Document Semantic categories
Document Classification Junk mail filtering Email Junk/Non-Junk
Multimedia retrieval Internet search Video clip Video genres
Speech Recognition Telephone directory Speech waveform Spoken words
assistance
Natural Language Information extraction Sentence Parts of Speech
Processing
Biometric Recognition Personal identification Face, finger print, Iris Authorized users for
access control
Medical Computer aided Microscopic Image Healthy/cancerous cell
diagnosis
Military Automatic target Infrared image Target type
recognition
Industrial automation Fruit sorting Images taken on Grade of quality
conveyor belt
Bioinformatics Sequence analysis DNA sequence Known types of genes
13
Image Sources
• Electromagnetic (EM) band imaging
– Gamma ray band images
– X-ray band images
– Ultra violet band images
– Visual light and infra-red images
– Images based on micro waves or radio waves
• Non-EM band imaging
– Acoustic and ultrasonic images
– Electron microscopy
– Computer generated images (synthetic)
Light & EM Spectrum
• EM Waves
– A stream of mass less particles each travelling in a
wave like pattern, moving at the speed of light and
contains a certain bundle of energy
– The electromagnetic spectrum is split up in to bands
according to the energy per photon
Highest
HighestEnergy
Energy Lowest
LowestEnergy
Energy
Visible light is just a particular part of the electromagnetic spectrum that can be
sensed by the human eye
Light & EM Spectrum
Examples: Imaging other Modalities
• Sound
– Geological Applications – Oil and Gas Exploration
– Medicine – Ultrasound Imaging
• Synthetic Images
– Computer generated
A synthetic image
Key Stages in DIP
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain Recognition
Colour Image Image
Processing Compression
Key Stages in DIP
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain Recognition
Colour Image Image
Processing Compression
Key Stages in DIP
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain Recognition
Colour Image Image
Processing Compression
Key Stages in DIP
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain Recognition
Colour Image Image
Processing Compression
Key Stages in DIP
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain Recognition
Colour Image Image
Processing Compression
Key Stages in DIP
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain Recognition
Colour Image Image
Processing Compression
Key Stages in DIP
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain Recognition
Colour Image Image
Processing Compression
Key Stages in DIP
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain Recognition
Colour Image Image
Processing Compression
Key Stages in DIP
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain Recognition
Colour Image Image
Processing Compression
Key Stages in DIP
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain Recognition
Colour Image Image
Processing Compression
Digital Image Processing
Fundamentals
29
IMAGE FORMATION MODEL
• Image refers to a 2d light-intensity function, f(x, y)
• The amplitude of f at spatial coordinates (x, y) gives the
intensity (brightness) of the image at that point.
• Light is a form of energy thus f(x, y) must be nonzero and
finite.
30
IMAGE FORMATION MODEL
• The function f(x, y) may be characterized by
two components:
– The amount of source light incident on the
scene being viewed illumination.
– The amount of light reflected by the objects
in the scene reflectance.
31
Image Acquisition
Sampling and Quantization
Sampling:
Digitization of the spatial coordinates (x,y)
Quantization:
Digitization in amplitude (also known as gray level
quantization)
33
Sampling and Quantization
Quantization
8 bit quantization: 28 =256 gray levels (0: black, 255: white)
1 bit quantization: 2 gray levels (0: black, 1: white) – binary
Sampling
Commonly used number of samples (resolution)
Digital still cameras: 640x480, 1024x1024, 4064 x 2704
Digital video cameras: 640x480 at 30 frames/second (fps)
34
Sampling and Quantization
Digital Image is an approximation of a real world
scene
35
Sampling and Quantization
Image Formation
Digital Image is an approximation of a real world
scene
Sampling
Sampling
37
Image Formation
Digital Image is an approximation of a real world
scene
Quantization
Quantization
38
GRAY LEVEL
• WE CALL THE INTENSITY OF A MONOCHROME IMAGE f
AT COORDINATE (x, y) THE GRAY LEVEL (L) OF THE
IMAGE AT THAT POINT.
• Thus, l lies in the range
• Lmin is positive and Lmax is finite.
• Gray scale = [Lmin, Lmax]
• Common practice, shift the interval to [0,L] : 0 = black, L-
1 = white
39
Digital Image Representation
Image Size
Number of bits required to store an image
b M N k
Image having 2k intensity levels
k – bit image
256 intensity levels – 8 bit image
40
Image Size
Spatial & Gray Level Resolution
Spatial Resolution
43
Spatial Resolution
44
Intensity Level Resolution
Intensity level resolution refers to the number of intensity levels used to represent the
image
The more intensity levels used, the finer the level of detail in
an image
Intensity level resolution is usually given in terms of the
number of bits used to store each intensity level
45
Intensity Level Resolution
Number of Intensity
Number of Bits Examples
Levels
1 2 0, 1
2 4 00, 01, 10, 11
4 16 0000, 0101, 1111
8 256 00110011, 01010101
16 65,536 1010101010101010
46
Intensity Level Resolution
47
Intensity Level Resolution – bitPlane
256 grey levels (8 bits per pixel) 128 grey levels (7 bpp) 64 grey levels (6 bpp) 32 grey levels (5 bpp)
16 grey levels (4 bpp) 8 grey levels (3 bpp) 4 grey levels (2 bpp) 2 grey levels (1 bpp)
48
Resolution: How much is enough?
How many samples and gray levels are required
for a good approximation?
Quality of an image depends on number of pixels and gray-
level number
The more these parameters are increased, the closer the
digitized array approximates the original image
But: Storage & processing requirements increase rapidly as a
function of N, M, and k
49
Resolution: How much is enough?
Depends on what is in the image and what you
would like to do with it
50
Digital Image
aagrid
gridof
ofsquares,
squares,
1 pixel
eachof
each ofwhich
which
containsaasingle
contains single
color
color
eachsquare
each squareisis
calledaapixel
called pixel(for
(for
pictureelement)
picture element)
51
Digital Image
• A set of pixels (picture elements, pels)
• Pixel means
– pixel coordinate
– pixel value
– or both
• Both coordinates and value are discrete
52
Example
640 x 480 8-bit image
DIP Lecs By Dr M.Almas Anjum College of
53
E&ME
54
55
DIGITAL IMAGE REPRESENTATION
PIXEL VALUES IN HIGHLIGHTED
REGION
A set of number
in 2D grid
CAMERA DIGITIZER
Samples the analog data and digitizes it.
56
Digital Image
Color images have 3 values per
pixel; monochrome images have
1 value per pixel.
aagrid
gridof
ofsquares,
squares,
eachof
each ofwhich
which
containsaasingle
contains single
color
color
eachsquare
each squareisis
calledaapixel
called pixel(for
(for
pictureelement)
picture element)
57
What is a Digital Image? (cont…)
•Common image formats include:
– 1 sample per point (B&W or Grayscale)
– 3 samples per point (Red, Green, and Blue)
•For most of this course we will focus on grey-scale
images
Readings from Book (4th Edn.)
• Chapter – 1
• Chapter – 2
Read topics from 2.2 to 2.4 from
book
• Chapter – 1 (MATLAB version)
Acknowledgements
Statistical Pattern Recognition: A Review – A.K Jain et al., PAMI (22) 2000
Pattern Recognition and Analysis Course – A.K. Jain, MSU
Material in these slides has been taken from, the following resources
Pattern Classification” by Duda et al., John Wiley & Sons.
Digital Image Processing”, Rafael C. Gonzalez & Richard E. Woods, Addison-Wesley, 2008
Machine Vision: Automated Visual Inspection and Robot Vision”, David Vernon, Prentice Hall,
1991
www.eu.aibo.com/
Advances in Human Computer Interaction, Shane Pinder, InTech, Austria, October 2008
60