0% found this document useful (0 votes)
18 views5 pages

Computer Vision Section 6-4CS

This document discusses several concepts in computer vision and image processing including boundary treatment methods, differential filters, distance metrics, and image transformations using the Fourier transform. Boundary treatment methods for images being filtered include ignoring boundaries, repeating edge pixels, or reflecting pixels. Differential filters detect edges and include Laplace, Prewitt, and Sobel filters. Common distance metrics to measure pixel distances include Euclidean, city block, and chessboard distances. The Fourier transform is used to transform images into the frequency domain and allows for enhancement. An example calculation of the Fourier transform of a sample image is provided.

Uploaded by

medo.tarek1122
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views5 pages

Computer Vision Section 6-4CS

This document discusses several concepts in computer vision and image processing including boundary treatment methods, differential filters, distance metrics, and image transformations using the Fourier transform. Boundary treatment methods for images being filtered include ignoring boundaries, repeating edge pixels, or reflecting pixels. Differential filters detect edges and include Laplace, Prewitt, and Sobel filters. Common distance metrics to measure pixel distances include Euclidean, city block, and chessboard distances. The Fourier transform is used to transform images into the frequency domain and allows for enhancement. An example calculation of the Fourier transform of a sample image is provided.

Uploaded by

medo.tarek1122
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Computer vision Section (6)

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

2. Differential filters (High pass filter)


• It’s called Derivative as it produces values only if there is a change
• Note that edges are derivative valued areas as well as corners
• can be computed by using small convolution filters of size 2 x 2 or 3 x 3, such as the
Laplacian, Sobel, Roberts and Prewitt operators
• Derivative filters provide a quantitative measurement for the rate of change in pixel
brightness information present in a digital image
• We use it to determine potential edge
1) Laplace /Traditional/Regular or normal flitter
• (8-neighbor derivative) • (4-neighbor derivative)
Detect any change respond to x, y, Detect perpendicular lines between x & y.
diagonal, and corners edge.

• 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

D(p1, p2) = √(𝑥1 − 𝑥2 )2 + (𝑦, −𝑦2 )2

2) City Blocks
D (p1, p2)= |𝑥1 − 𝑥2 | + |𝑦1 − 𝑦2 |

3) Chess board Distance


D (p1, p2) =MAX (|𝑥1 − 𝑥2 |, |𝑦1 − 𝑦2 |)

4. Transformers in frequency domain


• Fourier transform → enhancement in frequency domain
𝑀−1 𝑁−1
1 𝑈𝑋 𝑉𝑌
−2𝜋𝑗( + )
𝐹(𝑈, 𝑉) = ℱ(𝑓(𝑥, 𝑦)) = ∑ ∑ 𝑓(𝑥, 𝑦)𝑒 𝑁 𝑀
𝑁𝑀
𝑌=0 𝑋=0

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 𝜋𝑗 )

Note: 𝒆−𝝅𝒋𝑿 = cos (𝝅𝑿) - j sin (𝝅𝑿) where 𝝅 = 𝟏𝟖𝟎


1 4 4 8 8 16
= 9 (7(cos (3 𝜋) - j sin (3 𝜋) ) + 6 (cos (3 𝜋) - j sin (3 𝜋) )+ 2 (cos (4𝜋) - j sin (4𝜋) ) + (3(cos ( 3 𝜋) - j sin
16
( 3 𝜋) )

𝟏
= (-6 + 2√𝟑 j)
𝟗

Every element has:

• Magnitude = || e ||= √R2 + I2


• Power element = R2 + I2
I
• Phase element = tan−1 R

Example
F (2,6) = 4 +j3

• Magnitude = || e ||= √R2 + I2 =√42 + 32 =5


• Power element = R2 + I2 = 16+ 9
I 3
• Phase element = tan−1 R = tan−1 4

You might also like