Computer Vision Section 6-4CS
Computer Vision Section 6-4CS
Section Content:
Boundary treatment
Differential filters (high pass filter)
Distance Metrix
Image transformation (Fourier)
Inverse of Fourier
1. Boundary treatment
1) Ignore Boundary → Move it is as is (No Filter Is Applying for The Boundary Pixel
2) Repetition→ if filter 3*3 repeat one time, 5*5 repeat 2 times and so on
1
3) Reflection → if filter 3*3 reflect one time, 5*5 reflect 2 times and so in
• Corners Detector
2
Example:
Apply the traditional edge detection filter in the following image
10 10 90 90
10 10 90 90
10 10 90 90
10 10 90 90
Answer
F (1,1) = (-5*10) +(8*10) +(-3*90) =-240
F (2,1) = (-3*10) +(8*90) +(-5*90) =240
Moving from -240 to 240 means a edge detected
2) Prewitt Filter
Detect any change respond to x, y, diagonal edge.
3) Sobel Filter
Detect any change respond to x, y, diagonal edge
1
4) Robert
Detect corners
3. Distance Metrix
Functions that measure distance between 2 pixels to get distance
1) Euclidean distance
2) City Blocks
D (p1, p2)= |𝑥1 − 𝑥2 | + |𝑦1 − 𝑦2 |
Example:
Find Fourier transformation for the following tinny image
0 3 0
4 5 2
1 0 3
Answer
M=3, N=3
U=0, v=0
F (0,0) =
2
1
((0+3 𝑒 −2𝜋𝑗(0+0) + 0)+(4
9
−2𝜋𝑗(0+0) −2𝜋𝑗(0+0) −2𝜋𝑗(0+0)
𝑒 +5𝑒 +2𝑒 )+(1𝑒 −2𝜋𝑗(0+0) +0+3𝑒 −2𝜋𝑗(0+0) ) = 2
F (2,2) =
u=2, v =2
2∗1 2∗0
= 19 ((0+3 𝑒
−2𝜋𝑗(
3
+ )
3 +0)+ (4
2∗0 2∗1 2∗1 2∗1 2∗2 2∗1 2∗0 2∗2 2∗2 2∗2
−2𝜋𝑗( + ) −2𝜋𝑗( + ) −2𝜋𝑗( + ) −2𝜋𝑗( + ) −2𝜋𝑗( + )
𝑒 3 3 +5𝑒 3 3 +2𝑒 3 3 )+(1𝑒 3 3 +0+3𝑒 3 3
4 4 8 8 16
= 19 (3 𝑒 −3𝜋𝑗 + 4 𝑒 −3𝜋𝑗 +5𝑒 −3𝜋𝑗 +2𝑒 −4𝜋𝑗 +1𝑒 −3𝜋𝑗 +3𝑒 − 3 𝜋𝑗 )
𝟏
= (-6 + 2√𝟑 j)
𝟗
Example
F (2,6) = 4 +j3