Week 2 - Image Features: Edges Flashcards
Why are Edges important
They are key for image detection
occur at boundaries, shadows, changes in texture or colour erc
Human brain quickly recognises them
What are edges
Boundaries between physically distinct regions
Discontinuities in intensity values
A place of rapid change in the image intensity function
‘Extrema of the derivative’
What is edge location in terms of differentiation
Equivalent to differentiating the intensity function I(x)
dI / dx
What are 2 main techniques for edge detection
Smoothing convolution
Differentiation
What is the difference between using weighted and non weighted kernel averaging
eg 111 and 121
weighted averaging creates better smoothing
What is a simple kernel for finding the 1st and 2nd derivative
In this context, differentiation is a type of convolution
(-1, 0 ,1)
(1, -2, 1)
What are three discontinuities that cause edges
depth
illumination
surface colour
What is the effect if noise of edge detection
It hides the edges as it creates many pixel value changes
Differentiating noise creates a complicated image
How do we remove noise for edge detection
Smooth the image first
Then look for the peaks in d/dx (I * f)
What is the associative property of convolution
the order in which you convolve multiple functions does not change the final result
(f∗g)∗h=f∗(g∗h)
What operations can be performed just via choice of kernel
first derivative
second derivative
smoothing
local average
weighted avergae
What is the Prewitt Kernel
It is two kernels: for detecting vertical or horizontal edges
What is the prewitt kernel in x direction
-1 0 1
-1 0 1
-1 0 1
Detects vertical edges
What is the prewitt kernel in y direction
-1-1-1
000
111
Detects horizontal edges
What is the sobel kernel
Also made up of two kernels
The smoothing is weighted towards the centre
(weighted average along the edge)
What is the sobel in x-direction
-1 0 1
-2 0 2
-1 0 1
Detecting vertical edges
What is the sobel in y-direction
-1-2-1
0 0 0
1 2 1
Detects horizontal edges
What sort of image does the sobel and prewitt operators result in
A transformed grey-level image
Derivate of the image in the _direction
How do you calculate Edge magnitude
|I’| = √ I’x^2 + I’y^2
How do you calculate edge orientation
Φ = tan-1 I’y / I’x
What are gradient images
Grayscale images showing gradient magnitude at each pixel
What is the gradient of the image
Measure of change in image function in the x and y direction
gradient = magnitude
||∇I||= √(dI/dx)^2 + (dI/dy)^2
Gradient direction = tan-1(gradient y/ gradient x)
What are decomposable kernels
eg 3x3 into 3x1 and 1x3
It is cheaper
gets the same result
operations are faster
Eg 21x21 -> 1x21 and 21x1 -> 42 multiplications
instead of 441 at each image point
2n rather than n^2
Why is scale important to edge detection
Edges can vary in size, thickness and be more prominent depending on the scale
Need to incorporate scale into edge detection
Gaussian filter is often to introduce scale information
detection at larger scales is more reliable
Location of edges at coarse scale can direct the search for finer-scale edges
What is the 1D Gaussian
Represents the distribution of values along one dimension
Gaussian weighting schemes are controlled by σ
What is Anti-aliasing
High-frequency details or fine features in an image exceed the resolution (appear blurred)
caused due to undersampling and inadequate representation
What is the canny operator
The first derivative of the Gaussian
- differentiate the smoothing kernel
σ determines the scale (x axis on graph of derivative)
smaller σ, sharper edges, less smoothing
What does the canny operator mean we no longer have to do
- suppress non maxima of derivative (thinning)
- track using hysteresis thresholds
What is suppression of non maxima
aims to reduce the width of detected edges by retaining only the local maxima (or peaks) in the gradient magnitude image along the direction of the gradient (only retains the maxima in the region)
How do you find the peak of thick edges
The second derivative gives a precise localisation, where the crossing of x axis occurs
What is the 2D Laplacian Kernel
Second derivative filter
After convolution, edge positions will be at zero crossing
The sum of all values should be zero - no scaling
Negative centre, positive surround or vice versa
Isotropic response
eg
1 -2 1
-2-4-2
1 -2 1
or
1 1 1
1-81
1 1 1
What is dx notation equal to
d/dx
What does an isotropic filter mean
Gives the same response to edges in any direction
one filter
no edge direction (can be bad to lose this info)
indirect edge magnitude
What is the Laplacian of Gaussian
The second derivative of the 2D Gaussian
Gives a “Mexican hat” (can be up or down)
Also called Marr-Hildretch edge detector
Instead of just Laplacian, we still have orientation and smoothing
does not create thick edges
σ again determines the scale (broader or narrower kernel)
How does size of σ affect gaussian distribution
Larger σ -> broader distribution
Smaller σ -> narrower distribution
How do gaussian filters introduce scale information
Blur image with gaussian with different levels of σ
desired amount of smoothing can be used based off these levels