Edge Detection and Convolution - Lecture 5 - Week 2 Flashcards
What three factors that cause edges to appear in images?
Depth discontinuity
Surface colour discontinuity
Illumination discontinuity
Represented as a rapid change in the image intensity function
In the 1D example what kernel is used to get the first derivative?
0, 0, 0, -1, 1, 0, 0, 0
In the 1D example what kernel is used to get the second derivative?
0, 0, 0, 1, -2, 1, 0, 0, 0
What is the problem with using convolution to get the derivative?
It amplifies noise, which means that the derivative ends up a complete mess
The solution is to smooth first, e.g. with a gaussian kernel
Why is d/dx(If) = I(df/dx)
Because differentiation is a convolution and convolutions are associative
What is the Prewitt kernel?
Detecting in x-direction (vertical edges)
-1 0 1
-1 0 1
-1 0 1
Detecting in y-direction (horizontal edges)
-1 -1 -1
0 0 0
1 1 1
What is the sobel kernel?
Detecting in x-direction (vertical edges)
-1 0 1
-2 0 2
-1 0 1
Detecting in y-direction (horizontal edges)
-1 -2 -1
0 0 0
1 2 1
Apply both filters for I’x and I’y
Edge magnitude |I| = sqrt(I’x^2 + I’y^2) (euclidean distance between pixels)
Edge direction = tan^-1(I’y/I’x)
What detector is the most widely used “simple” edge detector?
Sobel
In what direction does the image gradient point?
The direction of most rapid increase in intensity
How is the edge strength of a pixel calculated?
Using the euclidean distance between its x and y derivative
How can some kernels be made more efficient?
If they are decomposable, say for
-1 0 1
-2 0 2
-1 0 1
Can be decomposed to
1
2 -1 0 1
1
Processing a 1xn then a nx1 kernel is computationally cheaper than an nxn one
Are gaussian kernels decomposable?
Yes
What is gaussian weighting?
Normal distribution
Spread controlled by sigma
G(x,y) = e^-[(x^2+y^2)/2sigma^2]
Is scale important in edge detection?
Edge filters enhance noise, edges exist at many different scales, what scales matter depend on application
Need to incorporate scale into edge detection
Gaussian gives scale & smoothing separable filter
At what point does the gaussian approximate 0
beyond 3sigma