Detecting Edges in Images By Sean Szumlanski Agenda
Detecting Edges in Images By Sean Szumlanski
Agenda • Reasons for detecting edges • Introduction to computer images • Defining the edge • Methodologies for edge detection
Why edge detection? • Segmenting into areas and objects of interest • Psychological processing of images • Tracking moving objects.
Introduction to images • Images as 2 D arrays of numbers • Color images: RGB values • Black & White images: intensity values • Intensity = (R + G + B) / 3
What is an edge? • Heightened rate of change of intensity • High magnitude of gradient
Edge detection process • Get rid of noise: Gaussian Filter • Greater sigma value means smoother image • Convolve image with mask • Non-maximal suppression • Hysteresis thresholding
The Canny operator Gx Gy Gradient Vector: G = <Gx, Gy> Magnitude: |G| = sqrt(Gx 2 + Gy 2)
Example Convert to Grayscale Original Image Intensity
Example: Gx and Gy Grayscale Gx Gy
Example: Magnitude Gx Gy Gradient Magnitude
Non-maximal suppression Gx Gy Edge Candidates (by Gx/Gy ratio)
Hysteresis Thresholding • HIGH value: Magnitude must exceed HIGH to be considered an edge • LOW value: Neighboring magnitudes must exceed LOW to be edge-worthy
Thesholding applied Gradient Magnitude Edge Candidates (by Gx/Gy ratio) Edges
- Slides: 17