SlideShare a Scribd company logo
INTRODUCTION TO
DIGITAL IMAGE
PROCESSING
Bibekanand Jena
Sr. Lecturer
Dept of ETE
PIET, Rourkela
•What is Digital Image Processing?
Processing of Images which are digital in nature by a
digital computer is known Digital Image Processing
•Important terms:
1. Image
2. Digital Image
3. Processing
Why image?
•A Picture is worth a thousand words
•Visual imformation is more powerful than textual information
Vs
An image is a 2D light intensity function
f(x,y)= i(x,y) . r(x,y)
Where
0<i(x,y)<∞
and 0< r(x,y)<1
i(x,y): Illumination Component
r(x,y): Reflectance component
Y
X
What is a Digital Image?
A digital image is a representation of a two-
dimensional image as a finite set of digital values,
called picture elements or pixels
It is discretized both in spatial co-ordinates and
brightness/intensity.
•It can be considered as a matrix
whose row, column indices
specify a point in the image and
the element value identifies
gray level value at that point
•These elements are referred as
pixels
Conventional Coordinate for Image Representation
Digital Image Representation
No. of rows: M, No. of Column: N, Size of the image: M × N
No. of gray levels (Quantization level): 2k
No. of bits required to store a digitized image = M×N× k
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)
Digital Image Types : Intensity Image
Intensity image or monochrome image
each pixel corresponds to light intensity
normally represented in gray scale (gray
level).












39
87
15
32
22
13
25
15
37
26
6
9
28
16
10
10
Gray scale values












39
87
15
32
22
13
25
15
37
26
6
9
28
16
10
10












39
65
65
54
42
47
54
21
67
96
54
32
43
56
70
65












99
87
65
32
92
43
85
85
67
96
90
60
78
56
70
99
Digital Image Types : RGB Image
Color image or RGB image:
each pixel contains a vector
representing red, green and
blue components.
RGB components
Image Types : Binary Image
Binary image or black and white image
Each pixel contains one bit :
1 represent white
0 represents black












1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
Binary data
Why Processing?
Digital image processing focuses on
three major tasks
– Improvement of pictorial information for
human interpretation
– Efficient storage & Transmission
– Image processing for Autonomous
machine application
Image Enhancement
Image Deblurring
Remote Sensing Weather Forecasting
Machine Vision Application:
In this case the interest is the procedure of extraction of
image information suitable for computer processing .
Application:
1. Industrial Machine vision for product assembly and
inspection
2. Automated Target detection and tracking
3. Biometric recognition
4. Many more
What is digital image processing?
Low Level Process
Input: Image
Output: Image
Examples: Noise
removal, image
sharpening
Mid Level Process
Input: Image
Output: Attributes
Examples: Object
recognition,
segmentation
High Level Process
Input: Attributes
Output: Understanding
Examples: Scene
understanding,
autonomous navigation
Image Formation in the Human Eye
•The distance between the center of the lens and he
retina varies from approximately 17mm to 14mm.
•If ‘h’ is the height of the object in the retinal image ,
then from the geometry of the figure
h/17 = 15/100
Fundamental Steps of
Image Processing
IMAGE
ENHANCEMENT
IMAGE
RESTORATION
IMAGE
COMPRESSION
MORPHOLOGICAL
ANALYSIS
IMAGE
SEGMENTATION
REPRESENTATION
&
DESCRIPTION
OBJECT
RECOGNITION
COLOR
IMAGE
PROCESSING
WAVELET AND
MULTIRESOLUTION
ANALYSIS
IMAGE
ACQUISITION
Knowledge Base
Image Acquisition: An image sensor and the
capability to digitize the signal produced by the
sensor .
Image Enhancement: Enhance the image quality
by highlighting certain features of the image. It is
a subjective area of image processing(Human
subjective preference).
Ex: Contrast / Brightness Enhancement
Image Restoration: Deals with improving the
appearance of an image. It is objective.
Restoration tends to based on mathematical or
probabilistic model of image degradation. Ex:
Noise filtering
Color Image Processing: Deals with fundamental
concept in color model and basic colorimage
processing in digital domain.
Ex: Pseudo-color processing
Multi Resolution Analysis: Deals with representing image
in various degrees of resolution using Wavelet
transformation. Ex: Image decomposition
Image Compression: Deals with technique for reducing
the storage required to save and image or the bandwidth
required to transmit it. Ex: Lossy / Lossless compression
Morphological Processing: Deals with tools for extracting
image component that are useful for representation and
description. Ex: Dilation, Erosion etc
Segmentation: Partition an image into constituent parts
or object. Ex: Face detection.
Representation & Description: Deals with representation
of the object in the image in desired form. Ex: Boundary
representation is appropriate when focus is on external
shape. Regional representation for internal properties.
Descriptor also called feature selection, deals with
extracting attributes suitable for further processing.
Recognition: Assigning a label to the object based on the
information provided by the descriptor.
IMAGE DISPLAY
HARD COPY
IMAGE
SENSOR
COMPUTER
SPECIALIZED
IMAGE PROCESSING
HARDWARE
MASS
STORAGE
IMAGE
PROCESSING
SOFTWARE
COMPONENTS OF AN IMAGE PROCESSING SYSTEM
NETWORK
SENSOR. Two elements are required to acquire digital images. The
first is a physical device that is sensitive to the energy radiated by
the object we wish to image. The second, called a digitizer, for
converting the output of the physical sensing device into digital
form.
SPECIALIZED IMAGE PROCESSING HARDWARE usually consists of
the digitizer just mentioned, plus hardware that performs other
primitive operations, such as an arithmetic logic unit (ALU), which
performs arithmetic and logical operations in parallel on entire
images. Example: averaging images as quickly as they are
digitized, for the purpose of noise reduction.
THE COMPUTER It is a general-purpose computer and can range
from a PC to a supercomputer. In dedicated applications, some-
sometimes specially designed computers are used to achieve a
required level of performance.
SOFTWARE It consists of specialized modules that perform specific
tasks. A well-designed package also includes the capability for the
user to write code that, as a minimum, utilizes the specialized
modules.
MASS STORAGE Digital storage for image processing applications
falls into three principal categories: A) short-term storage for use
during processing, B) on-line storage for relatively fast recall, and
C) archival storage, characterized by infrequent access.
The lens focuses light from
objects onto the retina
• The retina is covered with
light receptors called cones
(6-7 million) and rods (75-
150 million)
• Cones are concentrated
around the fovea and are
very sensitive to
colour(Photopic)
• Rods are more spread out
and are sensitive to low
levels of illumination
(Scotopic)
Brightness Adaptation of Human Eye : Mach Band Effect
• Experimental evidence indicates
that subjective brightness is a
logarithmic function of the light
intensity incident on the eye.
•The total range of distinct intensity
levels the eye can discriminate
simultaneously is rather small when
compared with the total adaptation
range.
•For any given set of conditions, the
current sensitivity level of the visual
system is called the brightness
adaptation level.
•Since digital images are displayed as a discrete set of intensities,
the eye’s ability to discriminate between different intensity levels is
an important issue.
•The range of light intensity levels adapted by human visual system
is enormous, on the order of 1010, from the scotopic threshold to the
glare limit.
•An increment of illumination,ΔI , is added to the
field in the form of a short-duration flash.
•If ΔI is not bright enough, the subject says “no”.
•As ΔI gets stronger, the subject may give a
positive response of “yes”
•Finally, when ΔI becomes strong enough, the
subject will give a positive response of “yes” all
the time.
•The quantity ΔI /I, where ΔI denote the increment
of illumination discriminable 50% of the time with
background illumination I is called the Weber
ratio.
•A small value of ΔI /I means that a small change
in intensity is discriminable. It represents “good”
brightness discrimination.
BRIGHTNESS DISCRIMINATION
•Another important issue is the ability of the eye to discriminate
between changes in light intensity at any specific adaptation level.
•Figure shows the idea of a basic experiment to determine the
human visual system for brightness discrimination
Figure shows that brightness discrimination improves
significantly as background illumination increases.
Position
Intensity
Brightness Adaptation of Human Eye : Mach Band Effect
Mach Band Effect
Intensities of surrounding points
effect perceived brightness at each
point.
In this image, edges between bars
appear brighter on the right side
and darker on the left side.
In area A, brightness perceived is darker while in area B is
brighter. This phenomenon is called Mach Band Effect.
Position
Intensity
A
B
Mach Band Effect (Cont)
Simultaneous contrast. All small squares have exactly the same intensity
but they appear progressively darker as background becomes lighter.
Brightness Adaptation of Human Eye : Simultaneous Contrast
Visible Spectrum
Digital Image Acquisition Process
Generating a Digital Image
Image Sampling and Quantization
Image sampling: discretize an image in the spatial domain
Spatial resolution / image resolution: pixel size or number of pixels
How to choose the spatial resolution
= Sampling locations
Original
image
Sampled
image
Under sampling, we lost some image details!
Spatial resolution
How to choose the spatial resolution : Nyquist Rate
Original
image
= Sampling locations
Minimum
Period
Spatial resolution
(sampling rate)
Sampled image
No detail is lost!
Nyquist Rate:
Spatial resolution must be less or equal
half of the minimum period of the image
or sampling frequency must be greater or
Equal twice of the maximum frequency.
2mm
1mm
Effect of Spatial Resolution
256x256 pixels
64x64 pixels
128x128 pixels
32x32 pixels
Effect of Spatial Resolution
Image Quantization
Image quantization:
discretize continuous pixel values into discrete numbers
Color resolution/ color depth/ levels:
- No. of colors or gray levels or
- No. of bits representing each pixel value
- No. of colors or gray levels Nc is given by
b
c
N 2

where b = no. of bits
Quantization function
Light intensity
Quantization
level
0
1
2
Nc-1
Nc-2
Darkest Brightest
Effect of Quantization Levels
16 levels 8 levels
2 levels
4 levels
In this image,
it is easy to see
false contour.
Basic Relationship of Pixels
x
y
(0,0)
Conventional indexing method
(x,y) (x+1,y)
(x-1,y)
(x,y-1)
(x,y+1)
(x+1,y-1)
(x-1,y-1)
(x-1,y+1) (x+1,y+1)
Neighbors of a Pixel
p (x+1,y)
(x-1,y)
(x,y-1)
(x,y+1)
4-neighbors of p:
N4(p) =
(x-1,y)
(x+1,y)
(x,y-1)
(x,y+1)
Neighborhood relation is used to tell adjacent pixels. It is
useful for analyzing regions.
Note: q N4(p) implies p N4(q)
4-neighborhood relation considers only vertical and
horizontal neighbors.
p (x+1,y)
(x-1,y)
(x,y-1)
(x,y+1)
(x+1,y-1)
(x-1,y-1)
(x-1,y+1) (x+1,y+1)
Neighbors of a Pixel (cont.)
8-neighbors of p:
(x-1,y-1)
(x,y-1)
(x+1,y-1)
(x-1,y)
(x+1,y)
(x-1,y+1)
(x,y+1)
(x+1,y+1)
N8(p) =
8-neighborhood relation considers all neighbor pixels.
p
(x+1,y-1)
(x-1,y-1)
(x-1,y+1) (x+1,y+1)
Diagonal neighbors of p:
ND(p)=
(x-1,y-1)
(x+1,y-1)
(x-1,y+1)
(x+1,y+1)
Neighbors of a Pixel (cont.)
Diagonal -neighborhood relation considers only diagonal
neighbor pixels.
.
For p and q from the same class
4-Adjacency: Two pixels p and q with values from V (a set of
gray level) are 4-adjacent if q N4(p)
 8-Adjacency: Two pixels p and q with values from V (a set of
gray level) are 8-adjacent if q N8(p)
 mixed-Adjacency (m-Adjacency): Two pixels p and q with values
 from V (a set of gray level) are m-adjacent
• if q N4(p) or
• q ND(p) and N4(p) N4(q) = 
Adjacency
Path
A path from pixel p at (x,y) to pixel q at (s,t) is a sequence
of distinct pixels:
(x0,y0), (x1,y1), (x2,y2),…, (xn,yn)
such that
(x0,y0) = (x,y) and (xn,yn) = (s,t)
and
(xi,yi) is adjacent to (xi-1,yi-1), i = 1,…,n
p
q
We can define type of path: 4-path, 8-path or m-path
depending on type of adjacency.
Adjacency
A pixel p is connected to pixel q is they are adjacent.
Two image subsets S1 and S2 are connected if some pixel
in S1 is adjacent to some pixel in S2
S1
S2
We can define type of adjacency: 4-adjacency, 8-adjacency
or m-adjacency depending on type of connectivity.
Path (cont.)
p
q
p
q
p
q
8-path from p to q
results in some ambiguity
m-path from p to q
solves this ambiguity
8-path m-path
Distance
For pixel p, q, and z with coordinates (x,y), (s,t) and (u,v),
D is a distance function or metric if
 D(p,q) 0 (D(p,q) = 0 if and only if p = q)
 D(p,q) = D(q,p)
 D(p,z) D(p,q) + D(q,z)
Example: Euclidean distance
2
2
)
(
)
(
)
,
( t
y
s
x
q
p
De -
+
-

Distance (cont.)
D4-distance (city-block distance) is defined as
t
y
s
x
q
p
D -
+
-

)
,
(
4
1 2
1
0
1 2
1
2
2
2
2
2
2
Pixels with D4(p) = 1 is 4-neighbors of p.
Distance (cont.)
D8-distance (chessboard distance) is defined as
)
,
max(
)
,
(
8 t
y
s
x
q
p
D -
-

1
2
1
0
1
2
1
2
2
2
2
2
2
Pixels with D8(p) = 1 is 8-neighbors of p.
2
2
2
2
2
2
2
2
1
1
1
1
What Is Image Enhancement?
Image enhancement is the process of
making images more useful
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
There are two broad categories of
image enhancement techniques
– Spatial domain techniques
Direct manipulation of image pixels
– Frequency domain techniques
Manipulation of Fourier transform or
wavelet transform of an image
For the moment we will concentrate on
techniques that operate in the spatial
domain
Image Histograms
The histogram of an image shows us the
distribution of grey levels in the image
Massively useful in image processing,
especially in segmentation
Grey Levels
Frequencies
Histogram Examples (cont…)
A selection of images
and their histograms
Notice the relationships
between the images and
their histograms
Note that the high
contrast image has the
most evenly spaced
histogram
Basic Spatial Domain Image Enhancement
Origin x
y Image f (x, y)
(x, y)
Most spatial domain enhancement
operations can be reduced to the form
g (x, y) = T[ f (x, y)]
where f (x, y) is the
input image, g (x, y) is
the processed image
and T is some
operator defined over
some neighbourhood
of (x, y)
Point Processing
The simplest spatial domain operations
occur when the neighbourhood is simply
the pixel itself
In this case T is referred to as a grey level
transformation function or a point
processing operation
Point processing operations take the form
s = T ( r )
where s refers to the processed image
pixel value and r refers to the original
image pixel value
Point Processing Example: Negative Images
Negative images are useful for enhancing white
or grey detail embedded in dark regions of an
image
– Note how much clearer the tissue is in the
negative image of the mammogram below
s = 1.0 - r
Original
Image
Negative
Image
Point Processing Example:
Negative Images (cont…)
Original Image x
y Image f (x, y)
Enhanced Image x
y Image f (x, y)
s = intensitymax - r
Point Processing Example: Thresholding
Thresholding transformations are
particularly useful for segmentation in
which we want to isolate an object of
interest from a background
s =
1.0
0.0 r <= threshold
r > threshold
Basic Grey Level Transformations
There are many different kinds of grey
level transformations
Three of the most
common are shown
here
– Linear
Negative/Identity
– Logarithmic
Log/Inverse log
– Power law
nth power/nth root
Logarithmic Transformations
The general form of the log
transformation is
s = c * log(1 + r)
The log transformation maps a
narrow range of low input grey level
values into a wider range of output
values
The inverse log transformation
performs the opposite transformation
Logarithmic Transformations (cont…)
Log functions are particularly useful when
the input grey level values may have an
extremely large range of values
In the following example the Fourier
transform of an image is put through a log
transform to reveal more detail
s = log(1 + r)
Logarithmic Transformations (cont…)
Original Image x
y Image f (x, y)
Enhanced Image x
y Image f (x, y)
s = log(1 + r)
We usually set c to 1
Grey levels must be in the range
[0.0, 1.0]
Power Law Transformations
Power law
transformations have
the following form
s = c * r γ
Map a narrow range
of dark input values
into a wider range of
output values or vice
versa
Varying γ gives a whole
family of curves
Power Law Transformations (cont…)
We usually set c to 1
Grey levels must be in the range
[0.0, 1.0]
Original Image x
y Image f (x, y)
Enhanced Image x
y Image f (x, y)
s = r γ
Power Law Example
Power Law Example (cont…)
γ = 0.6
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.2 0.4 0.6 0.8 1
Old Intensities
Transformed
Intensities
Power Law Example (cont…)
The images to the
right show a
magnetic resonance
(MR) image of a
fractured human
spine
Different curves
highlight different
detail
s = r 0.6
s
=
r
0.4
Power Law Example
Power Law Example (cont…)
γ = 5.0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.2 0.4 0.6 0.8 1
Original Intensities
Transformed
Intensities
Power Law Transformations (cont…)
An aerial photo
of a runway is
shown
This time
power law
transforms are
used to darken
the image
Different
curves
highlight
different detail
s = r 3.0
s
=
r
4.0
Gamma Correction
Many of you might be familiar with
gamma correction of computer monitors
Problem is that
display devices do
not respond linearly
to different
intensities
Can be corrected
using a log
transform
Piecewise Linear Transformation Functions
Rather than using a well defined mathematical
function we can use arbitrary
user-defined transforms
The images below show a
contrast stretching linear
transform to add contrast
to a poor quality image
Gray Level Slicing
Highlights a specific range of grey levels
– Similar to thresholding
– Other levels can be
suppressed or maintained
– Useful for highlighting
Features in an image
Bit Plane Slicing
Often by isolating particular bits of the
pixel values in an image we can highlight
interesting aspects of that image
– Higher-order bits usually contain most
of the significant visual information
– Lower-order bits contain
subtle details
Bit Plane Slicing (cont…)
[01000000]
[10000000]
[00001000]
[00000001]
[00100000]
[00000100]
Contrast Stretching
We can fix images that have poor
contrast by applying a pretty simple
contrast specification
The interesting part is how do we
decide on this transformation function?
Histogram Equalisation
Spreading out the frequencies in an
image (or equalising the image) is a
simple way to improve dark or
washed out images
The formula for histogram
equalisation is given where
– rk:input intensity
– sk:processed intensity
– k: the intensity range
(e.g 0.0 – 1.0)
– nj:the frequency of intensity j
– n: the sum of all frequencies
)
( k
k r
T
s 



k
j
j
r r
p
1
)
(



k
j
j
n
n
1
Equalisation Transformation Function
Equalisation Examples
Equalisation Examples (cont…)
DIP PPT (1).pptx

More Related Content

Similar to DIP PPT (1).pptx

Biometric simulator for visually impaired (1)
Biometric simulator for visually impaired (1)Biometric simulator for visually impaired (1)
Biometric simulator for visually impaired (1)
Rahul Bhagat
 
Using Image Acquisition Is The Input Text Document
Using Image Acquisition Is The Input Text DocumentUsing Image Acquisition Is The Input Text Document
Using Image Acquisition Is The Input Text Document
Lisa Williams
 
Ch1.pptx
Ch1.pptxCh1.pptx
Ch1.pptx
danielzewde12
 
An Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial IntelligenceAn Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial Intelligence
Wasif Altaf
 
Photometric calibration
Photometric calibrationPhotometric calibration
Photometric calibration
Ali A Jalil
 
An Introduction to Digital Image Analysis.pdf
An Introduction to Digital Image Analysis.pdfAn Introduction to Digital Image Analysis.pdf
An Introduction to Digital Image Analysis.pdf
The Lifesciences Magazine
 
Dip lect2-Machine Vision Fundamentals
Dip  lect2-Machine Vision Fundamentals Dip  lect2-Machine Vision Fundamentals
Dip lect2-Machine Vision Fundamentals
Abdul Abbasi
 
General Review Of Algorithms Presented For Image Segmentation
General Review Of Algorithms Presented For Image SegmentationGeneral Review Of Algorithms Presented For Image Segmentation
General Review Of Algorithms Presented For Image Segmentation
Melissa Moore
 
Evaluation Of Proposed Design And Necessary Corrective Action
Evaluation Of Proposed Design And Necessary Corrective ActionEvaluation Of Proposed Design And Necessary Corrective Action
Evaluation Of Proposed Design And Necessary Corrective Action
Sandra Arveseth
 
IT6005 digital image processing question bank
IT6005   digital image processing question bankIT6005   digital image processing question bank
IT6005 digital image processing question bank
Gayathri Krishnamoorthy
 
Dip 4 ece-1 &amp; 2
Dip 4 ece-1 &amp; 2Dip 4 ece-1 &amp; 2
Dip 4 ece-1 &amp; 2
hayhadiabbas
 
Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...
csandit
 
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
cscpconf
 
3.introduction onwards deepa
3.introduction onwards deepa3.introduction onwards deepa
3.introduction onwards deepaSafalsha Babu
 
Intensity Enhancement in Gray Level Images using HSV Color Coding Technique
Intensity Enhancement in Gray Level Images using HSV Color Coding TechniqueIntensity Enhancement in Gray Level Images using HSV Color Coding Technique
Intensity Enhancement in Gray Level Images using HSV Color Coding Technique
IRJET Journal
 
Digital image processing2.pptx
Digital image processing2.pptxDigital image processing2.pptx
Digital image processing2.pptx
DivyanshAgarwal78
 
DIP-LECTURE_NOTES.pdf
DIP-LECTURE_NOTES.pdfDIP-LECTURE_NOTES.pdf
DIP-LECTURE_NOTES.pdf
VaideshSiva1
 
Sub ecs 702_30sep14
Sub ecs 702_30sep14Sub ecs 702_30sep14
Sub ecs 702_30sep14
shubham singh
 
Module 1
Module 1Module 1
Module 1
ushaBS2
 

Similar to DIP PPT (1).pptx (20)

Biometric simulator for visually impaired (1)
Biometric simulator for visually impaired (1)Biometric simulator for visually impaired (1)
Biometric simulator for visually impaired (1)
 
Using Image Acquisition Is The Input Text Document
Using Image Acquisition Is The Input Text DocumentUsing Image Acquisition Is The Input Text Document
Using Image Acquisition Is The Input Text Document
 
Ch1.pptx
Ch1.pptxCh1.pptx
Ch1.pptx
 
An Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial IntelligenceAn Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial Intelligence
 
Photometric calibration
Photometric calibrationPhotometric calibration
Photometric calibration
 
An Introduction to Digital Image Analysis.pdf
An Introduction to Digital Image Analysis.pdfAn Introduction to Digital Image Analysis.pdf
An Introduction to Digital Image Analysis.pdf
 
Dip lect2-Machine Vision Fundamentals
Dip  lect2-Machine Vision Fundamentals Dip  lect2-Machine Vision Fundamentals
Dip lect2-Machine Vision Fundamentals
 
General Review Of Algorithms Presented For Image Segmentation
General Review Of Algorithms Presented For Image SegmentationGeneral Review Of Algorithms Presented For Image Segmentation
General Review Of Algorithms Presented For Image Segmentation
 
Evaluation Of Proposed Design And Necessary Corrective Action
Evaluation Of Proposed Design And Necessary Corrective ActionEvaluation Of Proposed Design And Necessary Corrective Action
Evaluation Of Proposed Design And Necessary Corrective Action
 
IT6005 digital image processing question bank
IT6005   digital image processing question bankIT6005   digital image processing question bank
IT6005 digital image processing question bank
 
Dip 4 ece-1 &amp; 2
Dip 4 ece-1 &amp; 2Dip 4 ece-1 &amp; 2
Dip 4 ece-1 &amp; 2
 
Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...
 
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
 
3.introduction onwards deepa
3.introduction onwards deepa3.introduction onwards deepa
3.introduction onwards deepa
 
Digital.cc
Digital.ccDigital.cc
Digital.cc
 
Intensity Enhancement in Gray Level Images using HSV Color Coding Technique
Intensity Enhancement in Gray Level Images using HSV Color Coding TechniqueIntensity Enhancement in Gray Level Images using HSV Color Coding Technique
Intensity Enhancement in Gray Level Images using HSV Color Coding Technique
 
Digital image processing2.pptx
Digital image processing2.pptxDigital image processing2.pptx
Digital image processing2.pptx
 
DIP-LECTURE_NOTES.pdf
DIP-LECTURE_NOTES.pdfDIP-LECTURE_NOTES.pdf
DIP-LECTURE_NOTES.pdf
 
Sub ecs 702_30sep14
Sub ecs 702_30sep14Sub ecs 702_30sep14
Sub ecs 702_30sep14
 
Module 1
Module 1Module 1
Module 1
 

Recently uploaded

Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 

Recently uploaded (20)

Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 

DIP PPT (1).pptx

  • 1. INTRODUCTION TO DIGITAL IMAGE PROCESSING Bibekanand Jena Sr. Lecturer Dept of ETE PIET, Rourkela
  • 2. •What is Digital Image Processing? Processing of Images which are digital in nature by a digital computer is known Digital Image Processing •Important terms: 1. Image 2. Digital Image 3. Processing
  • 4. •A Picture is worth a thousand words •Visual imformation is more powerful than textual information Vs
  • 5.
  • 6. An image is a 2D light intensity function f(x,y)= i(x,y) . r(x,y) Where 0<i(x,y)<∞ and 0< r(x,y)<1 i(x,y): Illumination Component r(x,y): Reflectance component Y X
  • 7. What is a Digital Image? A digital image is a representation of a two- dimensional image as a finite set of digital values, called picture elements or pixels It is discretized both in spatial co-ordinates and brightness/intensity. •It can be considered as a matrix whose row, column indices specify a point in the image and the element value identifies gray level value at that point •These elements are referred as pixels
  • 8. Conventional Coordinate for Image Representation
  • 9. Digital Image Representation No. of rows: M, No. of Column: N, Size of the image: M × N No. of gray levels (Quantization level): 2k No. of bits required to store a digitized image = M×N× k
  • 10. 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)
  • 11. Digital Image Types : Intensity Image Intensity image or monochrome image each pixel corresponds to light intensity normally represented in gray scale (gray level).             39 87 15 32 22 13 25 15 37 26 6 9 28 16 10 10 Gray scale values
  • 13. Image Types : Binary Image Binary image or black and white image Each pixel contains one bit : 1 represent white 0 represents black             1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 Binary data
  • 14. Why Processing? Digital image processing focuses on three major tasks – Improvement of pictorial information for human interpretation – Efficient storage & Transmission – Image processing for Autonomous machine application
  • 17. Remote Sensing Weather Forecasting
  • 18. Machine Vision Application: In this case the interest is the procedure of extraction of image information suitable for computer processing . Application: 1. Industrial Machine vision for product assembly and inspection 2. Automated Target detection and tracking 3. Biometric recognition 4. Many more
  • 19. What is digital image processing? Low Level Process Input: Image Output: Image Examples: Noise removal, image sharpening Mid Level Process Input: Image Output: Attributes Examples: Object recognition, segmentation High Level Process Input: Attributes Output: Understanding Examples: Scene understanding, autonomous navigation
  • 20. Image Formation in the Human Eye •The distance between the center of the lens and he retina varies from approximately 17mm to 14mm. •If ‘h’ is the height of the object in the retinal image , then from the geometry of the figure h/17 = 15/100
  • 23. Image Acquisition: An image sensor and the capability to digitize the signal produced by the sensor . Image Enhancement: Enhance the image quality by highlighting certain features of the image. It is a subjective area of image processing(Human subjective preference). Ex: Contrast / Brightness Enhancement Image Restoration: Deals with improving the appearance of an image. It is objective. Restoration tends to based on mathematical or probabilistic model of image degradation. Ex: Noise filtering Color Image Processing: Deals with fundamental concept in color model and basic colorimage processing in digital domain. Ex: Pseudo-color processing
  • 24. Multi Resolution Analysis: Deals with representing image in various degrees of resolution using Wavelet transformation. Ex: Image decomposition Image Compression: Deals with technique for reducing the storage required to save and image or the bandwidth required to transmit it. Ex: Lossy / Lossless compression Morphological Processing: Deals with tools for extracting image component that are useful for representation and description. Ex: Dilation, Erosion etc Segmentation: Partition an image into constituent parts or object. Ex: Face detection. Representation & Description: Deals with representation of the object in the image in desired form. Ex: Boundary representation is appropriate when focus is on external shape. Regional representation for internal properties. Descriptor also called feature selection, deals with extracting attributes suitable for further processing. Recognition: Assigning a label to the object based on the information provided by the descriptor.
  • 25. IMAGE DISPLAY HARD COPY IMAGE SENSOR COMPUTER SPECIALIZED IMAGE PROCESSING HARDWARE MASS STORAGE IMAGE PROCESSING SOFTWARE COMPONENTS OF AN IMAGE PROCESSING SYSTEM NETWORK
  • 26. SENSOR. Two elements are required to acquire digital images. The first is a physical device that is sensitive to the energy radiated by the object we wish to image. The second, called a digitizer, for converting the output of the physical sensing device into digital form. SPECIALIZED IMAGE PROCESSING HARDWARE usually consists of the digitizer just mentioned, plus hardware that performs other primitive operations, such as an arithmetic logic unit (ALU), which performs arithmetic and logical operations in parallel on entire images. Example: averaging images as quickly as they are digitized, for the purpose of noise reduction. THE COMPUTER It is a general-purpose computer and can range from a PC to a supercomputer. In dedicated applications, some- sometimes specially designed computers are used to achieve a required level of performance. SOFTWARE It consists of specialized modules that perform specific tasks. A well-designed package also includes the capability for the user to write code that, as a minimum, utilizes the specialized modules. MASS STORAGE Digital storage for image processing applications falls into three principal categories: A) short-term storage for use during processing, B) on-line storage for relatively fast recall, and C) archival storage, characterized by infrequent access.
  • 27. The lens focuses light from objects onto the retina • The retina is covered with light receptors called cones (6-7 million) and rods (75- 150 million) • Cones are concentrated around the fovea and are very sensitive to colour(Photopic) • Rods are more spread out and are sensitive to low levels of illumination (Scotopic) Brightness Adaptation of Human Eye : Mach Band Effect
  • 28. • Experimental evidence indicates that subjective brightness is a logarithmic function of the light intensity incident on the eye. •The total range of distinct intensity levels the eye can discriminate simultaneously is rather small when compared with the total adaptation range. •For any given set of conditions, the current sensitivity level of the visual system is called the brightness adaptation level. •Since digital images are displayed as a discrete set of intensities, the eye’s ability to discriminate between different intensity levels is an important issue. •The range of light intensity levels adapted by human visual system is enormous, on the order of 1010, from the scotopic threshold to the glare limit.
  • 29. •An increment of illumination,ΔI , is added to the field in the form of a short-duration flash. •If ΔI is not bright enough, the subject says “no”. •As ΔI gets stronger, the subject may give a positive response of “yes” •Finally, when ΔI becomes strong enough, the subject will give a positive response of “yes” all the time. •The quantity ΔI /I, where ΔI denote the increment of illumination discriminable 50% of the time with background illumination I is called the Weber ratio. •A small value of ΔI /I means that a small change in intensity is discriminable. It represents “good” brightness discrimination. BRIGHTNESS DISCRIMINATION •Another important issue is the ability of the eye to discriminate between changes in light intensity at any specific adaptation level. •Figure shows the idea of a basic experiment to determine the human visual system for brightness discrimination
  • 30. Figure shows that brightness discrimination improves significantly as background illumination increases.
  • 31. Position Intensity Brightness Adaptation of Human Eye : Mach Band Effect
  • 32. Mach Band Effect Intensities of surrounding points effect perceived brightness at each point. In this image, edges between bars appear brighter on the right side and darker on the left side.
  • 33. In area A, brightness perceived is darker while in area B is brighter. This phenomenon is called Mach Band Effect. Position Intensity A B Mach Band Effect (Cont)
  • 34. Simultaneous contrast. All small squares have exactly the same intensity but they appear progressively darker as background becomes lighter. Brightness Adaptation of Human Eye : Simultaneous Contrast
  • 38. Image Sampling and Quantization Image sampling: discretize an image in the spatial domain Spatial resolution / image resolution: pixel size or number of pixels
  • 39. How to choose the spatial resolution = Sampling locations Original image Sampled image Under sampling, we lost some image details! Spatial resolution
  • 40. How to choose the spatial resolution : Nyquist Rate Original image = Sampling locations Minimum Period Spatial resolution (sampling rate) Sampled image No detail is lost! Nyquist Rate: Spatial resolution must be less or equal half of the minimum period of the image or sampling frequency must be greater or Equal twice of the maximum frequency. 2mm 1mm
  • 41. Effect of Spatial Resolution 256x256 pixels 64x64 pixels 128x128 pixels 32x32 pixels
  • 42. Effect of Spatial Resolution
  • 43. Image Quantization Image quantization: discretize continuous pixel values into discrete numbers Color resolution/ color depth/ levels: - No. of colors or gray levels or - No. of bits representing each pixel value - No. of colors or gray levels Nc is given by b c N 2  where b = no. of bits
  • 45. Effect of Quantization Levels 16 levels 8 levels 2 levels 4 levels In this image, it is easy to see false contour.
  • 46. Basic Relationship of Pixels x y (0,0) Conventional indexing method (x,y) (x+1,y) (x-1,y) (x,y-1) (x,y+1) (x+1,y-1) (x-1,y-1) (x-1,y+1) (x+1,y+1)
  • 47. Neighbors of a Pixel p (x+1,y) (x-1,y) (x,y-1) (x,y+1) 4-neighbors of p: N4(p) = (x-1,y) (x+1,y) (x,y-1) (x,y+1) Neighborhood relation is used to tell adjacent pixels. It is useful for analyzing regions. Note: q N4(p) implies p N4(q) 4-neighborhood relation considers only vertical and horizontal neighbors.
  • 48. p (x+1,y) (x-1,y) (x,y-1) (x,y+1) (x+1,y-1) (x-1,y-1) (x-1,y+1) (x+1,y+1) Neighbors of a Pixel (cont.) 8-neighbors of p: (x-1,y-1) (x,y-1) (x+1,y-1) (x-1,y) (x+1,y) (x-1,y+1) (x,y+1) (x+1,y+1) N8(p) = 8-neighborhood relation considers all neighbor pixels.
  • 49. p (x+1,y-1) (x-1,y-1) (x-1,y+1) (x+1,y+1) Diagonal neighbors of p: ND(p)= (x-1,y-1) (x+1,y-1) (x-1,y+1) (x+1,y+1) Neighbors of a Pixel (cont.) Diagonal -neighborhood relation considers only diagonal neighbor pixels.
  • 50. . For p and q from the same class 4-Adjacency: Two pixels p and q with values from V (a set of gray level) are 4-adjacent if q N4(p)  8-Adjacency: Two pixels p and q with values from V (a set of gray level) are 8-adjacent if q N8(p)  mixed-Adjacency (m-Adjacency): Two pixels p and q with values  from V (a set of gray level) are m-adjacent • if q N4(p) or • q ND(p) and N4(p) N4(q) =  Adjacency
  • 51. Path A path from pixel p at (x,y) to pixel q at (s,t) is a sequence of distinct pixels: (x0,y0), (x1,y1), (x2,y2),…, (xn,yn) such that (x0,y0) = (x,y) and (xn,yn) = (s,t) and (xi,yi) is adjacent to (xi-1,yi-1), i = 1,…,n p q We can define type of path: 4-path, 8-path or m-path depending on type of adjacency.
  • 52. Adjacency A pixel p is connected to pixel q is they are adjacent. Two image subsets S1 and S2 are connected if some pixel in S1 is adjacent to some pixel in S2 S1 S2 We can define type of adjacency: 4-adjacency, 8-adjacency or m-adjacency depending on type of connectivity.
  • 53. Path (cont.) p q p q p q 8-path from p to q results in some ambiguity m-path from p to q solves this ambiguity 8-path m-path
  • 54. Distance For pixel p, q, and z with coordinates (x,y), (s,t) and (u,v), D is a distance function or metric if  D(p,q) 0 (D(p,q) = 0 if and only if p = q)  D(p,q) = D(q,p)  D(p,z) D(p,q) + D(q,z) Example: Euclidean distance 2 2 ) ( ) ( ) , ( t y s x q p De - + - 
  • 55. Distance (cont.) D4-distance (city-block distance) is defined as t y s x q p D - + -  ) , ( 4 1 2 1 0 1 2 1 2 2 2 2 2 2 Pixels with D4(p) = 1 is 4-neighbors of p.
  • 56. Distance (cont.) D8-distance (chessboard distance) is defined as ) , max( ) , ( 8 t y s x q p D - -  1 2 1 0 1 2 1 2 2 2 2 2 2 Pixels with D8(p) = 1 is 8-neighbors of p. 2 2 2 2 2 2 2 2 1 1 1 1
  • 57. What Is Image Enhancement? Image enhancement is the process of making images more useful The reasons for doing this include: – Highlighting interesting detail in images – Removing noise from images – Making images more visually appealing
  • 60. Spatial & Frequency Domains There are two broad categories of image enhancement techniques – Spatial domain techniques Direct manipulation of image pixels – Frequency domain techniques Manipulation of Fourier transform or wavelet transform of an image For the moment we will concentrate on techniques that operate in the spatial domain
  • 61. Image Histograms The histogram of an image shows us the distribution of grey levels in the image Massively useful in image processing, especially in segmentation Grey Levels Frequencies
  • 62. Histogram Examples (cont…) A selection of images and their histograms Notice the relationships between the images and their histograms Note that the high contrast image has the most evenly spaced histogram
  • 63. Basic Spatial Domain Image Enhancement Origin x y Image f (x, y) (x, y) Most spatial domain enhancement operations can be reduced to the form g (x, y) = T[ f (x, y)] where f (x, y) is the input image, g (x, y) is the processed image and T is some operator defined over some neighbourhood of (x, y)
  • 64. Point Processing The simplest spatial domain operations occur when the neighbourhood is simply the pixel itself In this case T is referred to as a grey level transformation function or a point processing operation Point processing operations take the form s = T ( r ) where s refers to the processed image pixel value and r refers to the original image pixel value
  • 65. Point Processing Example: Negative Images Negative images are useful for enhancing white or grey detail embedded in dark regions of an image – Note how much clearer the tissue is in the negative image of the mammogram below s = 1.0 - r Original Image Negative Image
  • 66. Point Processing Example: Negative Images (cont…) Original Image x y Image f (x, y) Enhanced Image x y Image f (x, y) s = intensitymax - r
  • 67. Point Processing Example: Thresholding Thresholding transformations are particularly useful for segmentation in which we want to isolate an object of interest from a background s = 1.0 0.0 r <= threshold r > threshold
  • 68. Basic Grey Level Transformations There are many different kinds of grey level transformations Three of the most common are shown here – Linear Negative/Identity – Logarithmic Log/Inverse log – Power law nth power/nth root
  • 69. Logarithmic Transformations The general form of the log transformation is s = c * log(1 + r) The log transformation maps a narrow range of low input grey level values into a wider range of output values The inverse log transformation performs the opposite transformation
  • 70. Logarithmic Transformations (cont…) Log functions are particularly useful when the input grey level values may have an extremely large range of values In the following example the Fourier transform of an image is put through a log transform to reveal more detail s = log(1 + r)
  • 71. Logarithmic Transformations (cont…) Original Image x y Image f (x, y) Enhanced Image x y Image f (x, y) s = log(1 + r) We usually set c to 1 Grey levels must be in the range [0.0, 1.0]
  • 72. Power Law Transformations Power law transformations have the following form s = c * r γ Map a narrow range of dark input values into a wider range of output values or vice versa Varying γ gives a whole family of curves
  • 73. Power Law Transformations (cont…) We usually set c to 1 Grey levels must be in the range [0.0, 1.0] Original Image x y Image f (x, y) Enhanced Image x y Image f (x, y) s = r γ
  • 75. Power Law Example (cont…) γ = 0.6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.2 0.4 0.6 0.8 1 Old Intensities Transformed Intensities
  • 76. Power Law Example (cont…) The images to the right show a magnetic resonance (MR) image of a fractured human spine Different curves highlight different detail s = r 0.6 s = r 0.4
  • 78. Power Law Example (cont…) γ = 5.0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.2 0.4 0.6 0.8 1 Original Intensities Transformed Intensities
  • 79. Power Law Transformations (cont…) An aerial photo of a runway is shown This time power law transforms are used to darken the image Different curves highlight different detail s = r 3.0 s = r 4.0
  • 80. Gamma Correction Many of you might be familiar with gamma correction of computer monitors Problem is that display devices do not respond linearly to different intensities Can be corrected using a log transform
  • 81. Piecewise Linear Transformation Functions Rather than using a well defined mathematical function we can use arbitrary user-defined transforms The images below show a contrast stretching linear transform to add contrast to a poor quality image
  • 82. Gray Level Slicing Highlights a specific range of grey levels – Similar to thresholding – Other levels can be suppressed or maintained – Useful for highlighting Features in an image
  • 83. Bit Plane Slicing Often by isolating particular bits of the pixel values in an image we can highlight interesting aspects of that image – Higher-order bits usually contain most of the significant visual information – Lower-order bits contain subtle details
  • 84. Bit Plane Slicing (cont…) [01000000] [10000000] [00001000] [00000001] [00100000] [00000100]
  • 85. Contrast Stretching We can fix images that have poor contrast by applying a pretty simple contrast specification The interesting part is how do we decide on this transformation function?
  • 86. Histogram Equalisation Spreading out the frequencies in an image (or equalising the image) is a simple way to improve dark or washed out images The formula for histogram equalisation is given where – rk:input intensity – sk:processed intensity – k: the intensity range (e.g 0.0 – 1.0) – nj:the frequency of intensity j – n: the sum of all frequencies ) ( k k r T s     k j j r r p 1 ) (    k j j n n 1