SlideShare a Scribd company logo
1 of 198
Basic Concepts
and Terminology
Applications of Image Processing
Image Processing
Security
Application
Industrial
Application
Military
Application
Medical
Application
Consumer
Electronics
What is an Image?
Discrete representation of data
possessing both spatial(layout)
and intensity (color) information.
What is a digital image?
Representation of a two-dimensional
image using a finite number of points
usually called picture elements or pixels.
I (M,N)
I (0,N)I (0,0)
I (M,0)
Image pixel location at
(m,n) denoted I(m,n)
Image Color
RGB : Red, Green, Blue
HSV : Hue, Saturation, Value (Intensity)
Greyscale
Black (min)
White (max)
Black/white
Image Resolution and Quantization
Size of 2-D grid and data size
stored for each individual
image pixel.
Resolution of image source
• Spatial Resolution
C X R e.g. 640 x 480, 800 x 600
• Temporal Resolution
e.g. 25fps
• Bit Resolution
e.g. 24 bit
Image Formats
JPEG Joint Photographic
Experts Group
Lossy compression
GIF Graphics Interchange
Format
Lossless compression
Limited to 8bit color
BMP Bit map picture Basic format
Lossless compression
PNG Portable network
graphics
Lossless compression
TIFF Tagged Image file format Very flexible
Compressed/ Uncompressed
Image Data Types
• Binary Image
• Intensity or greyscale
Image
• RGB or true-color Image
• Floating – Point Image
Scope of Image Processing
Low Level
Mid Level
High Level
Primitive operations
e.g. noise reduction
Extraction of attributes
e.g. edges and contours
Anlysis and interpretation
Example of some image processing
operations.
1. Sharpening
original sharper
2. Noise Removal
original noisy
3. De-blurring
Blur image De-blurred image
4. Blurring
original image blurred image
4. Edge Extraction
original image
After edge extraction
5. Binarization
original image After binarization
7. Contrast Enhancement
original image After contrast enhancement
6. Object Segmentation and Labeling
Some Basic Terms
Image Topology
Investigation of fundamental image
properties using morphological operators
Neighborhood Pixels surrounding a given pixel
Adjacency Two pixels p and q are 4-adjacent if they are 4-neighbors of each
other and 8-adjacent if they are 8-neighbors of one another.
Paths
A 4-path between two pixels p and q is a sequence of pixels starting with
p and ending with q such that each pixel in the sequence is 4-adjacent to
its predecessor in the sequence.
Components A set of pixels connected to each other
Connectivity Existence path between two pixels
Overview of machine vision systems
Acquisition Preprocessing Segmentation
Feature
Extraction
Classification
Knowledge
Base
Problem
domain
Result
Image Formation
Understanding the formation
of an image
Image =PSF * Object function+ Noise
S = p * o + n
Convolution
-The way information on the object
function is spread .
-Characteristic of imaging device The way light is reflected from
object to imaging instrument
Unwanted external disturbances
Object Plane (scene Object Function)
Point source
Of lightImaging
System
Area of influence in image from
Ingle point light source defined by PSF
Input Distribution
(o)
Imaging System
PSF(o) + n
Output Distribution
(o)
Overview of image formation system
Understanding the mathematics
of image formation
SYSTEM S
S(I) = O
Input Distribution I Output Distribution O
SYSTEM S
S(I) = O
Input Distribution I Output Distribution O
Linear imaging systems
𝑆 𝑎𝑋 + 𝑏𝑌 = 𝑎𝑆 𝑋 + 𝑏𝑆{𝑌}
𝑔 𝑥, 𝑦 = 𝑓 𝑥′
, 𝑦′
ℎ 𝑥, 𝑦; 𝑥′
, 𝑦′
𝑑𝑥′
𝑑𝑦′ʃʃ
Linear superposition integral
The Dirac delta or impulse
function
• Represents a bright intensity source
• Occupies infinitesimal region in space
𝑟𝑒𝑐𝑡
𝑥
𝑎
= 1 𝑥 < 𝑎/2
1-D rectangle function :
=0 otherwise
lim
𝑎→0
1
𝑎
𝑟𝑒𝑐𝑡
𝑥
𝑎
lim
𝑎→0
1
𝑎
𝑟𝑒𝑐𝑡
𝑥
𝑎
𝑟𝑒𝑐𝑡
𝑦
𝑎
1-D
2-D
δ 𝑥 =
δ 𝑥, 𝑦 =
δ 𝑥 = ∞ 𝑥 = 0
= 0 𝑥 ≠ 0
∞
∞
δ 𝑥 𝑑𝑥 = 1
δ 𝑥 − 𝑥0 = ∞ 𝑥 = 𝑥0
= 0 𝑥 ≠ 𝑥0
∞
∞
δ 𝑥, 𝑦 𝑑𝑥𝑑𝑦 = 1
δ 𝑥, 𝑦 = ∞ 𝑥 = 0, 𝑦 = 0
= 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
The Sifting theorem
∞
∞
𝒇(𝒙)𝜹 𝒙 − 𝒙 𝟎 𝒅𝒙 = 𝒇(𝒙 𝟎)
∞
∞
𝒇(𝒙, 𝒚)𝜹 𝒙 − 𝒙 𝟎, 𝒚 − 𝒚 𝟎 𝒅𝒙𝒅𝒚 = 𝒇(𝒙 𝟎,
𝒚 𝟎)
1-D
2-D
Properties of the delta function
• 𝑺𝒊𝒏𝒈𝒖𝒍𝒂𝒓𝒊𝒕𝒚 δ 𝑥 = ∞ 𝑥 = 0
= 0 𝑥 ≠ 0
• 𝑼𝒏𝒊𝒕 𝒂𝒓𝒆𝒂
∞
∞
δ 𝑥 𝑑𝑥 = 1
• 𝑺𝒉𝒊𝒇𝒕 𝒑𝒓𝒐𝒑𝒆𝒓𝒕𝒚 ∞
∞
𝒇(𝒙)𝜹 𝒙 − 𝒙 𝟎 𝒅𝒙 = 𝒇(𝒙 𝟎)
The Point – Spread Function (PSF)
𝐓𝐡𝐞 𝐫𝐞𝐬𝐩𝐨𝐧𝐬𝐞 𝐨𝐟 𝐚 𝐬𝐲𝐬𝐭𝐞𝐦 𝐭𝐨
an input distribution consisting of a very
small intensity point.
𝒇 𝒙′
, 𝒚′ = 𝜹(𝒙′
− 𝒙 𝟎, 𝒚′ − 𝒚 𝟎)Input function :
𝒈(𝒙, 𝒚) = 𝜹 𝒙′
− 𝒙 𝟎, 𝒚′ − 𝒚 𝟎 𝒉 𝒙, 𝒚; 𝒙′
, 𝒚′
𝒅𝒙′𝒅𝒚′
( Dirac delta function )
( Linear superposition integral)
𝒈 𝒙, 𝒚 = 𝒉(𝒙, 𝒚; 𝒙 𝟎, 𝒚 𝟎)
Effects of system PSF
Arithmetic and
Logical Operations
Arithmetic Operations
𝑋 𝑜𝑝𝑛 𝑌 = 𝑍
𝑜𝑝𝑛 ∶ (+, −, 𝑋,/)
𝑋 ∶ 2𝐷 𝑎𝑟𝑟𝑎𝑦
𝑌 ∶ 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 2𝐷 𝑎𝑟𝑟𝑎𝑦
𝐴𝑑𝑑𝑖𝑛𝑔 𝑡𝑜 𝑖𝑚𝑎𝑔𝑒𝑠
𝐹𝑖𝑟𝑠𝑡 𝑖𝑚𝑎𝑔𝑒 𝑆𝑒𝑐𝑜𝑛𝑑 𝑖𝑚𝑎𝑔𝑒 𝑅𝑒𝑠𝑢𝑙𝑡
𝑁𝑜𝑟𝑚𝑎𝑙𝑖𝑧𝑎𝑡𝑖𝑜𝑛
𝑔 =
𝐿 𝑚𝑎𝑥
𝑓 𝑚𝑎𝑥 − 𝑓𝑚𝑖𝑛
(𝑓 − 𝑓𝑚𝑖𝑛)
𝑓 ∶ 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑝𝑖𝑥𝑒𝑙 𝑖𝑛 𝑤
𝐿 𝑚𝑎𝑥: 𝑚𝑎𝑥𝑖𝑚𝑢𝑚 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑖𝑛𝑡𝑒𝑛𝑠𝑖𝑡𝑦
𝑔 ∶ 𝑐𝑜𝑟𝑟𝑒𝑠𝑝𝑜𝑛𝑑𝑖𝑛𝑔 𝑝𝑖𝑥𝑒𝑙 𝑖𝑛 𝑍
𝑓 𝑚𝑎𝑥: 𝑚𝑎𝑥𝑖𝑚𝑢𝑚 𝑝𝑖𝑥𝑒𝑙 𝑖𝑛 𝑊
𝑊: 𝑖𝑛𝑡𝑒𝑟𝑚𝑒𝑑𝑖𝑎𝑡𝑒 𝑟𝑒𝑠𝑢𝑙𝑡 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒
Addition
200 100 100
0 10 50
50 250 120
100 220 230
45 95 120
205 100 0
300 320 330
45 105 170
255 350 120
213 230 238
0 50 105
175 255 63
255 255 255
45 105 170
255 255 120
𝑋 𝑌 𝑊
+ =
𝑁𝑜𝑟𝑚𝑎𝑙𝑖𝑧𝑖𝑛𝑔 45,350 𝑟𝑎𝑛𝑔𝑒 𝑡𝑜 [0,255]
𝑇𝑟𝑢𝑛𝑐𝑎𝑡𝑖𝑛𝑔 𝑎𝑙𝑙 𝑣𝑎𝑙𝑢𝑒𝑠 𝑎𝑏𝑜𝑣𝑒 255 𝑖𝑛 𝑊
=
=
𝑍 𝑎
𝑍 𝑏
Subtraction
200 100 100
0 10 50
50 250 120
100 220 230
45 95 120
205 100 0
100 0 0
0 0 0
0 150 120
0 120 130
45 85 70
155 0 0
100 120 130
45 85 70
155 150 120
𝑋 𝑌 𝑍 𝑎
=
=
=
𝑍 𝑏
𝑍 𝑐
= 𝑋 − 𝑌
= |𝑌 − 𝑋|
= 𝑌 − 𝑋
𝑾𝒊𝒕𝒉 𝒕𝒓𝒖𝒏𝒄𝒂𝒕𝒊𝒐𝒏
𝑾𝒊𝒕𝒉 𝒕𝒓𝒖𝒏𝒄𝒂𝒕𝒊𝒐𝒏
Multiplication
• Used to perform brightness adjustment
• Makes each pixel brighter or darker by
multiplying its original value by a scalar factor
• Multiplication produces better subjective
results than addition.
Logic Operations
• AND
• OR
• XOR
• NOT
• 1 = true = white pixel
• 0 = false = black pixel
𝑪𝒐𝒏𝒗𝒆𝒏𝒕𝒊𝒐𝒏𝒔
𝐴𝑁𝐷 =
𝑂𝑅 =
𝑋𝑂𝑅 =
𝑁𝑂𝑇
Linear Shift-Invariance & Convolution
𝒈 𝒙, 𝒚 = 𝒇 𝒙′
, 𝒚′
𝒉 𝒙, 𝒚; 𝒙′
, 𝒚′
𝒅𝒙′
𝒅𝒚′ʃʃ
128 x 128
1284 = 268.4 million
𝒉 𝒙, 𝒚; 𝒙′, 𝒚′ = 𝒉 𝒙′′, 𝒚′′ = 𝒉(𝒙 − 𝒙′, 𝒚 − 𝒚′)
𝒈(𝒙, 𝒚) =
∞
∞
𝒇 𝒙′
, 𝒚′
𝒉 𝒙 − 𝒙′, 𝒚 − 𝒚′ 𝒅𝒙′𝒅𝒚′
The convolution integral
𝒈 𝒙 =
∞
∞
𝒇 𝒙′
𝒉(𝒙 − 𝒙′) 𝒅𝒙′
2-D
1-D
𝒈 𝒙, 𝒚 = 𝒇 𝒙, 𝒚 ∗∗ 𝒉(𝒙, 𝒚)
𝒈 𝒙 = 𝒇 𝒙 ∗ 𝒉(𝒙)
2-D
1-D
Calculation of a 1-D Convolution Integral
𝒈 𝒙 = 𝒇 𝒙′ 𝒉 𝒙, 𝒙′
𝒅𝒙′
= 𝒇 𝒙′
δ 𝒙 − 𝒙′
𝒅𝒙′
= 𝒇(𝒙)ʃ ʃ
𝒈 𝒙 = 𝒇 𝒙′ 𝒉 𝒙, 𝒙′
𝒅𝒙′
= 𝒇 𝒙′
𝒉 𝒙 − 𝒙′
𝒅𝒙′
ʃ ʃ
𝑰 𝒙 = 𝒈 𝒙′ 𝒉𝒅 𝒙, 𝒙′
𝒅𝒙′ 𝒈 𝒙 = 𝒇 𝒙′ δ 𝒙 − 𝒙′ 𝒅𝒙′where
ʃʃ
𝑰 𝒙 = 𝒇 𝒙′ ∗ 𝒉(𝒙, ) 𝒉𝒅 𝒙
𝒉 𝟏(𝒙) 𝒉 𝟐(𝒙) 𝒉 𝒏(𝒙)
𝒇(𝒙) 𝒈(𝒙)
𝐈𝐧𝐩𝐮𝐭 Out𝐩𝐮𝐭
𝐏𝐒𝐅 𝟏 𝐏𝐒𝐅 𝟐 𝐏𝐒𝐅 𝑵
𝒈 𝒙 = 𝒇 𝒙 ∗ 𝒉 𝟏 𝒙 ∗ 𝒉 𝟐 𝒙 … ∗ 𝒉𝒏(𝒙)
=
= −𝟏𝒙𝟏𝟎 + −𝟏𝒙𝟏𝟏 + −𝟏𝒙𝟖 + −𝟏𝒙𝟒𝟎 + (𝟖𝒙𝟑𝟓)
𝑓𝑖 𝟏−𝒋
𝟗
𝒘 𝒌 𝑰 𝒌(𝒊)=
+ −𝟏𝒙𝟒𝟐 + −𝟏𝒙𝟑𝟖 + −𝟏𝒙𝟑𝟔 + −𝟏𝒙𝟒𝟔 = 𝟏𝟒
𝑔 𝑗 = ∑𝑓𝑖ℎ𝑗 𝑖
𝑔𝑘𝑙 = ∑∑𝑓𝑖𝑗ℎ 𝑘 𝑖, 𝑙 𝑗𝑗 𝑖
𝑖
Understanding the engineering
of image formation
The Pixel
Pixel : Picture element
Histogram and
Equalization
Introduction to Histograms
An image histogram is a plot of the relative frequency of occurrence of
each of the permitted pixel values in the image against the values
themselves.
A discrete probability density function which defines the likelihood of a
given pixel value occurring within the image.
Range of values within the image
(0–255 for 8-bit grayscale)
Number of times each value
actually occurs within the
particular image
Gray-scale value : ( 0 -255)
initialize all histogram array entries to 0
for each pixel I(i, j) within the image I
histogram(I(i,j)) = histogram(I(i,j)) + 1
end
• Basic contrast present in the image
• Potential differences in the color
distribution of the image foreground
and background scene components.
Histogram
A histogram uses a bar graph to profile the
occurrences of each gray level present in an image
Histogram of a simple gray scale image
Simple Histogram
Histogram of a poorly scanned image
Background
intensity
Foreground
Histogram of a more complex scene
Introduction to
Histogram Equalization
Image with poor contrast
Equalization causes a histogram with bins (vertical
lines)grouped closely together to “spread out” into a
flat or equalized histogram.
Image with poor contrast
𝑏 𝑥, 𝑦 = 𝑓[𝑐(𝑥, 𝑦)]
𝑝1 𝑎 =
1
𝐴𝑟𝑒𝑎1
𝐻1 𝑎
C : image with poor histogram
b : new image with improved histogram
f : transformation function
p1(a) : probability of finding a pixel with the value “a”
in the image
Area1 : area or number of pixels in the image
H1(a): histogram of the image
Image with poor contrast Equalized image
Histogram of a more complex scene
Histogram for threshold selection
Adaptive thresholding
• Different threshold at each pixel location .
𝑡 = 𝑚𝑒𝑎𝑛 + 𝐶
𝑡 = 𝑚𝑒𝑑𝑖𝑎𝑛 + 𝐶
𝑓𝑙𝑜𝑜𝑟
𝑚𝑎𝑥 − 𝑚𝑖𝑛
2
+ 𝐶
Image Enhancement
Techniques
Enhancement by filtering
Spatial domain
filtering
Filtering on the actual pixel
rather than in the frequency domain
Image Filters
Linear Filters Non Linear Filters
Connectivity
Deciding which pixels are
connected to each other
E.g.
4 – connectivity : N, W, E, S
8 – connectivity :
N, NW, W, NE,
SE, E, SW, S
NW N NE
W (i,j) E
SW S SE
3 X 3 neighborhood
centered at this point
The Filter Kernel
• Also known as the mask
=
= −𝟏𝒙𝟏𝟎 + −𝟏𝒙𝟏𝟏 + −𝟏𝒙𝟖 + −𝟏𝒙𝟒𝟎 + (𝟖𝒙𝟑𝟓)
𝑓𝑖 𝟏−𝒋
𝟗
𝒘 𝒌 𝑰 𝒌(𝒊)=
+ −𝟏𝒙𝟒𝟐 + −𝟏𝒙𝟑𝟖 + −𝟏𝒙𝟑𝟔 + −𝟏𝒙𝟒𝟔 = 𝟏𝟒
Filtering with an N X N = 3X3 kernel
Row and Column Indices
𝒊=𝑰𝒎𝒊𝒏
𝑰 𝒎𝒂𝒙
.
𝒋=𝑱𝒎𝒊𝒏
𝒋 𝒎𝒂𝒙
𝒘 𝒊, 𝒋 𝑰(𝒙 + 𝒊, 𝒚 + 𝒋)𝒇 𝒙, 𝒚 =
𝒊 = 𝟎, 𝒋 = 𝟎 ∶ 𝒄𝒆𝒏𝒕𝒆𝒓 𝒑𝒊𝒙𝒆𝒍 𝒐𝒇 𝒕𝒉𝒆 𝒌𝒆𝒓𝒏𝒆𝒍)
(𝑰 𝒎𝒂𝒙 − 𝑰𝒎𝒊𝒏 + 𝟏, 𝑱𝒎𝒂𝒙 − 𝑱𝒎𝒊𝒏 + 𝟏 ): 𝒔𝒊𝒛𝒆 𝒐𝒇 𝒌𝒆𝒓𝒏𝒆𝒍 𝒄𝒆𝒏𝒕𝒆𝒓 𝒑𝒊𝒙𝒆𝒍
Linear Indices
𝒌=𝟏
𝑵
𝒘 𝒌 𝑰 𝒌(𝒊)𝒇𝒊 =
𝑰 𝒌 𝒊 ∶ 𝒏𝒆𝒊𝒈𝒉𝒃𝒐𝒓𝒉𝒐𝒐𝒅 𝒑𝒊𝒙𝒆𝒍 𝒐𝒇 𝒕𝒉𝒆 𝒊𝒕𝒉 𝒊𝒎𝒂𝒈𝒆 𝒑𝒊𝒙𝒆𝒍
𝒌: 𝒂 𝒍𝒊𝒏𝒆𝒂𝒓 𝒊𝒏𝒅𝒆𝒙 𝒓𝒖𝒏𝒏𝒊𝒏𝒈 𝒐𝒗𝒆𝒓 𝒕𝒉𝒆 𝒏𝒆𝒊𝒈𝒉𝒃𝒐𝒓𝒉𝒐𝒐𝒅
=
= −𝟏𝐱𝟏𝟎 + −𝟏𝐱𝟏𝟏 + −𝟏𝐱𝟖 + −𝟏𝐱𝟒𝟎 + (𝟖𝐱𝟑𝟓)
𝑓𝑖 𝟏−𝒋
𝟗
𝒘 𝒌 𝑰 𝒌(𝒊)=
+ −𝟏𝐱𝟒𝟐 + −𝟏𝐱𝟑𝟖 + −𝟏𝐱𝟑𝟔 + −𝟏𝐱𝟒𝟔 = 𝟏𝟒
Filtering with an N X N = 3X3 kernel
Linear Filtering Steps Define filter kernel
Slide kernel over image
Multiply pixels under the kernel by weights
Copy resulting value to same location in new image
Geometric
Operations
Overview of Geometric Operations
Rotate Flip Crop Resize
• Modify geometry of an image by repositioning pixels
Common uses of geometric operations
• Correcting geometric distortions
• Creating special effects
• As part of image registration
Geometric
Operations
Mapping Functions Interpolation Methods
Mapping and Affine Transformation
𝑓 𝑥, 𝑦 → 𝑔(𝑥′
, 𝑦′)
𝑥′, 𝑦′ = 𝑇(𝑥, 𝑦)
Mapping function:
𝑥′ = 𝑇 𝑥(𝑥, 𝑦)
𝑦′ = 𝑇 𝑦(𝑥, 𝑦)
𝑇 𝑥, 𝑇 𝑦 = 𝑝𝑜𝑙𝑦𝑛𝑜𝑚𝑖𝑎𝑙𝑠 𝑖𝑛 𝑥 𝑎𝑛𝑑 𝑦
Where:
𝑥′
= 𝑎0 𝑥 + 𝑎1 𝑦 + 𝑎2
𝑦′
= 𝑏0 𝑥 + 𝑏1 𝑦 + 𝑏2
Affine transformation:
𝑥′
= 𝑎0 𝑥 + 𝑎1 𝑦 + 𝑎2
𝑦′
= 𝑏0 𝑥 + 𝑏1 𝑦 + 𝑏2
𝑥′
𝑦′
1
𝑎0 𝑎1 𝑎2
𝑏0 𝑏1 𝑏2
0 0 1
𝑥
𝑦
1
=
Summary of Affine Transformation Coefficients
(𝑥0, 𝑦0)
(𝑥2, 𝑦2)
(𝑥1, 𝑦1)
(𝑥1, 𝑦′1)
(𝑥2, 𝑦′2)
(𝑥0, 𝑦′0)
𝐼𝑛𝑝𝑢𝑡 𝑂𝑢𝑡𝑝𝑢𝑡
E.g. :
Generate the affine transformation matrix for :
- rotation by 30∘
- scaling by a factor 3.5 in both dimensions
- translation by[25,15] pixels
- Shear by a factor [2,3]
Mapping one triangle onto another by
an affine transformation.
cos 30
∘
= 0.866 𝑎𝑛𝑑 sin 30
∘
= −0.500
0.866 −0.500 0
0.500 0.866 0
0 0 1
=
3.5 0 0
0 3.5 0
0 0 1
1 0 0
0 1 0
25 15 1
1 3 0
2 1 0
0 0 1
=
=
=
(a)
(b)
(c)
(d)
rotation by 30∘
scaling by a factor 3.5,3.5
translation by[25,15] pixels
Shear by a factor [2,3]
𝑎0 𝑎1 𝑎2
𝑏0 𝑏1 𝑏2
0 0 1
Gray - Level
Transformations
𝐼𝑛𝑝𝑢𝑡 𝑖𝑚𝑎𝑔𝑒
𝑓(𝑥, 𝑦)
𝑂𝑢𝑡𝑝𝑢𝑡 𝑖𝑚𝑎𝑔𝑒
g(𝑥, 𝑦)𝐸𝑛ℎ𝑎𝑛𝑐𝑒𝑚𝑒𝑛𝑡
𝐴𝑝𝑝𝑙𝑖𝑐𝑎𝑡𝑖𝑜𝑛 − 𝑠𝑝𝑒𝑐𝑖𝑓𝑖𝑐
𝑓𝑒𝑑𝑏𝑎𝑐𝑘
Image enhancement process
Overview of gray-level transformations
𝑔 𝑥, 𝑦 = 𝑇[𝑓 𝑥, 𝑦 ]
Spatial transformation :
where : 𝑔 𝑥, 𝑦 ∶ 𝑝𝑟𝑜𝑐𝑒𝑠𝑠𝑒𝑑 𝑖𝑚𝑎𝑔𝑒
𝑓 𝑥, 𝑦 ∶ 𝑜𝑟𝑖𝑔𝑖𝑛𝑎𝑙 𝑖𝑚𝑎𝑔𝑒
𝑇: 𝑜𝑝𝑒𝑟𝑎𝑡𝑜𝑟 𝑜𝑛 𝑓(𝑥, 𝑦)
𝑠 = 𝑇[𝑟]
𝑟 ∶ 𝑜𝑟𝑖𝑔𝑖𝑛𝑎𝑙 𝑔𝑟𝑎𝑦 𝑙𝑒𝑣𝑒𝑙 𝑜𝑓 𝑎 𝑝𝑖𝑥𝑒𝑙
𝑠: 𝑟𝑒𝑠𝑢𝑙𝑡𝑖𝑛𝑔 𝑔𝑟𝑎𝑦 𝑙𝑒𝑣𝑒𝑙 𝑜𝑓 𝑎 𝑝𝑖𝑥𝑒𝑙
where :
𝑠 = 𝑐 . 𝑟 + 𝑏
where : 𝑟: 𝑜𝑟𝑖𝑔𝑖𝑎𝑛 𝑝𝑖𝑥𝑒𝑙 𝑣𝑎𝑙𝑢𝑒
𝑠: 𝑟𝑒𝑠𝑢𝑙𝑡𝑖𝑛𝑔 𝑝𝑖𝑥𝑒𝑙 𝑣𝑎𝑙𝑢𝑒
𝑐: 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝑓𝑜𝑟 𝑐𝑜𝑛𝑡𝑟𝑜𝑙𝑙𝑖𝑛𝑔 𝑡ℎ𝑒 𝑐𝑜𝑛𝑡𝑟𝑎𝑠𝑡 𝑜𝑓 𝑜𝑢𝑡𝑝𝑢𝑡 𝑖𝑚𝑎𝑔𝑒
Neighborhood
Processing
Steps :
• Define a reference point in the input image
• Perform reference point neighborhood operation
in input image
• Apply result of operation to the pixel of same
coordinates in the output image.
• Repeat the process for every pixel in the input image
Linear Filters Nonlinear Filters
Convolution and Correlation
∑x
Neighborhood processing : linear filtering
Convolution
𝒋=−∞
∞
𝑨 𝒋 𝑩(𝒙 − 𝒋)𝑨 ∗ 𝑩 =
Example :
Let : 𝐴 = {0,1,2,3,1,0} 𝐵 = {1,3, −1}
Solution
0 x −1 + 0 x 3 + (1 x 1) = 1
𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎
𝑩 − 𝟏 𝟑 𝟏
𝑨 ∗ 𝑩 𝟏
𝐴𝑟𝑟𝑎𝑦 𝐵 𝑚𝑖𝑟𝑟𝑜𝑟𝑒𝑑 𝑎𝑛𝑑 𝑐𝑒𝑛𝑡𝑒𝑟 𝑣𝑎𝑙𝑢𝑒 𝑎𝑙𝑖𝑔𝑛𝑒𝑑 𝑤𝑖𝑡ℎ 1𝑠𝑡 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑎𝑟𝑟𝑎𝑦 𝐴
0 x −1 + 1 x 3 + (2 x 1) = 5
𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎
𝑩 − 𝟏 𝟑 𝟏
𝑨 ∗ 𝑩 𝟏 𝟓
𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑜𝑛𝑒 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
1 x −1 + 2 x 3 + (3 x 1) = 8
𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎
𝑩 − 𝟏 𝟑 𝟏
𝑨 ∗ 𝑩 𝟏 𝟓 𝟖
𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
1 x −1 + 2 x 3 + (3 x 1) = 8
𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎
𝑩 − 𝟏 𝟑 𝟏
𝑨 ∗ 𝑩 𝟏 𝟓 𝟖
𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
2 x −1 + 3 x 3 + (2 x 1) = 9
𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎
𝑩 − 𝟏 𝟑 𝟏
𝑨 ∗ 𝑩 𝟏 𝟓 𝟖 𝟖
𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
3 x −1 + 2 x 3 + (1 x 1) = 4
𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎
𝑩 − 𝟏 𝟑 𝟏
𝑨 ∗ 𝑩 𝟏 𝟓 𝟖 𝟖 𝟒
𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
2 x −1 + 1 x 3 + (0 x 1) = 1
𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎
𝑩 − 𝟏 𝟑 𝟏
𝑨 ∗ 𝑩 𝟏 𝟓 𝟖 𝟖 𝟒 𝟏
𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
1 x −1 + 0 x 3 + 0 x 1 = −1
𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎
𝑩 − 𝟏 𝟑 𝟏
𝑨 ∗ 𝑩 𝟏 𝟓 𝟖 𝟖 𝟒 𝟏 − 𝟏
𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
𝑨 ∗ 𝑩 = { 𝟏 𝟓 𝟖 𝟖 𝟒 𝟏 − 𝟏}
𝐴 = {0,1,2,3,1,0}
𝐵 = {1,3, −1}
2-D Convolution and Correlation
𝒋=−∞
∞
𝒉 𝒋, 𝒌 𝒇(𝒙 − 𝒋, 𝒚 − 𝒌)𝒈 𝒙, 𝒚 =
𝒌=−∞
∞
.
𝒋=−𝒎 𝟐
𝒎 𝟐
𝒉 𝒋, 𝒌 𝒇(𝒙 − 𝒋, 𝒚 − 𝒌)𝒈 𝒙, 𝒚 =
𝒌=−𝒏 𝟐
𝒏 𝟐
.
OR
m2 = half of mask’s width
n2 = half of mask’s height
𝒎 𝟐 = [𝒎/𝟐] 𝒏 𝟐 = [𝒏/𝟐]
5 8 3
3 2 1
0 9 5
4 2 7
9 7 9
5 2 1
1 8 5
3 7 1
4 6 2
1 9 5
3 0 4
2 1 9
8 0 4
8 4 1
4 9 2
2 3 4
3 7
1 0
8 3
0 6
2 4
0 9
3 8
4 6
𝑨 = 𝑩 =
2 1 0
1 1 −1
0 −1 −2
20 10 2
18 1 −8
14 22 5
29 21 9
21 1 16
15 −9 −3
21 9 1
9 −5 −25
26 23 6
2 7 3
−1 9 −2
−9 10 12
−1 −3 −4
7 −6 1
6 −2 −1
−10 −12 −15
9 4
3 −11
8 −1
−9 −9
2 5
17 9
23 2
−1 −12
𝑨 ∗ 𝑩 =
−2x0 + −1𝑥0 + 0x0 + −1x0 + 1x5
+ 1x8 + 0x0 + 1x5 + (2x2)
𝒋=−∞
∞
𝑨 𝒋 𝑩(𝒙 + 𝒋)𝑨 𝑩 =
Correlation
2-D Correlation
𝒋=−∞
∞
𝒉 𝒋, 𝒌 𝒇(𝒙 + 𝒋, 𝒚 + 𝒌)𝒈 𝒙, 𝒚 =
𝒌=−∞
∞
.
𝒋=−𝒎 𝟐
𝒎 𝟐
𝒉 𝒋, 𝒌 𝒇(𝒙 + 𝒋, 𝒚 + 𝒌)𝒈 𝒙, 𝒚 =
𝒌=−𝒏 𝟐
𝒏 𝟐
.
m2 = half of mask’s width
n2 = half of mask’s height
𝒎 𝟐 = [𝒎/𝟐]
Image Smoothing
(Lowpass Filtering)
• Attenuates high frequency components
• Attenuates fine details in image
• Preserve coarse details in image
and homogeneous areas
Mean Filter
• Known as neighborhood averaging
or spatial smoothing filter.
1/9 1/9 1/9
1/9 1/9 1/9
1/9 1/9 1/9
1 1 1
1 1 1
1 1 1
𝒉 𝒙, 𝒚 = =
1
9
0.075 0.125 0.075
0.125 0.2 0.125
0.075 0.125 0.075
𝒉 𝒙, 𝒚 =
𝑴𝒐𝒅𝒊𝒇𝒊𝒆𝒅
Gaussian Blur Filter
(𝑥2 + 𝑦2)
2σ2
𝒉 𝒙, 𝒚 = 𝒆𝒙𝒑
σ = controls the overall shape of
the curve
2D Gaussian function (with σ = 3 )
Image Sharpening
(High-pass Filtering)
• Attenuates low frequency components
• Attenuates coarse details in image
• Preserve fine details in an image
and homogeneous areas
Fourier Transform and
Frequency Domain
processing.
𝑰𝒏𝒑𝒖𝒕 𝒊𝒎𝒂𝒈𝒆
𝑭(𝒖, 𝒗)𝒇(𝒙, 𝒚)
𝑭𝒐𝒖𝒓𝒊𝒆𝒓
𝐭𝐫𝐚𝐧𝐬𝐟𝐨𝐫𝐦
𝑰𝒏𝒗𝒆𝒓𝒔𝒆 𝒇𝒐𝒖𝒓𝒊𝒆𝒓
𝐭𝐫𝐚𝐧𝐬𝐟𝐨𝐫𝐦
𝑭𝒊𝒍𝒕𝒆𝒓′
𝒔 𝒇𝒓𝒆𝒒𝒖𝒆𝒏𝒄𝒚
𝒓𝒆𝒔𝒑𝒐𝒏𝒔𝒆 ∶ 𝑯(𝒖, 𝒗)
𝑮(𝒖, 𝒗)
𝒈(𝒙, 𝒚)
𝑶𝒖𝒕𝒑𝒖𝒕 𝒊𝒎𝒂𝒈𝒆
𝐗
𝒈 𝒙, 𝒚 = 𝒇 𝒙, 𝒚 ∗ 𝒉(𝒙, 𝒚)
𝑮 𝒖, 𝒗 = 𝑭 𝒖, 𝒗 𝑯(𝒖, 𝒗)
𝑤ℎ𝑒𝑟𝑒 𝐺, 𝐹, 𝑎𝑛𝑑 𝐻 → 𝐹𝑜𝑢𝑟𝑖𝑒𝑟 𝑡𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚 𝑜𝑓 𝑔, 𝑓 𝑎𝑛𝑑 ℎ 𝑟𝑒𝑠𝑝𝑒𝑐𝑡𝑖𝑣𝑒𝑙𝑦
Fourier Transform:
Transform
Operation
R
Inverse
transform
𝑓(𝑥, 𝑦) 𝑇(𝑢, 𝑣) 𝑅[𝑇 𝑢, 𝑣 ] 𝑔(𝑥, 𝑦)
𝑆𝑝𝑎𝑡𝑖𝑎𝑙
𝑑𝑜𝑚𝑎𝑖𝑛
𝑆𝑝𝑎𝑡𝑖𝑎𝑙
𝑑𝑜𝑚𝑎𝑖𝑛
𝑇𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚 𝑑𝑜𝑚𝑎𝑖𝑛
2D Forward Transform:
𝒚=𝟎
𝑵−𝟏
𝒇 𝒙, 𝒚 𝒓(𝒙, 𝒚, 𝒖, 𝒗)𝑻 𝒙, 𝒚 =
𝒙=𝟎
𝑴−𝟏
.
𝑤ℎ𝑒𝑟𝑒 ∶
𝑢 = 0,1,2, … 𝑀 − 1
𝑣 = 0,1,2, … 𝑁 − 1
𝑡𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝑠
𝑓 𝑥, 𝑦 : 𝑖𝑛𝑝𝑢𝑡 𝑖𝑚𝑎𝑔𝑒
𝑟 𝑥, 𝑦, 𝑢, 𝑣 : 𝑓𝑜𝑟𝑤𝑎𝑟𝑑 𝑡𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛 𝑘𝑒𝑟𝑛𝑒𝑙
2D Inverse Transform ( Recovering original image )
𝒗=𝟎
𝑵−𝟏
𝑻 𝒖, 𝒗 𝒔(𝒙, 𝒚, 𝒖, 𝒗)𝒇 𝒙, 𝒚 =
𝒖=𝟎
𝑴−𝟏
.
𝑤ℎ𝑒𝑟𝑒 ∶
𝑥 = 0,1,2, … 𝑀 − 1
𝑦 = 0,1,2, … 𝑁 − 1
𝑠 𝑥, 𝑦, 𝑢, 𝑣 : 𝑖𝑛𝑣𝑒𝑟𝑠𝑒 𝑡𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚 𝑘𝑒𝑟𝑛𝑒𝑙
Transform pair:
𝒚=𝟎
𝑵−𝟏
𝒇 𝒙, 𝒚 𝒓(𝒙, 𝒚, 𝒖, 𝒗)𝑻 𝒙, 𝒚 =
𝒙=𝟎
𝑴−𝟏
.
𝒗=𝟎
𝑵−𝟏
𝑻 𝒖, 𝒗 𝒔(𝒙, 𝒚, 𝒖, 𝒗)𝒇 𝒙, 𝒚 =
𝒖=𝟎
𝑴−𝟏
.
𝑜𝑟𝑖𝑔𝑖𝑛𝑎𝑙 𝑖𝑚𝑎𝑔𝑒 𝑎𝑓𝑡𝑒𝑟 𝑎𝑝𝑝𝑙𝑦𝑖𝑛𝑔 𝑙𝑝𝑓
Ideal Low-pass Filtering
𝑯 𝟏 𝒖, 𝒗 =
𝑫 𝒖, 𝒗 ≤ 𝑫 𝟎
𝑫 𝒖, 𝒗 > 𝑫 𝟎
0
1
𝑖𝑓
𝑖𝑓
𝑫 𝒖, 𝒗 = 𝑢2 + 𝑣2
𝑤ℎ𝑒𝑟𝑒 ∶
∶ 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑏𝑡𝑤 𝑎 𝑝𝑜𝑖𝑛𝑡 𝑜𝑓 𝑐𝑜𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠 𝑎𝑛𝑑 𝑡ℎ𝑒
𝑜𝑟𝑖𝑔𝑖𝑛 𝑜𝑓 𝑡ℎ𝑒 2𝑑 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 𝑝𝑙𝑜𝑡
𝑜𝑟𝑖𝑔𝑖𝑛𝑎𝑙 𝑖𝑚𝑎𝑔𝑒 𝑓𝑜𝑢𝑟𝑖𝑒𝑟 𝑠𝑝𝑒𝑐𝑡𝑟𝑢𝑚
8 𝑝𝑖𝑥𝑒𝑙𝑠 32 𝑝𝑖𝑥𝑒𝑙𝑠16 𝑝𝑖𝑥𝑒𝑙𝑠
64 𝑝𝑖𝑥𝑒𝑙𝑠 128 𝑝𝑖𝑥𝑒𝑙𝑠
Projects
The bitmap Image
Image Header
Color Table
Image Data
Image
54bytes
1028 bytes
Image Data
BMP
BMP (Windows) Header Format
Operators
Function that acts on elements of a set to
produce other elements of the same space.
Operator
Prewitt Operator
• Used to detect vertical and horizontal edges
−1 0 1
−1 0 1
−1 0 1
−1 −1 −1
0 0 0
1 1 1
Vertical Edges Horizontal Edges
Sobel Operator
• Used to detect vertical and horizontal edges
−1 0 1
−2 0 2
−1 0 1
−1 −2 −1
0 0 0
1 2 1
Vertical Edges Horizontal Edges
Kirsch Operator
• Also known as direction masks
+𝟓 +𝟓 +𝟓
−𝟑 𝟎 −𝟑
−𝟑 −𝟑 −𝟑
N
• Edge detects in 8 compass directions
+𝟓 +𝟓 −𝟑
+𝟓 𝟎 −𝟑
−𝟑 −𝟑 −𝟑
+𝟓 −𝟑 −𝟑
+𝟓 𝟎 −𝟑
+𝟓 −𝟑 −𝟑
−𝟑 −𝟑 −𝟑
+𝟓 𝟎 −𝟑
+𝟓 +𝟓 −𝟑
NW W SW
−𝟑 −𝟑 +𝟓
−𝟑 𝟎 +𝟓
−𝟑 −𝟑 +𝟓
−𝟑 +𝟓 +𝟓
−𝟑 𝟎 +𝟓
−𝟑 −𝟑 −𝟑
−𝟑 −𝟑 −𝟑
−𝟑 𝟎 −𝟑
+𝟓 +𝟓 +𝟓
−𝟑 −𝟑 +𝟓
−𝟑 𝟎 +𝟓
−𝟑 +𝟓 +𝟓
E NE S SE
Robinson Operator
• Also known as direction masks
−𝟏 𝟎 𝟏
−𝟐 𝟎 𝟐
−𝟏 𝟎 𝟏
N
• Edge detects in 8 compass directions
𝟏 𝟐 𝟏
𝟎 𝟎 𝟎
−𝟏 −𝟐 −𝟏
𝟐 𝟏 𝟎
𝟏 𝟎 −𝟏
𝟎 −𝟏 −𝟐
NW W SW
E NE S SE
𝟎 𝟏 𝟐
−𝟏 𝟎 𝟏
−𝟐 −𝟏 𝟎
−𝟏 −𝟐 −𝟏
𝟎 𝟎 𝟎
𝟏 𝟐 𝟏
𝟏 𝟎 −𝟏
𝟐 𝟎 −𝟐
𝟏 𝟎 𝟏
𝟎 −𝟏 −𝟐
𝟏 𝟎 −𝟏
𝟐 𝟏 𝟎
−𝟐 −𝟏 𝟎
−𝟏 𝟎 𝟏
𝟎 𝟏 𝟐
Laplacian Operator
• 2nd order derivative mask
0 −1 0
−1 4 −1
0 −1 0
0 1 0
1 −4 1
0 1 0
Negative Positive
GIF
GIF Signature
GIF87a
Screen
Descriptor
Global Color
Map
(Optional)
Image
Descriptor
Local Color
Map
Raster
Data
GIF
Terminator
BMP
The bitmap Image
Image Header
Color Table
Image Data
Image
54bytes
1028 bytes
Image Data
BMP
BMP (Windows) Header Format
Filtering in the
Frequency Domain
Simple Image
Operations
Warping and
Morphing
Basic Texture
Operations
Manipulating
Shapes
Edge Detection
Image Restoration
Morphological
Processing
Image Compression
and Coding
Feature Extraction
and Representation
Feature Extraction
and Representation
Image
Classification
Image Data Basics
Signal Statistics
and Noise
Signal :
How one parameter
Relates to another

More Related Content

What's hot

Image processing spatialfiltering
Image processing spatialfilteringImage processing spatialfiltering
Image processing spatialfilteringJohn Williams
 
Detailed Description on Cross Entropy Loss Function
Detailed Description on Cross Entropy Loss FunctionDetailed Description on Cross Entropy Loss Function
Detailed Description on Cross Entropy Loss Function범준 김
 
Image transforms 2
Image transforms 2Image transforms 2
Image transforms 2Ali Baig
 
Lecture 12 (Image transformation)
Lecture 12 (Image transformation)Lecture 12 (Image transformation)
Lecture 12 (Image transformation)VARUN KUMAR
 
Defense_Talk
Defense_TalkDefense_Talk
Defense_Talkcastanan2
 
Lecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard TransformLecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard TransformVARUN KUMAR
 
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...IJMER
 
Variational Autoencoder Tutorial
Variational Autoencoder Tutorial Variational Autoencoder Tutorial
Variational Autoencoder Tutorial Hojin Yang
 
Histogram Equalization(Image Processing Presentation)
Histogram Equalization(Image Processing Presentation)Histogram Equalization(Image Processing Presentation)
Histogram Equalization(Image Processing Presentation)CherryBerry2
 
Overlap save method and overlap add method in dsp
Overlap save method and overlap add method in dspOverlap save method and overlap add method in dsp
Overlap save method and overlap add method in dspchitra raju
 
Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Rediet Moges
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier TransformAbhishek Choksi
 
Analysis of Non Linear Filters with Various Density of Impulse Noise for Diff...
Analysis of Non Linear Filters with Various Density of Impulse Noise for Diff...Analysis of Non Linear Filters with Various Density of Impulse Noise for Diff...
Analysis of Non Linear Filters with Various Density of Impulse Noise for Diff...IJERA Editor
 
Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)Gourab Ghosh
 

What's hot (20)

Image processing spatialfiltering
Image processing spatialfilteringImage processing spatialfiltering
Image processing spatialfiltering
 
Detailed Description on Cross Entropy Loss Function
Detailed Description on Cross Entropy Loss FunctionDetailed Description on Cross Entropy Loss Function
Detailed Description on Cross Entropy Loss Function
 
Image transforms 2
Image transforms 2Image transforms 2
Image transforms 2
 
Lecture 12 (Image transformation)
Lecture 12 (Image transformation)Lecture 12 (Image transformation)
Lecture 12 (Image transformation)
 
Defense_Talk
Defense_TalkDefense_Talk
Defense_Talk
 
03 image transform
03 image transform03 image transform
03 image transform
 
Digital signal processing
Digital signal processingDigital signal processing
Digital signal processing
 
Lect3cg2011
Lect3cg2011Lect3cg2011
Lect3cg2011
 
Pixel relationships
Pixel relationshipsPixel relationships
Pixel relationships
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Lecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard TransformLecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard Transform
 
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
 
Variational Autoencoder Tutorial
Variational Autoencoder Tutorial Variational Autoencoder Tutorial
Variational Autoencoder Tutorial
 
Histogram Equalization(Image Processing Presentation)
Histogram Equalization(Image Processing Presentation)Histogram Equalization(Image Processing Presentation)
Histogram Equalization(Image Processing Presentation)
 
Overlap save method and overlap add method in dsp
Overlap save method and overlap add method in dspOverlap save method and overlap add method in dsp
Overlap save method and overlap add method in dsp
 
Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
 
Distributed ADMM
Distributed ADMMDistributed ADMM
Distributed ADMM
 
Analysis of Non Linear Filters with Various Density of Impulse Noise for Diff...
Analysis of Non Linear Filters with Various Density of Impulse Noise for Diff...Analysis of Non Linear Filters with Various Density of Impulse Noise for Diff...
Analysis of Non Linear Filters with Various Density of Impulse Noise for Diff...
 
Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)
 

Similar to Introduction to Image Processing

Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfnagwaAboElenein
 
Image denoising with unknown Non-Periodic Noises
Image denoising with unknown Non-Periodic NoisesImage denoising with unknown Non-Periodic Noises
Image denoising with unknown Non-Periodic NoisesSakshiAggarwal85
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Varun Ojha
 
Image Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom ConceptsImage Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom Conceptsmmjalbiaty
 
quantization and sampling presentation ppt
quantization and sampling presentation pptquantization and sampling presentation ppt
quantization and sampling presentation pptKNaveenKumarECE
 
Learning a nonlinear embedding by preserving class neibourhood structure 최종
Learning a nonlinear embedding by preserving class neibourhood structure   최종Learning a nonlinear embedding by preserving class neibourhood structure   최종
Learning a nonlinear embedding by preserving class neibourhood structure 최종WooSung Choi
 
Digital image processing fundamental explanation
Digital image processing fundamental explanationDigital image processing fundamental explanation
Digital image processing fundamental explanationTirusew1
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and RepresentationAmnaakhaan
 
ECCV2010: feature learning for image classification, part 2
ECCV2010: feature learning for image classification, part 2ECCV2010: feature learning for image classification, part 2
ECCV2010: feature learning for image classification, part 2zukun
 
Lesson_8_DeepLearning.pdf
Lesson_8_DeepLearning.pdfLesson_8_DeepLearning.pdf
Lesson_8_DeepLearning.pdfssuser7f0b19
 
IJIRMF202012032.pdf
IJIRMF202012032.pdfIJIRMF202012032.pdf
IJIRMF202012032.pdfVaideshSiva1
 
Image processing 1-lectures
Image processing  1-lecturesImage processing  1-lectures
Image processing 1-lecturesTaymoor Nazmy
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slidesBHAGYAPRASADBUGGE
 
chap2.ppt is the presentation of image of eye.
chap2.ppt is the presentation of image of eye.chap2.ppt is the presentation of image of eye.
chap2.ppt is the presentation of image of eye.YogeshRotela
 
20230213_ComputerVision_연구.pptx
20230213_ComputerVision_연구.pptx20230213_ComputerVision_연구.pptx
20230213_ComputerVision_연구.pptxssuser7807522
 

Similar to Introduction to Image Processing (20)

Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Image denoising with unknown Non-Periodic Noises
Image denoising with unknown Non-Periodic NoisesImage denoising with unknown Non-Periodic Noises
Image denoising with unknown Non-Periodic Noises
 
raster algorithm.pdf
raster algorithm.pdfraster algorithm.pdf
raster algorithm.pdf
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)
 
Image Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom ConceptsImage Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom Concepts
 
quantization and sampling presentation ppt
quantization and sampling presentation pptquantization and sampling presentation ppt
quantization and sampling presentation ppt
 
Learning a nonlinear embedding by preserving class neibourhood structure 최종
Learning a nonlinear embedding by preserving class neibourhood structure   최종Learning a nonlinear embedding by preserving class neibourhood structure   최종
Learning a nonlinear embedding by preserving class neibourhood structure 최종
 
Digital image processing fundamental explanation
Digital image processing fundamental explanationDigital image processing fundamental explanation
Digital image processing fundamental explanation
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
 
Lecture-11.pdf
Lecture-11.pdfLecture-11.pdf
Lecture-11.pdf
 
ECCV2010: feature learning for image classification, part 2
ECCV2010: feature learning for image classification, part 2ECCV2010: feature learning for image classification, part 2
ECCV2010: feature learning for image classification, part 2
 
Image Processing
Image ProcessingImage Processing
Image Processing
 
Lesson_8_DeepLearning.pdf
Lesson_8_DeepLearning.pdfLesson_8_DeepLearning.pdf
Lesson_8_DeepLearning.pdf
 
IJIRMF202012032.pdf
IJIRMF202012032.pdfIJIRMF202012032.pdf
IJIRMF202012032.pdf
 
Image processing 1-lectures
Image processing  1-lecturesImage processing  1-lectures
Image processing 1-lectures
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
 
chap2.ppt is the presentation of image of eye.
chap2.ppt is the presentation of image of eye.chap2.ppt is the presentation of image of eye.
chap2.ppt is the presentation of image of eye.
 
Histogram processing
Histogram processingHistogram processing
Histogram processing
 
20230213_ComputerVision_연구.pptx
20230213_ComputerVision_연구.pptx20230213_ComputerVision_연구.pptx
20230213_ComputerVision_연구.pptx
 
03raster 1
03raster 103raster 1
03raster 1
 

Recently uploaded

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 

Recently uploaded (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 

Introduction to Image Processing

  • 4. What is an Image? Discrete representation of data possessing both spatial(layout) and intensity (color) information.
  • 5. What is a digital image? Representation of a two-dimensional image using a finite number of points usually called picture elements or pixels.
  • 6. I (M,N) I (0,N)I (0,0) I (M,0) Image pixel location at (m,n) denoted I(m,n)
  • 7. Image Color RGB : Red, Green, Blue HSV : Hue, Saturation, Value (Intensity) Greyscale Black (min) White (max) Black/white
  • 8. Image Resolution and Quantization Size of 2-D grid and data size stored for each individual image pixel.
  • 9. Resolution of image source • Spatial Resolution C X R e.g. 640 x 480, 800 x 600 • Temporal Resolution e.g. 25fps • Bit Resolution e.g. 24 bit
  • 10. Image Formats JPEG Joint Photographic Experts Group Lossy compression GIF Graphics Interchange Format Lossless compression Limited to 8bit color BMP Bit map picture Basic format Lossless compression PNG Portable network graphics Lossless compression TIFF Tagged Image file format Very flexible Compressed/ Uncompressed
  • 11. Image Data Types • Binary Image • Intensity or greyscale Image • RGB or true-color Image • Floating – Point Image
  • 12. Scope of Image Processing
  • 13. Low Level Mid Level High Level Primitive operations e.g. noise reduction Extraction of attributes e.g. edges and contours Anlysis and interpretation
  • 14. Example of some image processing operations.
  • 17. 3. De-blurring Blur image De-blurred image
  • 18. 4. Blurring original image blurred image
  • 19. 4. Edge Extraction original image After edge extraction
  • 20. 5. Binarization original image After binarization
  • 21. 7. Contrast Enhancement original image After contrast enhancement
  • 22. 6. Object Segmentation and Labeling
  • 24. Image Topology Investigation of fundamental image properties using morphological operators Neighborhood Pixels surrounding a given pixel Adjacency Two pixels p and q are 4-adjacent if they are 4-neighbors of each other and 8-adjacent if they are 8-neighbors of one another. Paths A 4-path between two pixels p and q is a sequence of pixels starting with p and ending with q such that each pixel in the sequence is 4-adjacent to its predecessor in the sequence.
  • 25. Components A set of pixels connected to each other Connectivity Existence path between two pixels
  • 26. Overview of machine vision systems
  • 30. Image =PSF * Object function+ Noise S = p * o + n Convolution -The way information on the object function is spread . -Characteristic of imaging device The way light is reflected from object to imaging instrument Unwanted external disturbances
  • 31. Object Plane (scene Object Function) Point source Of lightImaging System Area of influence in image from Ingle point light source defined by PSF Input Distribution (o) Imaging System PSF(o) + n Output Distribution (o) Overview of image formation system
  • 33. SYSTEM S S(I) = O Input Distribution I Output Distribution O
  • 34.
  • 35. SYSTEM S S(I) = O Input Distribution I Output Distribution O
  • 36. Linear imaging systems 𝑆 𝑎𝑋 + 𝑏𝑌 = 𝑎𝑆 𝑋 + 𝑏𝑆{𝑌}
  • 37.
  • 38. 𝑔 𝑥, 𝑦 = 𝑓 𝑥′ , 𝑦′ ℎ 𝑥, 𝑦; 𝑥′ , 𝑦′ 𝑑𝑥′ 𝑑𝑦′ʃʃ Linear superposition integral
  • 39. The Dirac delta or impulse function • Represents a bright intensity source • Occupies infinitesimal region in space
  • 40. 𝑟𝑒𝑐𝑡 𝑥 𝑎 = 1 𝑥 < 𝑎/2 1-D rectangle function : =0 otherwise lim 𝑎→0 1 𝑎 𝑟𝑒𝑐𝑡 𝑥 𝑎 lim 𝑎→0 1 𝑎 𝑟𝑒𝑐𝑡 𝑥 𝑎 𝑟𝑒𝑐𝑡 𝑦 𝑎 1-D 2-D δ 𝑥 = δ 𝑥, 𝑦 =
  • 41. δ 𝑥 = ∞ 𝑥 = 0 = 0 𝑥 ≠ 0 ∞ ∞ δ 𝑥 𝑑𝑥 = 1 δ 𝑥 − 𝑥0 = ∞ 𝑥 = 𝑥0 = 0 𝑥 ≠ 𝑥0 ∞ ∞ δ 𝑥, 𝑦 𝑑𝑥𝑑𝑦 = 1 δ 𝑥, 𝑦 = ∞ 𝑥 = 0, 𝑦 = 0 = 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
  • 42. The Sifting theorem ∞ ∞ 𝒇(𝒙)𝜹 𝒙 − 𝒙 𝟎 𝒅𝒙 = 𝒇(𝒙 𝟎) ∞ ∞ 𝒇(𝒙, 𝒚)𝜹 𝒙 − 𝒙 𝟎, 𝒚 − 𝒚 𝟎 𝒅𝒙𝒅𝒚 = 𝒇(𝒙 𝟎, 𝒚 𝟎) 1-D 2-D
  • 43. Properties of the delta function • 𝑺𝒊𝒏𝒈𝒖𝒍𝒂𝒓𝒊𝒕𝒚 δ 𝑥 = ∞ 𝑥 = 0 = 0 𝑥 ≠ 0 • 𝑼𝒏𝒊𝒕 𝒂𝒓𝒆𝒂 ∞ ∞ δ 𝑥 𝑑𝑥 = 1 • 𝑺𝒉𝒊𝒇𝒕 𝒑𝒓𝒐𝒑𝒆𝒓𝒕𝒚 ∞ ∞ 𝒇(𝒙)𝜹 𝒙 − 𝒙 𝟎 𝒅𝒙 = 𝒇(𝒙 𝟎)
  • 44. The Point – Spread Function (PSF)
  • 45. 𝐓𝐡𝐞 𝐫𝐞𝐬𝐩𝐨𝐧𝐬𝐞 𝐨𝐟 𝐚 𝐬𝐲𝐬𝐭𝐞𝐦 𝐭𝐨 an input distribution consisting of a very small intensity point.
  • 46. 𝒇 𝒙′ , 𝒚′ = 𝜹(𝒙′ − 𝒙 𝟎, 𝒚′ − 𝒚 𝟎)Input function : 𝒈(𝒙, 𝒚) = 𝜹 𝒙′ − 𝒙 𝟎, 𝒚′ − 𝒚 𝟎 𝒉 𝒙, 𝒚; 𝒙′ , 𝒚′ 𝒅𝒙′𝒅𝒚′ ( Dirac delta function ) ( Linear superposition integral) 𝒈 𝒙, 𝒚 = 𝒉(𝒙, 𝒚; 𝒙 𝟎, 𝒚 𝟎)
  • 50. 𝑋 𝑜𝑝𝑛 𝑌 = 𝑍 𝑜𝑝𝑛 ∶ (+, −, 𝑋,/) 𝑋 ∶ 2𝐷 𝑎𝑟𝑟𝑎𝑦 𝑌 ∶ 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 2𝐷 𝑎𝑟𝑟𝑎𝑦
  • 51. 𝐴𝑑𝑑𝑖𝑛𝑔 𝑡𝑜 𝑖𝑚𝑎𝑔𝑒𝑠 𝐹𝑖𝑟𝑠𝑡 𝑖𝑚𝑎𝑔𝑒 𝑆𝑒𝑐𝑜𝑛𝑑 𝑖𝑚𝑎𝑔𝑒 𝑅𝑒𝑠𝑢𝑙𝑡
  • 52. 𝑁𝑜𝑟𝑚𝑎𝑙𝑖𝑧𝑎𝑡𝑖𝑜𝑛 𝑔 = 𝐿 𝑚𝑎𝑥 𝑓 𝑚𝑎𝑥 − 𝑓𝑚𝑖𝑛 (𝑓 − 𝑓𝑚𝑖𝑛) 𝑓 ∶ 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑝𝑖𝑥𝑒𝑙 𝑖𝑛 𝑤 𝐿 𝑚𝑎𝑥: 𝑚𝑎𝑥𝑖𝑚𝑢𝑚 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑖𝑛𝑡𝑒𝑛𝑠𝑖𝑡𝑦 𝑔 ∶ 𝑐𝑜𝑟𝑟𝑒𝑠𝑝𝑜𝑛𝑑𝑖𝑛𝑔 𝑝𝑖𝑥𝑒𝑙 𝑖𝑛 𝑍 𝑓 𝑚𝑎𝑥: 𝑚𝑎𝑥𝑖𝑚𝑢𝑚 𝑝𝑖𝑥𝑒𝑙 𝑖𝑛 𝑊 𝑊: 𝑖𝑛𝑡𝑒𝑟𝑚𝑒𝑑𝑖𝑎𝑡𝑒 𝑟𝑒𝑠𝑢𝑙𝑡 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒
  • 54. 200 100 100 0 10 50 50 250 120 100 220 230 45 95 120 205 100 0 300 320 330 45 105 170 255 350 120 213 230 238 0 50 105 175 255 63 255 255 255 45 105 170 255 255 120 𝑋 𝑌 𝑊 + = 𝑁𝑜𝑟𝑚𝑎𝑙𝑖𝑧𝑖𝑛𝑔 45,350 𝑟𝑎𝑛𝑔𝑒 𝑡𝑜 [0,255] 𝑇𝑟𝑢𝑛𝑐𝑎𝑡𝑖𝑛𝑔 𝑎𝑙𝑙 𝑣𝑎𝑙𝑢𝑒𝑠 𝑎𝑏𝑜𝑣𝑒 255 𝑖𝑛 𝑊 = = 𝑍 𝑎 𝑍 𝑏
  • 56. 200 100 100 0 10 50 50 250 120 100 220 230 45 95 120 205 100 0 100 0 0 0 0 0 0 150 120 0 120 130 45 85 70 155 0 0 100 120 130 45 85 70 155 150 120 𝑋 𝑌 𝑍 𝑎 = = = 𝑍 𝑏 𝑍 𝑐 = 𝑋 − 𝑌 = |𝑌 − 𝑋| = 𝑌 − 𝑋 𝑾𝒊𝒕𝒉 𝒕𝒓𝒖𝒏𝒄𝒂𝒕𝒊𝒐𝒏 𝑾𝒊𝒕𝒉 𝒕𝒓𝒖𝒏𝒄𝒂𝒕𝒊𝒐𝒏
  • 58. • Used to perform brightness adjustment • Makes each pixel brighter or darker by multiplying its original value by a scalar factor • Multiplication produces better subjective results than addition.
  • 60. • AND • OR • XOR • NOT • 1 = true = white pixel • 0 = false = black pixel 𝑪𝒐𝒏𝒗𝒆𝒏𝒕𝒊𝒐𝒏𝒔
  • 66. 𝒈 𝒙, 𝒚 = 𝒇 𝒙′ , 𝒚′ 𝒉 𝒙, 𝒚; 𝒙′ , 𝒚′ 𝒅𝒙′ 𝒅𝒚′ʃʃ 128 x 128 1284 = 268.4 million 𝒉 𝒙, 𝒚; 𝒙′, 𝒚′ = 𝒉 𝒙′′, 𝒚′′ = 𝒉(𝒙 − 𝒙′, 𝒚 − 𝒚′)
  • 67. 𝒈(𝒙, 𝒚) = ∞ ∞ 𝒇 𝒙′ , 𝒚′ 𝒉 𝒙 − 𝒙′, 𝒚 − 𝒚′ 𝒅𝒙′𝒅𝒚′ The convolution integral 𝒈 𝒙 = ∞ ∞ 𝒇 𝒙′ 𝒉(𝒙 − 𝒙′) 𝒅𝒙′ 2-D 1-D
  • 68. 𝒈 𝒙, 𝒚 = 𝒇 𝒙, 𝒚 ∗∗ 𝒉(𝒙, 𝒚) 𝒈 𝒙 = 𝒇 𝒙 ∗ 𝒉(𝒙) 2-D 1-D
  • 69. Calculation of a 1-D Convolution Integral
  • 70.
  • 71. 𝒈 𝒙 = 𝒇 𝒙′ 𝒉 𝒙, 𝒙′ 𝒅𝒙′ = 𝒇 𝒙′ δ 𝒙 − 𝒙′ 𝒅𝒙′ = 𝒇(𝒙)ʃ ʃ
  • 72. 𝒈 𝒙 = 𝒇 𝒙′ 𝒉 𝒙, 𝒙′ 𝒅𝒙′ = 𝒇 𝒙′ 𝒉 𝒙 − 𝒙′ 𝒅𝒙′ ʃ ʃ
  • 73. 𝑰 𝒙 = 𝒈 𝒙′ 𝒉𝒅 𝒙, 𝒙′ 𝒅𝒙′ 𝒈 𝒙 = 𝒇 𝒙′ δ 𝒙 − 𝒙′ 𝒅𝒙′where ʃʃ 𝑰 𝒙 = 𝒇 𝒙′ ∗ 𝒉(𝒙, ) 𝒉𝒅 𝒙
  • 74.
  • 75. 𝒉 𝟏(𝒙) 𝒉 𝟐(𝒙) 𝒉 𝒏(𝒙) 𝒇(𝒙) 𝒈(𝒙) 𝐈𝐧𝐩𝐮𝐭 Out𝐩𝐮𝐭 𝐏𝐒𝐅 𝟏 𝐏𝐒𝐅 𝟐 𝐏𝐒𝐅 𝑵 𝒈 𝒙 = 𝒇 𝒙 ∗ 𝒉 𝟏 𝒙 ∗ 𝒉 𝟐 𝒙 … ∗ 𝒉𝒏(𝒙)
  • 76. = = −𝟏𝒙𝟏𝟎 + −𝟏𝒙𝟏𝟏 + −𝟏𝒙𝟖 + −𝟏𝒙𝟒𝟎 + (𝟖𝒙𝟑𝟓) 𝑓𝑖 𝟏−𝒋 𝟗 𝒘 𝒌 𝑰 𝒌(𝒊)= + −𝟏𝒙𝟒𝟐 + −𝟏𝒙𝟑𝟖 + −𝟏𝒙𝟑𝟔 + −𝟏𝒙𝟒𝟔 = 𝟏𝟒
  • 77. 𝑔 𝑗 = ∑𝑓𝑖ℎ𝑗 𝑖 𝑔𝑘𝑙 = ∑∑𝑓𝑖𝑗ℎ 𝑘 𝑖, 𝑙 𝑗𝑗 𝑖 𝑖
  • 80. Pixel : Picture element
  • 83. An image histogram is a plot of the relative frequency of occurrence of each of the permitted pixel values in the image against the values themselves. A discrete probability density function which defines the likelihood of a given pixel value occurring within the image.
  • 84. Range of values within the image (0–255 for 8-bit grayscale) Number of times each value actually occurs within the particular image
  • 85. Gray-scale value : ( 0 -255) initialize all histogram array entries to 0 for each pixel I(i, j) within the image I histogram(I(i,j)) = histogram(I(i,j)) + 1 end
  • 86. • Basic contrast present in the image • Potential differences in the color distribution of the image foreground and background scene components. Histogram
  • 87. A histogram uses a bar graph to profile the occurrences of each gray level present in an image Histogram of a simple gray scale image
  • 89. Histogram of a poorly scanned image
  • 91. Histogram of a more complex scene
  • 93. Image with poor contrast
  • 94. Equalization causes a histogram with bins (vertical lines)grouped closely together to “spread out” into a flat or equalized histogram.
  • 95. Image with poor contrast
  • 96. 𝑏 𝑥, 𝑦 = 𝑓[𝑐(𝑥, 𝑦)] 𝑝1 𝑎 = 1 𝐴𝑟𝑒𝑎1 𝐻1 𝑎 C : image with poor histogram b : new image with improved histogram f : transformation function p1(a) : probability of finding a pixel with the value “a” in the image Area1 : area or number of pixels in the image H1(a): histogram of the image
  • 97. Image with poor contrast Equalized image
  • 98.
  • 99. Histogram of a more complex scene Histogram for threshold selection
  • 101. • Different threshold at each pixel location .
  • 102. 𝑡 = 𝑚𝑒𝑎𝑛 + 𝐶 𝑡 = 𝑚𝑒𝑑𝑖𝑎𝑛 + 𝐶 𝑓𝑙𝑜𝑜𝑟 𝑚𝑎𝑥 − 𝑚𝑖𝑛 2 + 𝐶
  • 104. Enhancement by filtering Spatial domain filtering Filtering on the actual pixel rather than in the frequency domain
  • 105. Image Filters Linear Filters Non Linear Filters
  • 106. Connectivity Deciding which pixels are connected to each other E.g. 4 – connectivity : N, W, E, S 8 – connectivity : N, NW, W, NE, SE, E, SW, S
  • 107. NW N NE W (i,j) E SW S SE 3 X 3 neighborhood centered at this point
  • 108. The Filter Kernel • Also known as the mask
  • 109. = = −𝟏𝒙𝟏𝟎 + −𝟏𝒙𝟏𝟏 + −𝟏𝒙𝟖 + −𝟏𝒙𝟒𝟎 + (𝟖𝒙𝟑𝟓) 𝑓𝑖 𝟏−𝒋 𝟗 𝒘 𝒌 𝑰 𝒌(𝒊)= + −𝟏𝒙𝟒𝟐 + −𝟏𝒙𝟑𝟖 + −𝟏𝒙𝟑𝟔 + −𝟏𝒙𝟒𝟔 = 𝟏𝟒 Filtering with an N X N = 3X3 kernel
  • 110. Row and Column Indices 𝒊=𝑰𝒎𝒊𝒏 𝑰 𝒎𝒂𝒙 . 𝒋=𝑱𝒎𝒊𝒏 𝒋 𝒎𝒂𝒙 𝒘 𝒊, 𝒋 𝑰(𝒙 + 𝒊, 𝒚 + 𝒋)𝒇 𝒙, 𝒚 = 𝒊 = 𝟎, 𝒋 = 𝟎 ∶ 𝒄𝒆𝒏𝒕𝒆𝒓 𝒑𝒊𝒙𝒆𝒍 𝒐𝒇 𝒕𝒉𝒆 𝒌𝒆𝒓𝒏𝒆𝒍) (𝑰 𝒎𝒂𝒙 − 𝑰𝒎𝒊𝒏 + 𝟏, 𝑱𝒎𝒂𝒙 − 𝑱𝒎𝒊𝒏 + 𝟏 ): 𝒔𝒊𝒛𝒆 𝒐𝒇 𝒌𝒆𝒓𝒏𝒆𝒍 𝒄𝒆𝒏𝒕𝒆𝒓 𝒑𝒊𝒙𝒆𝒍
  • 111. Linear Indices 𝒌=𝟏 𝑵 𝒘 𝒌 𝑰 𝒌(𝒊)𝒇𝒊 = 𝑰 𝒌 𝒊 ∶ 𝒏𝒆𝒊𝒈𝒉𝒃𝒐𝒓𝒉𝒐𝒐𝒅 𝒑𝒊𝒙𝒆𝒍 𝒐𝒇 𝒕𝒉𝒆 𝒊𝒕𝒉 𝒊𝒎𝒂𝒈𝒆 𝒑𝒊𝒙𝒆𝒍 𝒌: 𝒂 𝒍𝒊𝒏𝒆𝒂𝒓 𝒊𝒏𝒅𝒆𝒙 𝒓𝒖𝒏𝒏𝒊𝒏𝒈 𝒐𝒗𝒆𝒓 𝒕𝒉𝒆 𝒏𝒆𝒊𝒈𝒉𝒃𝒐𝒓𝒉𝒐𝒐𝒅
  • 112. = = −𝟏𝐱𝟏𝟎 + −𝟏𝐱𝟏𝟏 + −𝟏𝐱𝟖 + −𝟏𝐱𝟒𝟎 + (𝟖𝐱𝟑𝟓) 𝑓𝑖 𝟏−𝒋 𝟗 𝒘 𝒌 𝑰 𝒌(𝒊)= + −𝟏𝐱𝟒𝟐 + −𝟏𝐱𝟑𝟖 + −𝟏𝐱𝟑𝟔 + −𝟏𝐱𝟒𝟔 = 𝟏𝟒 Filtering with an N X N = 3X3 kernel
  • 113. Linear Filtering Steps Define filter kernel Slide kernel over image Multiply pixels under the kernel by weights Copy resulting value to same location in new image
  • 115. Overview of Geometric Operations
  • 116. Rotate Flip Crop Resize • Modify geometry of an image by repositioning pixels
  • 117. Common uses of geometric operations • Correcting geometric distortions • Creating special effects • As part of image registration
  • 119. Mapping and Affine Transformation 𝑓 𝑥, 𝑦 → 𝑔(𝑥′ , 𝑦′) 𝑥′, 𝑦′ = 𝑇(𝑥, 𝑦) Mapping function: 𝑥′ = 𝑇 𝑥(𝑥, 𝑦) 𝑦′ = 𝑇 𝑦(𝑥, 𝑦) 𝑇 𝑥, 𝑇 𝑦 = 𝑝𝑜𝑙𝑦𝑛𝑜𝑚𝑖𝑎𝑙𝑠 𝑖𝑛 𝑥 𝑎𝑛𝑑 𝑦 Where: 𝑥′ = 𝑎0 𝑥 + 𝑎1 𝑦 + 𝑎2 𝑦′ = 𝑏0 𝑥 + 𝑏1 𝑦 + 𝑏2 Affine transformation:
  • 120. 𝑥′ = 𝑎0 𝑥 + 𝑎1 𝑦 + 𝑎2 𝑦′ = 𝑏0 𝑥 + 𝑏1 𝑦 + 𝑏2 𝑥′ 𝑦′ 1 𝑎0 𝑎1 𝑎2 𝑏0 𝑏1 𝑏2 0 0 1 𝑥 𝑦 1 =
  • 121. Summary of Affine Transformation Coefficients
  • 122. (𝑥0, 𝑦0) (𝑥2, 𝑦2) (𝑥1, 𝑦1) (𝑥1, 𝑦′1) (𝑥2, 𝑦′2) (𝑥0, 𝑦′0) 𝐼𝑛𝑝𝑢𝑡 𝑂𝑢𝑡𝑝𝑢𝑡 E.g. : Generate the affine transformation matrix for : - rotation by 30∘ - scaling by a factor 3.5 in both dimensions - translation by[25,15] pixels - Shear by a factor [2,3] Mapping one triangle onto another by an affine transformation.
  • 123. cos 30 ∘ = 0.866 𝑎𝑛𝑑 sin 30 ∘ = −0.500 0.866 −0.500 0 0.500 0.866 0 0 0 1 = 3.5 0 0 0 3.5 0 0 0 1 1 0 0 0 1 0 25 15 1 1 3 0 2 1 0 0 0 1 = = = (a) (b) (c) (d) rotation by 30∘ scaling by a factor 3.5,3.5 translation by[25,15] pixels Shear by a factor [2,3] 𝑎0 𝑎1 𝑎2 𝑏0 𝑏1 𝑏2 0 0 1
  • 125. 𝐼𝑛𝑝𝑢𝑡 𝑖𝑚𝑎𝑔𝑒 𝑓(𝑥, 𝑦) 𝑂𝑢𝑡𝑝𝑢𝑡 𝑖𝑚𝑎𝑔𝑒 g(𝑥, 𝑦)𝐸𝑛ℎ𝑎𝑛𝑐𝑒𝑚𝑒𝑛𝑡 𝐴𝑝𝑝𝑙𝑖𝑐𝑎𝑡𝑖𝑜𝑛 − 𝑠𝑝𝑒𝑐𝑖𝑓𝑖𝑐 𝑓𝑒𝑑𝑏𝑎𝑐𝑘 Image enhancement process
  • 126. Overview of gray-level transformations 𝑔 𝑥, 𝑦 = 𝑇[𝑓 𝑥, 𝑦 ] Spatial transformation : where : 𝑔 𝑥, 𝑦 ∶ 𝑝𝑟𝑜𝑐𝑒𝑠𝑠𝑒𝑑 𝑖𝑚𝑎𝑔𝑒 𝑓 𝑥, 𝑦 ∶ 𝑜𝑟𝑖𝑔𝑖𝑛𝑎𝑙 𝑖𝑚𝑎𝑔𝑒 𝑇: 𝑜𝑝𝑒𝑟𝑎𝑡𝑜𝑟 𝑜𝑛 𝑓(𝑥, 𝑦) 𝑠 = 𝑇[𝑟] 𝑟 ∶ 𝑜𝑟𝑖𝑔𝑖𝑛𝑎𝑙 𝑔𝑟𝑎𝑦 𝑙𝑒𝑣𝑒𝑙 𝑜𝑓 𝑎 𝑝𝑖𝑥𝑒𝑙 𝑠: 𝑟𝑒𝑠𝑢𝑙𝑡𝑖𝑛𝑔 𝑔𝑟𝑎𝑦 𝑙𝑒𝑣𝑒𝑙 𝑜𝑓 𝑎 𝑝𝑖𝑥𝑒𝑙 where :
  • 127. 𝑠 = 𝑐 . 𝑟 + 𝑏 where : 𝑟: 𝑜𝑟𝑖𝑔𝑖𝑎𝑛 𝑝𝑖𝑥𝑒𝑙 𝑣𝑎𝑙𝑢𝑒 𝑠: 𝑟𝑒𝑠𝑢𝑙𝑡𝑖𝑛𝑔 𝑝𝑖𝑥𝑒𝑙 𝑣𝑎𝑙𝑢𝑒 𝑐: 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝑓𝑜𝑟 𝑐𝑜𝑛𝑡𝑟𝑜𝑙𝑙𝑖𝑛𝑔 𝑡ℎ𝑒 𝑐𝑜𝑛𝑡𝑟𝑎𝑠𝑡 𝑜𝑓 𝑜𝑢𝑡𝑝𝑢𝑡 𝑖𝑚𝑎𝑔𝑒
  • 129. Steps : • Define a reference point in the input image • Perform reference point neighborhood operation in input image • Apply result of operation to the pixel of same coordinates in the output image. • Repeat the process for every pixel in the input image
  • 132. ∑x Neighborhood processing : linear filtering
  • 134. Example : Let : 𝐴 = {0,1,2,3,1,0} 𝐵 = {1,3, −1} Solution 0 x −1 + 0 x 3 + (1 x 1) = 1 𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎 𝑩 − 𝟏 𝟑 𝟏 𝑨 ∗ 𝑩 𝟏 𝐴𝑟𝑟𝑎𝑦 𝐵 𝑚𝑖𝑟𝑟𝑜𝑟𝑒𝑑 𝑎𝑛𝑑 𝑐𝑒𝑛𝑡𝑒𝑟 𝑣𝑎𝑙𝑢𝑒 𝑎𝑙𝑖𝑔𝑛𝑒𝑑 𝑤𝑖𝑡ℎ 1𝑠𝑡 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑎𝑟𝑟𝑎𝑦 𝐴
  • 135. 0 x −1 + 1 x 3 + (2 x 1) = 5 𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎 𝑩 − 𝟏 𝟑 𝟏 𝑨 ∗ 𝑩 𝟏 𝟓 𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑜𝑛𝑒 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
  • 136. 1 x −1 + 2 x 3 + (3 x 1) = 8 𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎 𝑩 − 𝟏 𝟑 𝟏 𝑨 ∗ 𝑩 𝟏 𝟓 𝟖 𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
  • 137. 1 x −1 + 2 x 3 + (3 x 1) = 8 𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎 𝑩 − 𝟏 𝟑 𝟏 𝑨 ∗ 𝑩 𝟏 𝟓 𝟖 𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
  • 138. 2 x −1 + 3 x 3 + (2 x 1) = 9 𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎 𝑩 − 𝟏 𝟑 𝟏 𝑨 ∗ 𝑩 𝟏 𝟓 𝟖 𝟖 𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
  • 139. 3 x −1 + 2 x 3 + (1 x 1) = 4 𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎 𝑩 − 𝟏 𝟑 𝟏 𝑨 ∗ 𝑩 𝟏 𝟓 𝟖 𝟖 𝟒 𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
  • 140. 2 x −1 + 1 x 3 + (0 x 1) = 1 𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎 𝑩 − 𝟏 𝟑 𝟏 𝑨 ∗ 𝑩 𝟏 𝟓 𝟖 𝟖 𝟒 𝟏 𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
  • 141. 1 x −1 + 0 x 3 + 0 x 1 = −1 𝑨 𝟎 𝟏 𝟐 𝟑 𝟐 𝟏 𝟎 𝑩 − 𝟏 𝟑 𝟏 𝑨 ∗ 𝑩 𝟏 𝟓 𝟖 𝟖 𝟒 𝟏 − 𝟏 𝐴𝑟𝑟𝑎𝑦 𝐵 𝑠ℎ𝑖𝑓𝑡𝑒𝑑 𝑎𝑛𝑜𝑡ℎ𝑒𝑟 𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑡𝑜 𝑡ℎ𝑒 𝑟𝑖𝑔ℎ𝑡
  • 142. 𝑨 ∗ 𝑩 = { 𝟏 𝟓 𝟖 𝟖 𝟒 𝟏 − 𝟏} 𝐴 = {0,1,2,3,1,0} 𝐵 = {1,3, −1}
  • 143. 2-D Convolution and Correlation
  • 144. 𝒋=−∞ ∞ 𝒉 𝒋, 𝒌 𝒇(𝒙 − 𝒋, 𝒚 − 𝒌)𝒈 𝒙, 𝒚 = 𝒌=−∞ ∞ . 𝒋=−𝒎 𝟐 𝒎 𝟐 𝒉 𝒋, 𝒌 𝒇(𝒙 − 𝒋, 𝒚 − 𝒌)𝒈 𝒙, 𝒚 = 𝒌=−𝒏 𝟐 𝒏 𝟐 . OR m2 = half of mask’s width n2 = half of mask’s height 𝒎 𝟐 = [𝒎/𝟐] 𝒏 𝟐 = [𝒏/𝟐]
  • 145. 5 8 3 3 2 1 0 9 5 4 2 7 9 7 9 5 2 1 1 8 5 3 7 1 4 6 2 1 9 5 3 0 4 2 1 9 8 0 4 8 4 1 4 9 2 2 3 4 3 7 1 0 8 3 0 6 2 4 0 9 3 8 4 6 𝑨 = 𝑩 = 2 1 0 1 1 −1 0 −1 −2 20 10 2 18 1 −8 14 22 5 29 21 9 21 1 16 15 −9 −3 21 9 1 9 −5 −25 26 23 6 2 7 3 −1 9 −2 −9 10 12 −1 −3 −4 7 −6 1 6 −2 −1 −10 −12 −15 9 4 3 −11 8 −1 −9 −9 2 5 17 9 23 2 −1 −12 𝑨 ∗ 𝑩 = −2x0 + −1𝑥0 + 0x0 + −1x0 + 1x5 + 1x8 + 0x0 + 1x5 + (2x2)
  • 146. 𝒋=−∞ ∞ 𝑨 𝒋 𝑩(𝒙 + 𝒋)𝑨 𝑩 = Correlation 2-D Correlation 𝒋=−∞ ∞ 𝒉 𝒋, 𝒌 𝒇(𝒙 + 𝒋, 𝒚 + 𝒌)𝒈 𝒙, 𝒚 = 𝒌=−∞ ∞ . 𝒋=−𝒎 𝟐 𝒎 𝟐 𝒉 𝒋, 𝒌 𝒇(𝒙 + 𝒋, 𝒚 + 𝒌)𝒈 𝒙, 𝒚 = 𝒌=−𝒏 𝟐 𝒏 𝟐 . m2 = half of mask’s width n2 = half of mask’s height 𝒎 𝟐 = [𝒎/𝟐]
  • 148. • Attenuates high frequency components • Attenuates fine details in image • Preserve coarse details in image and homogeneous areas
  • 149. Mean Filter • Known as neighborhood averaging or spatial smoothing filter.
  • 150. 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1 1 1 1 1 1 1 1 1 𝒉 𝒙, 𝒚 = = 1 9 0.075 0.125 0.075 0.125 0.2 0.125 0.075 0.125 0.075 𝒉 𝒙, 𝒚 = 𝑴𝒐𝒅𝒊𝒇𝒊𝒆𝒅
  • 151. Gaussian Blur Filter (𝑥2 + 𝑦2) 2σ2 𝒉 𝒙, 𝒚 = 𝒆𝒙𝒑 σ = controls the overall shape of the curve 2D Gaussian function (with σ = 3 )
  • 153. • Attenuates low frequency components • Attenuates coarse details in image • Preserve fine details in an image and homogeneous areas
  • 154. Fourier Transform and Frequency Domain processing.
  • 155. 𝑰𝒏𝒑𝒖𝒕 𝒊𝒎𝒂𝒈𝒆 𝑭(𝒖, 𝒗)𝒇(𝒙, 𝒚) 𝑭𝒐𝒖𝒓𝒊𝒆𝒓 𝐭𝐫𝐚𝐧𝐬𝐟𝐨𝐫𝐦 𝑰𝒏𝒗𝒆𝒓𝒔𝒆 𝒇𝒐𝒖𝒓𝒊𝒆𝒓 𝐭𝐫𝐚𝐧𝐬𝐟𝐨𝐫𝐦 𝑭𝒊𝒍𝒕𝒆𝒓′ 𝒔 𝒇𝒓𝒆𝒒𝒖𝒆𝒏𝒄𝒚 𝒓𝒆𝒔𝒑𝒐𝒏𝒔𝒆 ∶ 𝑯(𝒖, 𝒗) 𝑮(𝒖, 𝒗) 𝒈(𝒙, 𝒚) 𝑶𝒖𝒕𝒑𝒖𝒕 𝒊𝒎𝒂𝒈𝒆 𝐗
  • 156. 𝒈 𝒙, 𝒚 = 𝒇 𝒙, 𝒚 ∗ 𝒉(𝒙, 𝒚) 𝑮 𝒖, 𝒗 = 𝑭 𝒖, 𝒗 𝑯(𝒖, 𝒗) 𝑤ℎ𝑒𝑟𝑒 𝐺, 𝐹, 𝑎𝑛𝑑 𝐻 → 𝐹𝑜𝑢𝑟𝑖𝑒𝑟 𝑡𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚 𝑜𝑓 𝑔, 𝑓 𝑎𝑛𝑑 ℎ 𝑟𝑒𝑠𝑝𝑒𝑐𝑡𝑖𝑣𝑒𝑙𝑦
  • 157. Fourier Transform: Transform Operation R Inverse transform 𝑓(𝑥, 𝑦) 𝑇(𝑢, 𝑣) 𝑅[𝑇 𝑢, 𝑣 ] 𝑔(𝑥, 𝑦) 𝑆𝑝𝑎𝑡𝑖𝑎𝑙 𝑑𝑜𝑚𝑎𝑖𝑛 𝑆𝑝𝑎𝑡𝑖𝑎𝑙 𝑑𝑜𝑚𝑎𝑖𝑛 𝑇𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚 𝑑𝑜𝑚𝑎𝑖𝑛
  • 158. 2D Forward Transform: 𝒚=𝟎 𝑵−𝟏 𝒇 𝒙, 𝒚 𝒓(𝒙, 𝒚, 𝒖, 𝒗)𝑻 𝒙, 𝒚 = 𝒙=𝟎 𝑴−𝟏 . 𝑤ℎ𝑒𝑟𝑒 ∶ 𝑢 = 0,1,2, … 𝑀 − 1 𝑣 = 0,1,2, … 𝑁 − 1 𝑡𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝑠 𝑓 𝑥, 𝑦 : 𝑖𝑛𝑝𝑢𝑡 𝑖𝑚𝑎𝑔𝑒 𝑟 𝑥, 𝑦, 𝑢, 𝑣 : 𝑓𝑜𝑟𝑤𝑎𝑟𝑑 𝑡𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛 𝑘𝑒𝑟𝑛𝑒𝑙
  • 159. 2D Inverse Transform ( Recovering original image ) 𝒗=𝟎 𝑵−𝟏 𝑻 𝒖, 𝒗 𝒔(𝒙, 𝒚, 𝒖, 𝒗)𝒇 𝒙, 𝒚 = 𝒖=𝟎 𝑴−𝟏 . 𝑤ℎ𝑒𝑟𝑒 ∶ 𝑥 = 0,1,2, … 𝑀 − 1 𝑦 = 0,1,2, … 𝑁 − 1 𝑠 𝑥, 𝑦, 𝑢, 𝑣 : 𝑖𝑛𝑣𝑒𝑟𝑠𝑒 𝑡𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚 𝑘𝑒𝑟𝑛𝑒𝑙
  • 160. Transform pair: 𝒚=𝟎 𝑵−𝟏 𝒇 𝒙, 𝒚 𝒓(𝒙, 𝒚, 𝒖, 𝒗)𝑻 𝒙, 𝒚 = 𝒙=𝟎 𝑴−𝟏 . 𝒗=𝟎 𝑵−𝟏 𝑻 𝒖, 𝒗 𝒔(𝒙, 𝒚, 𝒖, 𝒗)𝒇 𝒙, 𝒚 = 𝒖=𝟎 𝑴−𝟏 .
  • 161. 𝑜𝑟𝑖𝑔𝑖𝑛𝑎𝑙 𝑖𝑚𝑎𝑔𝑒 𝑎𝑓𝑡𝑒𝑟 𝑎𝑝𝑝𝑙𝑦𝑖𝑛𝑔 𝑙𝑝𝑓
  • 162. Ideal Low-pass Filtering 𝑯 𝟏 𝒖, 𝒗 = 𝑫 𝒖, 𝒗 ≤ 𝑫 𝟎 𝑫 𝒖, 𝒗 > 𝑫 𝟎 0 1 𝑖𝑓 𝑖𝑓 𝑫 𝒖, 𝒗 = 𝑢2 + 𝑣2 𝑤ℎ𝑒𝑟𝑒 ∶ ∶ 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑏𝑡𝑤 𝑎 𝑝𝑜𝑖𝑛𝑡 𝑜𝑓 𝑐𝑜𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠 𝑎𝑛𝑑 𝑡ℎ𝑒 𝑜𝑟𝑖𝑔𝑖𝑛 𝑜𝑓 𝑡ℎ𝑒 2𝑑 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 𝑝𝑙𝑜𝑡
  • 164. 8 𝑝𝑖𝑥𝑒𝑙𝑠 32 𝑝𝑖𝑥𝑒𝑙𝑠16 𝑝𝑖𝑥𝑒𝑙𝑠 64 𝑝𝑖𝑥𝑒𝑙𝑠 128 𝑝𝑖𝑥𝑒𝑙𝑠
  • 166. The bitmap Image Image Header Color Table Image Data Image 54bytes 1028 bytes Image Data BMP
  • 169. Function that acts on elements of a set to produce other elements of the same space. Operator
  • 170. Prewitt Operator • Used to detect vertical and horizontal edges −1 0 1 −1 0 1 −1 0 1 −1 −1 −1 0 0 0 1 1 1 Vertical Edges Horizontal Edges
  • 171. Sobel Operator • Used to detect vertical and horizontal edges −1 0 1 −2 0 2 −1 0 1 −1 −2 −1 0 0 0 1 2 1 Vertical Edges Horizontal Edges
  • 172. Kirsch Operator • Also known as direction masks +𝟓 +𝟓 +𝟓 −𝟑 𝟎 −𝟑 −𝟑 −𝟑 −𝟑 N • Edge detects in 8 compass directions +𝟓 +𝟓 −𝟑 +𝟓 𝟎 −𝟑 −𝟑 −𝟑 −𝟑 +𝟓 −𝟑 −𝟑 +𝟓 𝟎 −𝟑 +𝟓 −𝟑 −𝟑 −𝟑 −𝟑 −𝟑 +𝟓 𝟎 −𝟑 +𝟓 +𝟓 −𝟑 NW W SW −𝟑 −𝟑 +𝟓 −𝟑 𝟎 +𝟓 −𝟑 −𝟑 +𝟓 −𝟑 +𝟓 +𝟓 −𝟑 𝟎 +𝟓 −𝟑 −𝟑 −𝟑 −𝟑 −𝟑 −𝟑 −𝟑 𝟎 −𝟑 +𝟓 +𝟓 +𝟓 −𝟑 −𝟑 +𝟓 −𝟑 𝟎 +𝟓 −𝟑 +𝟓 +𝟓 E NE S SE
  • 173. Robinson Operator • Also known as direction masks −𝟏 𝟎 𝟏 −𝟐 𝟎 𝟐 −𝟏 𝟎 𝟏 N • Edge detects in 8 compass directions 𝟏 𝟐 𝟏 𝟎 𝟎 𝟎 −𝟏 −𝟐 −𝟏 𝟐 𝟏 𝟎 𝟏 𝟎 −𝟏 𝟎 −𝟏 −𝟐 NW W SW E NE S SE 𝟎 𝟏 𝟐 −𝟏 𝟎 𝟏 −𝟐 −𝟏 𝟎 −𝟏 −𝟐 −𝟏 𝟎 𝟎 𝟎 𝟏 𝟐 𝟏 𝟏 𝟎 −𝟏 𝟐 𝟎 −𝟐 𝟏 𝟎 𝟏 𝟎 −𝟏 −𝟐 𝟏 𝟎 −𝟏 𝟐 𝟏 𝟎 −𝟐 −𝟏 𝟎 −𝟏 𝟎 𝟏 𝟎 𝟏 𝟐
  • 174. Laplacian Operator • 2nd order derivative mask 0 −1 0 −1 4 −1 0 −1 0 0 1 0 1 −4 1 0 1 0 Negative Positive
  • 175. GIF
  • 177. BMP
  • 178. The bitmap Image Image Header Color Table Image Data Image 54bytes 1028 bytes Image Data BMP
  • 180.
  • 193.
  • 194.
  • 195.
  • 198. Signal : How one parameter Relates to another