SlideShare a Scribd company logo
1 of 30
Download to read offline
Edge detection
• Goal: Identify sudden
changes (discontinuities) in
an image
• Intuitively, most semantic and shape
information from the image can be
encoded in the edges
• More compact than pixels
• Ideal: artist’s line drawing
(but artist is also using
object-level knowledge)
Source: D. Lowe
Origin of Edges
Edges are caused by a variety of factors
depth discontinuity
surface color discontinuity
illumination discontinuity
surface normal discontinuity
Source: Steve Seitz
Characterizing edges
• An edge is a place of rapid change in the
image intensity function
image
intensity function
(along horizontal scanline) first derivative
edges correspond to
extrema of derivative
The gradient points in the direction of most rapid increase
in intensity
Image gradient
The gradient of an image:
The gradient direction is given by
• how does this relate to the direction of the edge?
The edge strength is given by the gradient magnitude
Source: Steve Seitz
Differentiation and convolution
Recall, for 2D function,
f(x,y):
This is linear and shift
invariant, so must be
the result of a
convolution.
We could approximate
this as
(which is obviously a
convolution)
-1 1
Source: D. Forsyth, D. Lowe
Finite difference filters
Other approximations of derivative filters exist:
Source: K. Grauman
Finite differences: example
Which one is the gradient in the x-direction (resp. y-direction)?
Effects of noise
Consider a single row or column of the image
• Plotting intensity as a function of position gives a signal
Where is the edge?
Source: S. Seitz
Effects of noise
• Finite difference filters respond strongly to
noise
• Image noise results in pixels that look very different from
their neighbors
• Generally, the larger the noise the stronger the response
• What is to be done?
Source: D. Forsyth
Effects of noise
• Finite difference filters respond strongly to
noise
• Image noise results in pixels that look very different from
their neighbors
• Generally, the larger the noise the stronger the response
• What is to be done?
• Smoothing the image should help, by forcing pixels different
to their neighbors (=noise pixels?) to look more like
neighbors
Source: D. Forsyth
Solution: smooth first
• To find edges, look for peaks in )
( g
f
dx
d
∗
f
g
f * g
)
( g
f
dx
d
∗
Source: S. Seitz
• Differentiation is convolution, and convolution
is associative:
• This saves us one operation:
g
dx
d
f
g
f
dx
d
∗
=
∗ )
(
Derivative theorem of convolution
g
dx
d
f ∗
f
g
dx
d
Source: S. Seitz
Derivative of Gaussian filter
Is this filter separable?
* [1 -1] =
Derivative of Gaussian filter
Which one finds horizontal/vertical edges?
x-direction y-direction
Smoothed derivative removes noise, but blurs
edge. Also finds edges at different “scales”.
1 pixel 3 pixels 7 pixels
Tradeoff between smoothing and localization
Source: D. Forsyth
• The gradient magnitude is large along a thick
“trail” or “ridge,” so how do we identify the actual
edge points?
• How do we link the edge points to form curves?
Implementation issues
Source: D. Forsyth
Designing an edge detector
• Criteria for an “optimal” edge detector:
• Good detection: the optimal detector must minimize the
probability of false positives (detecting spurious edges caused by
noise), as well as that of false negatives (missing real edges)
• Good localization: the edges detected must be as close as
possible to the true edges
• Single response: the detector must return one point only for each
true edge point; that is, minimize the number of local maxima
around the true edge
Source: L. Fei-Fei
Canny edge detector
• This is probably the most widely used edge
detector in computer vision
• Theoretical model: step-edges corrupted by
additive Gaussian noise
• Canny has shown that the first derivative of
the Gaussian closely approximates the
operator that optimizes the product of signal-
to-noise ratio and localization
J. Canny, A Computational Approach To Edge Detection, IEEE
Trans. Pattern Analysis and Machine Intelligence, 8:679-714, 1986.
Source: L. Fei-Fei
Canny edge detector
1. Filter image with derivative of Gaussian
2. Find magnitude and orientation of gradient
3. Non-maximum suppression:
• Thin multi-pixel wide “ridges” down to single pixel width
4. Linking and thresholding (hysteresis):
• Define two thresholds: low and high
• Use the high threshold to start edge curves and the low
threshold to continue them
MATLAB: edge(image, ‘canny’)
Source: D. Lowe, L. Fei-Fei
Example
original image (Lena)
Example
norm of the gradient
Example
thresholding
Example
thinning
(non-maximum suppression)
Non-maximum suppression
At q, we have a
maximum if the
value is larger
than those at
both p and at r.
Interpolate to
get these
values.
Source: D. Forsyth
Assume the marked
point is an edge point.
Then we construct the
tangent to the edge
curve (which is normal
to the gradient at that
point) and use this to
predict the next points
(here either r or s).
Edge linking
Source: D. Forsyth
Hysteresis thresholding
Check that maximum value of gradient value is
sufficiently large
• drop-outs? use hysteresis
– use a high threshold to start edge curves and a low threshold to
continue them.
Source: S. Seitz
Hysteresis thresholding
original image
high threshold
(strong edges)
low threshold
(weak edges)
hysteresis threshold
Source: L. Fei-Fei
Effect of σ (Gaussian kernel spread/size)
Canny with Canny with
original
The choice of σ depends on desired behavior
• large σ detects large scale edges
• small σ detects fine features
Source: S. Seitz
Edge detection is just the beginning…
Berkeley segmentation database:
http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/segbench/
image human segmentation gradient magnitude
Next: Corner and blob detection

More Related Content

What's hot

Lec11 single view-converted
Lec11 single view-convertedLec11 single view-converted
Lec11 single view-convertedBaliThorat1
 
Multi-Image Matching
Multi-Image MatchingMulti-Image Matching
Multi-Image MatchingSaad Khalaf
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shadingeshveeen
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptorszukun
 
SURF - Speeded Up Robust Features
SURF - Speeded Up Robust FeaturesSURF - Speeded Up Robust Features
SURF - Speeded Up Robust FeaturesMarta Lopes
 
Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface Bhuvnesh Pratap
 
Michal Erel's SIFT presentation
Michal Erel's SIFT presentationMichal Erel's SIFT presentation
Michal Erel's SIFT presentationwolf
 

What's hot (17)

Lec02 camera
Lec02 cameraLec02 camera
Lec02 camera
 
Lec08 fitting
Lec08 fittingLec08 fitting
Lec08 fitting
 
Lec11 single view-converted
Lec11 single view-convertedLec11 single view-converted
Lec11 single view-converted
 
Lec15 sfm
Lec15 sfmLec15 sfm
Lec15 sfm
 
Multi-Image Matching
Multi-Image MatchingMulti-Image Matching
Multi-Image Matching
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shading
 
Lec12 epipolar
Lec12 epipolarLec12 epipolar
Lec12 epipolar
 
Edges and lines
Edges and linesEdges and lines
Edges and lines
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shading
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
 
Illumination Model
Illumination ModelIllumination Model
Illumination Model
 
GRPHICS06 - Shading
GRPHICS06 - ShadingGRPHICS06 - Shading
GRPHICS06 - Shading
 
SURF - Speeded Up Robust Features
SURF - Speeded Up Robust FeaturesSURF - Speeded Up Robust Features
SURF - Speeded Up Robust Features
 
Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface
 
Michal Erel's SIFT presentation
Michal Erel's SIFT presentationMichal Erel's SIFT presentation
Michal Erel's SIFT presentation
 
Edge detection
Edge detectionEdge detection
Edge detection
 
Canny Edge Detection
Canny Edge DetectionCanny Edge Detection
Canny Edge Detection
 

Similar to Lec06 edge

Feature Detection and Matching
Feature Detection and MatchingFeature Detection and Matching
Feature Detection and Matchingssuser24ddad
 
Computer vision - edge detection
Computer vision - edge detectionComputer vision - edge detection
Computer vision - edge detectionWael Badawy
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and SegmentationA B Shinde
 
Seminar report on edge detection of video using matlab code
Seminar report on edge detection of video using matlab codeSeminar report on edge detection of video using matlab code
Seminar report on edge detection of video using matlab codeBhushan Deore
 
Fuzzy Logic Based Edge Detection
Fuzzy Logic Based Edge DetectionFuzzy Logic Based Edge Detection
Fuzzy Logic Based Edge DetectionDawn Raider Gupta
 
Lecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingLecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingcairo university
 
study Diffusion Curves: A Vector Representation for Smooth-Shaded Images
study Diffusion Curves: A Vector Representation for Smooth-Shaded Imagesstudy Diffusion Curves: A Vector Representation for Smooth-Shaded Images
study Diffusion Curves: A Vector Representation for Smooth-Shaded ImagesChiamin Hsu
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 
image segmentation image segmentation.pptx
image segmentation image segmentation.pptximage segmentation image segmentation.pptx
image segmentation image segmentation.pptxNaveenKumar5162
 
Denoising and Edge Detection Using Sobelmethod
Denoising and Edge Detection Using SobelmethodDenoising and Edge Detection Using Sobelmethod
Denoising and Edge Detection Using SobelmethodIJMER
 
03 cie552 image_filtering_spatial
03 cie552 image_filtering_spatial03 cie552 image_filtering_spatial
03 cie552 image_filtering_spatialElsayed Hemayed
 
SPATIAL POINT PATTERNS
SPATIAL POINT PATTERNSSPATIAL POINT PATTERNS
SPATIAL POINT PATTERNSLiemNguyenDuy
 
Computer Vision harris
Computer Vision harrisComputer Vision harris
Computer Vision harrisWael Badawy
 
06 image features
06 image features06 image features
06 image featuresankit_ppt
 
Exploring Methods to Improve Edge Detection with Canny Algorithm
Exploring Methods to Improve Edge Detection with Canny AlgorithmExploring Methods to Improve Edge Detection with Canny Algorithm
Exploring Methods to Improve Edge Detection with Canny AlgorithmPrasad Thakur
 
Edge Drawing - An Heuristic Approach to Robust Real-Time Edge Detection
Edge Drawing - An Heuristic Approach to Robust Real-Time Edge DetectionEdge Drawing - An Heuristic Approach to Robust Real-Time Edge Detection
Edge Drawing - An Heuristic Approach to Robust Real-Time Edge Detectioncihantopal2
 

Similar to Lec06 edge (20)

Feature Detection and Matching
Feature Detection and MatchingFeature Detection and Matching
Feature Detection and Matching
 
Computer vision - edge detection
Computer vision - edge detectionComputer vision - edge detection
Computer vision - edge detection
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
 
Seminar report on edge detection of video using matlab code
Seminar report on edge detection of video using matlab codeSeminar report on edge detection of video using matlab code
Seminar report on edge detection of video using matlab code
 
Fuzzy Logic Based Edge Detection
Fuzzy Logic Based Edge DetectionFuzzy Logic Based Edge Detection
Fuzzy Logic Based Edge Detection
 
Lecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingLecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matching
 
Diffraction
DiffractionDiffraction
Diffraction
 
study Diffusion Curves: A Vector Representation for Smooth-Shaded Images
study Diffusion Curves: A Vector Representation for Smooth-Shaded Imagesstudy Diffusion Curves: A Vector Representation for Smooth-Shaded Images
study Diffusion Curves: A Vector Representation for Smooth-Shaded Images
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Defocus magnification
Defocus magnificationDefocus magnification
Defocus magnification
 
Filtering.ppt
Filtering.pptFiltering.ppt
Filtering.ppt
 
Edge Detection
Edge Detection Edge Detection
Edge Detection
 
image segmentation image segmentation.pptx
image segmentation image segmentation.pptximage segmentation image segmentation.pptx
image segmentation image segmentation.pptx
 
Denoising and Edge Detection Using Sobelmethod
Denoising and Edge Detection Using SobelmethodDenoising and Edge Detection Using Sobelmethod
Denoising and Edge Detection Using Sobelmethod
 
03 cie552 image_filtering_spatial
03 cie552 image_filtering_spatial03 cie552 image_filtering_spatial
03 cie552 image_filtering_spatial
 
SPATIAL POINT PATTERNS
SPATIAL POINT PATTERNSSPATIAL POINT PATTERNS
SPATIAL POINT PATTERNS
 
Computer Vision harris
Computer Vision harrisComputer Vision harris
Computer Vision harris
 
06 image features
06 image features06 image features
06 image features
 
Exploring Methods to Improve Edge Detection with Canny Algorithm
Exploring Methods to Improve Edge Detection with Canny AlgorithmExploring Methods to Improve Edge Detection with Canny Algorithm
Exploring Methods to Improve Edge Detection with Canny Algorithm
 
Edge Drawing - An Heuristic Approach to Robust Real-Time Edge Detection
Edge Drawing - An Heuristic Approach to Robust Real-Time Edge DetectionEdge Drawing - An Heuristic Approach to Robust Real-Time Edge Detection
Edge Drawing - An Heuristic Approach to Robust Real-Time Edge Detection
 

More from BaliThorat1

8 operating system concept
8 operating system concept8 operating system concept
8 operating system conceptBaliThorat1
 
6 input output devices
6 input output devices6 input output devices
6 input output devicesBaliThorat1
 
2 windows operating system
2 windows operating system2 windows operating system
2 windows operating systemBaliThorat1
 
5 computer memory
5 computer memory5 computer memory
5 computer memoryBaliThorat1
 
4 computer languages
4 computer languages4 computer languages
4 computer languagesBaliThorat1
 
1 fundamentals of computer
1 fundamentals of computer1 fundamentals of computer
1 fundamentals of computerBaliThorat1
 
1 fundamentals of computer system
1 fundamentals of computer system1 fundamentals of computer system
1 fundamentals of computer systemBaliThorat1
 
Computer generation and classification
Computer generation and classificationComputer generation and classification
Computer generation and classificationBaliThorat1
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartBaliThorat1
 
6 cpu scheduling
6 cpu scheduling6 cpu scheduling
6 cpu schedulingBaliThorat1
 
5 process synchronization
5 process synchronization5 process synchronization
5 process synchronizationBaliThorat1
 
1 intro and overview
1 intro and overview1 intro and overview
1 intro and overviewBaliThorat1
 
Lec01 introduction
Lec01 introductionLec01 introduction
Lec01 introductionBaliThorat1
 

More from BaliThorat1 (17)

8 operating system concept
8 operating system concept8 operating system concept
8 operating system concept
 
7 processor
7 processor7 processor
7 processor
 
6 input output devices
6 input output devices6 input output devices
6 input output devices
 
2 windows operating system
2 windows operating system2 windows operating system
2 windows operating system
 
5 computer memory
5 computer memory5 computer memory
5 computer memory
 
4 computer languages
4 computer languages4 computer languages
4 computer languages
 
1 fundamentals of computer
1 fundamentals of computer1 fundamentals of computer
1 fundamentals of computer
 
1 fundamentals of computer system
1 fundamentals of computer system1 fundamentals of computer system
1 fundamentals of computer system
 
Computer generation and classification
Computer generation and classificationComputer generation and classification
Computer generation and classification
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
6 cpu scheduling
6 cpu scheduling6 cpu scheduling
6 cpu scheduling
 
5 process synchronization
5 process synchronization5 process synchronization
5 process synchronization
 
4 threads
4 threads4 threads
4 threads
 
3 processes
3 processes3 processes
3 processes
 
2 os structure
2 os structure2 os structure
2 os structure
 
1 intro and overview
1 intro and overview1 intro and overview
1 intro and overview
 
Lec01 introduction
Lec01 introductionLec01 introduction
Lec01 introduction
 

Recently uploaded

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Recently uploaded (20)

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

Lec06 edge

  • 1. Edge detection • Goal: Identify sudden changes (discontinuities) in an image • Intuitively, most semantic and shape information from the image can be encoded in the edges • More compact than pixels • Ideal: artist’s line drawing (but artist is also using object-level knowledge) Source: D. Lowe
  • 2. Origin of Edges Edges are caused by a variety of factors depth discontinuity surface color discontinuity illumination discontinuity surface normal discontinuity Source: Steve Seitz
  • 3. Characterizing edges • An edge is a place of rapid change in the image intensity function image intensity function (along horizontal scanline) first derivative edges correspond to extrema of derivative
  • 4. The gradient points in the direction of most rapid increase in intensity Image gradient The gradient of an image: The gradient direction is given by • how does this relate to the direction of the edge? The edge strength is given by the gradient magnitude Source: Steve Seitz
  • 5. Differentiation and convolution Recall, for 2D function, f(x,y): This is linear and shift invariant, so must be the result of a convolution. We could approximate this as (which is obviously a convolution) -1 1 Source: D. Forsyth, D. Lowe
  • 6. Finite difference filters Other approximations of derivative filters exist: Source: K. Grauman
  • 7. Finite differences: example Which one is the gradient in the x-direction (resp. y-direction)?
  • 8. Effects of noise Consider a single row or column of the image • Plotting intensity as a function of position gives a signal Where is the edge? Source: S. Seitz
  • 9. Effects of noise • Finite difference filters respond strongly to noise • Image noise results in pixels that look very different from their neighbors • Generally, the larger the noise the stronger the response • What is to be done? Source: D. Forsyth
  • 10. Effects of noise • Finite difference filters respond strongly to noise • Image noise results in pixels that look very different from their neighbors • Generally, the larger the noise the stronger the response • What is to be done? • Smoothing the image should help, by forcing pixels different to their neighbors (=noise pixels?) to look more like neighbors Source: D. Forsyth
  • 11. Solution: smooth first • To find edges, look for peaks in ) ( g f dx d ∗ f g f * g ) ( g f dx d ∗ Source: S. Seitz
  • 12. • Differentiation is convolution, and convolution is associative: • This saves us one operation: g dx d f g f dx d ∗ = ∗ ) ( Derivative theorem of convolution g dx d f ∗ f g dx d Source: S. Seitz
  • 13. Derivative of Gaussian filter Is this filter separable? * [1 -1] =
  • 14. Derivative of Gaussian filter Which one finds horizontal/vertical edges? x-direction y-direction
  • 15. Smoothed derivative removes noise, but blurs edge. Also finds edges at different “scales”. 1 pixel 3 pixels 7 pixels Tradeoff between smoothing and localization Source: D. Forsyth
  • 16. • The gradient magnitude is large along a thick “trail” or “ridge,” so how do we identify the actual edge points? • How do we link the edge points to form curves? Implementation issues Source: D. Forsyth
  • 17. Designing an edge detector • Criteria for an “optimal” edge detector: • Good detection: the optimal detector must minimize the probability of false positives (detecting spurious edges caused by noise), as well as that of false negatives (missing real edges) • Good localization: the edges detected must be as close as possible to the true edges • Single response: the detector must return one point only for each true edge point; that is, minimize the number of local maxima around the true edge Source: L. Fei-Fei
  • 18. Canny edge detector • This is probably the most widely used edge detector in computer vision • Theoretical model: step-edges corrupted by additive Gaussian noise • Canny has shown that the first derivative of the Gaussian closely approximates the operator that optimizes the product of signal- to-noise ratio and localization J. Canny, A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and Machine Intelligence, 8:679-714, 1986. Source: L. Fei-Fei
  • 19. Canny edge detector 1. Filter image with derivative of Gaussian 2. Find magnitude and orientation of gradient 3. Non-maximum suppression: • Thin multi-pixel wide “ridges” down to single pixel width 4. Linking and thresholding (hysteresis): • Define two thresholds: low and high • Use the high threshold to start edge curves and the low threshold to continue them MATLAB: edge(image, ‘canny’) Source: D. Lowe, L. Fei-Fei
  • 24. Non-maximum suppression At q, we have a maximum if the value is larger than those at both p and at r. Interpolate to get these values. Source: D. Forsyth
  • 25. Assume the marked point is an edge point. Then we construct the tangent to the edge curve (which is normal to the gradient at that point) and use this to predict the next points (here either r or s). Edge linking Source: D. Forsyth
  • 26. Hysteresis thresholding Check that maximum value of gradient value is sufficiently large • drop-outs? use hysteresis – use a high threshold to start edge curves and a low threshold to continue them. Source: S. Seitz
  • 27. Hysteresis thresholding original image high threshold (strong edges) low threshold (weak edges) hysteresis threshold Source: L. Fei-Fei
  • 28. Effect of σ (Gaussian kernel spread/size) Canny with Canny with original The choice of σ depends on desired behavior • large σ detects large scale edges • small σ detects fine features Source: S. Seitz
  • 29. Edge detection is just the beginning… Berkeley segmentation database: http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/segbench/ image human segmentation gradient magnitude
  • 30. Next: Corner and blob detection