SlideShare a Scribd company logo
The blue and green colors are actually the same
http://blogs.discovermagazine.com/badastronomy/2009/06/24/the-blue-and-the-green/
Previous Lectures
• We’ve now touched on
– Image Formation
• Now we’re moving on to
– Feature Detection and Matching
Edge / Boundary Detection
Many slides from Lana Lazebnik, Steve Seitz, David Forsyth, David Lowe, Fei-Fei Li, and Derek Hoiem
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
Why do we care about edges?
• Extract information,
recognize objects
• Recover geometry and
viewpoint
Vanishing
point
Vanishing
line
Vanishing
point
Vertical vanishing
point
(at infinity)
Origin of Edges
• Edges are caused by a variety of factors
depth discontinuity
surface color discontinuity
illumination discontinuity
surface normal discontinuity
Source: Steve Seitz
Closeup of edges
Source: D. Hoiem
Closeup of edges
Source: D. Hoiem
Closeup of edges
Source: D. Hoiem
Closeup of edges
Source: D. Hoiem
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
Intensity profile
Source: D. Hoiem
With a little Gaussian noise
Gradient
Source: D. Hoiem
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
• 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 can we do about it?
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
* [1 -1] =
• 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 a good edge detector:
– Good detection: the optimal detector should find all
real edges, ignoring noise or other artifacts
– Good localization
• the edges detected must be as close as possible to
the true edges
• the detector must return one point only for each
true edge point
• Cues of edge detection
– Differences in color, intensity, or texture across the
boundary
– Continuity and closure
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
Stages of Canny Algorithm
–Noise reduction
–Finding the intensity gradient of the image
–Non-maximum suppression
–Tracing edges through the image and
hysteresis thresholding
Example
original image (Lena)
Derivative of Gaussian filter
x-direction y-direction
The Canny edge detector is susceptible to noise present in raw unprocessed
image data, it uses a filter based on a Gaussian (bell) curve, where the raw
image is convolved with a Gaussian filter. The result is a slightly blurred version
of the original which is not affected by a single noisy pixel to any significant
degree.
Compute Gradients (DoG)
X-Derivative of Gaussian Y-Derivative of Gaussian Gradient Magnitude
An edge in an image may point in a variety of directions, so the Canny algorithm
uses filters to detect horizontal, vertical and diagonal edges in the blurred image.
The edge detection operator (Roberts, Prewitt, Sobel for example) returns a value
for the first derivative in the horizontal direction (Gx) and the vertical direction (Gy).
From this the edge gradient and direction can be determined.
Get Orientation at Each Pixel
• Threshold at minimum level
• Get orientation
theta = atan2(gy, gx)
The edge direction angle is
rounded to one of four angles
representing vertical,
horizontal and the two
diagonals (0, 45, 90 and 135
degrees for example).
Non-maximum suppression for each
orientation
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
Non-maximum suppression is an edge thinning technique.
Given estimates of the image gradients, a search is carried out to determine if the
gradient magnitude assumes a local maximum in the gradient direction.
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
Sidebar: Interpolation options
• imx2 = imresize(im, 2, interpolation_type)
• ‘nearest’
– Copy value from nearest known
– Very fast but creates blocky edges
• ‘bilinear’
– Weighted average from four nearest known
pixels
– Fast and reasonable results
• ‘bicubic’ (default)
– Non-linear smoothing over larger area (4x4)
– Slower, visually appealing, may create
negative pixel values
Examples from http://en.wikipedia.org/wiki/Bicubic_interpolation
Before Non-max Suppression
After non-max suppression
Hysteresis thresholding
• Threshold at low/high
levels to get weak/strong
edge pixels
• Do connected
components, starting
from strong edge pixels
Large intensity gradients are more likely to correspond to edges than small
intensity gradients. It is in most cases impossible to specify a threshold at which a
given intensity gradient switches from corresponding to an edge into not doing so.
Therefore Canny uses thresholding with hysteresis.
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
Final Canny Edges
Canny edge detector
1. Filter image with x, y derivatives of Gaussian
2. Find magnitude and orientation of gradient
3. Non-maximum suppression:
– Thin multi-pixel wide “ridges” down to single pixel width
4. Thresholding and linking (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
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
Where do humans see boundaries?
• Berkeley segmentation database:
http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/segbench/
image human segmentation gradient magnitude
pB boundary detector
Figure from Fowlkes
Martin, Fowlkes, Malik 2004: Learning to Detect
Natural Boundaries…
http://www.eecs.berkeley.edu/Research/Projects/C
S/vision/grouping/papers/mfm-pami-boundary.pdf
pB Boundary Detector
Figure from Fowlkes
Brightness
Color
Texture
Combined
Human
Results
Human (0.95)
Pb (0.88)
Results
Human
Pb
Human (0.96)
Global Pb
Pb (0.88)
Human (0.95)
Pb (0.63)
Human (0.90)
Pb (0.35)
For more:
http://www.eecs.berkeley.edu/Research/Projects
/CS/vision/bsds/bench/html/108082-color.html
45 years of boundary detection
Source: Arbelaez, Maire, Fowlkes, and Malik. TPAMI 2011 (pdf)
State of edge detection
• Local edge detection works well
– But many false positives from illumination and
texture edges
• Some methods to take into account longer
contours, but could probably do better
• Few methods that actually “learn” from data
• Poor use of object and high-level information
Style and abstraction in portrait sketching,
Berger et al. SIGGRAPH 2013
• Learn from artist’s strokes so that edges are
more likely in certain parts of the face.

More Related Content

Similar to Feature Detection and Matching

cv1.ppt
cv1.pptcv1.ppt
cv1.ppt
sachin397946
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
asodariyabhavesh
 
Edge Detection
Edge Detection Edge Detection
Edge Detection
Jakir Hossain
 
Canny Edge Detection
Canny Edge DetectionCanny Edge Detection
Canny Edge Detection
SN Chakraborty
 
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
Prasad Thakur
 
Lec05 filter
Lec05 filterLec05 filter
Lec05 filter
BaliThorat1
 
Real time Canny edge detection
Real time Canny edge detectionReal time Canny edge detection
Real time Canny edge detection
Shashank Kapoor
 
Recognition
RecognitionRecognition
Recognition
Neelam Soni
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
A B Shinde
 
06 image features
06 image features06 image features
06 image features
ankit_ppt
 
Denoising and Edge Detection Using Sobelmethod
Denoising and Edge Detection Using SobelmethodDenoising and Edge Detection Using Sobelmethod
Denoising and Edge Detection Using Sobelmethod
IJMER
 
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
cihantopal2
 
Erik Bernhardsson, CTO, Better Mortgage
Erik Bernhardsson, CTO, Better MortgageErik Bernhardsson, CTO, Better Mortgage
Erik Bernhardsson, CTO, Better Mortgage
MLconf
 
Edge Detection Using Fuzzy Logic
Edge Detection Using Fuzzy LogicEdge Detection Using Fuzzy Logic
Edge Detection Using Fuzzy Logic
IJERA Editor
 
Lecture 06: Features
Lecture 06: FeaturesLecture 06: Features
Lecture 06: Features
University of Colorado at Boulder
 
Introduction to Binocular Stereo in Computer Vision
Introduction to Binocular Stereo in Computer VisionIntroduction to Binocular Stereo in Computer Vision
Introduction to Binocular Stereo in Computer Vision
othersk46
 
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
Bhushan Deore
 
image-processing-husseina-ozigi-otaru.ppt
image-processing-husseina-ozigi-otaru.pptimage-processing-husseina-ozigi-otaru.ppt
image-processing-husseina-ozigi-otaru.ppt
RaviSharma65345
 
16 17 bag_words
16 17 bag_words16 17 bag_words
16 17 bag_words
khawarbashir
 
X-Ray Image Acquisition and Analysis
X-Ray Image Acquisition and AnalysisX-Ray Image Acquisition and Analysis
X-Ray Image Acquisition and Analysis
IJREST
 

Similar to Feature Detection and Matching (20)

cv1.ppt
cv1.pptcv1.ppt
cv1.ppt
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Edge Detection
Edge Detection Edge Detection
Edge Detection
 
Canny Edge Detection
Canny Edge DetectionCanny Edge Detection
Canny Edge Detection
 
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
 
Lec05 filter
Lec05 filterLec05 filter
Lec05 filter
 
Real time Canny edge detection
Real time Canny edge detectionReal time Canny edge detection
Real time Canny edge detection
 
Recognition
RecognitionRecognition
Recognition
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
 
06 image features
06 image features06 image features
06 image features
 
Denoising and Edge Detection Using Sobelmethod
Denoising and Edge Detection Using SobelmethodDenoising and Edge Detection Using Sobelmethod
Denoising and Edge Detection Using Sobelmethod
 
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
 
Erik Bernhardsson, CTO, Better Mortgage
Erik Bernhardsson, CTO, Better MortgageErik Bernhardsson, CTO, Better Mortgage
Erik Bernhardsson, CTO, Better Mortgage
 
Edge Detection Using Fuzzy Logic
Edge Detection Using Fuzzy LogicEdge Detection Using Fuzzy Logic
Edge Detection Using Fuzzy Logic
 
Lecture 06: Features
Lecture 06: FeaturesLecture 06: Features
Lecture 06: Features
 
Introduction to Binocular Stereo in Computer Vision
Introduction to Binocular Stereo in Computer VisionIntroduction to Binocular Stereo in Computer Vision
Introduction to Binocular Stereo in Computer Vision
 
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
 
image-processing-husseina-ozigi-otaru.ppt
image-processing-husseina-ozigi-otaru.pptimage-processing-husseina-ozigi-otaru.ppt
image-processing-husseina-ozigi-otaru.ppt
 
16 17 bag_words
16 17 bag_words16 17 bag_words
16 17 bag_words
 
X-Ray Image Acquisition and Analysis
X-Ray Image Acquisition and AnalysisX-Ray Image Acquisition and Analysis
X-Ray Image Acquisition and Analysis
 

Recently uploaded

Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 

Recently uploaded (20)

Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 

Feature Detection and Matching

  • 1. The blue and green colors are actually the same
  • 3. Previous Lectures • We’ve now touched on – Image Formation • Now we’re moving on to – Feature Detection and Matching
  • 4. Edge / Boundary Detection Many slides from Lana Lazebnik, Steve Seitz, David Forsyth, David Lowe, Fei-Fei Li, and Derek Hoiem
  • 5. 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
  • 6. Why do we care about edges? • Extract information, recognize objects • Recover geometry and viewpoint Vanishing point Vanishing line Vanishing point Vertical vanishing point (at infinity)
  • 7. Origin of Edges • Edges are caused by a variety of factors depth discontinuity surface color discontinuity illumination discontinuity surface normal discontinuity Source: Steve Seitz
  • 12. 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
  • 14. With a little Gaussian noise Gradient Source: D. Hoiem
  • 15. 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
  • 16. Effects of noise • 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 can we do about it? Source: D. Forsyth
  • 17. 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
  • 18. • 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
  • 19. Derivative of Gaussian filter * [1 -1] =
  • 20. • 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
  • 21. • 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
  • 22. Designing an edge detector • Criteria for a good edge detector: – Good detection: the optimal detector should find all real edges, ignoring noise or other artifacts – Good localization • the edges detected must be as close as possible to the true edges • the detector must return one point only for each true edge point • Cues of edge detection – Differences in color, intensity, or texture across the boundary – Continuity and closure Source: L. Fei-Fei
  • 23. 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
  • 24. Stages of Canny Algorithm –Noise reduction –Finding the intensity gradient of the image –Non-maximum suppression –Tracing edges through the image and hysteresis thresholding
  • 26. Derivative of Gaussian filter x-direction y-direction The Canny edge detector is susceptible to noise present in raw unprocessed image data, it uses a filter based on a Gaussian (bell) curve, where the raw image is convolved with a Gaussian filter. The result is a slightly blurred version of the original which is not affected by a single noisy pixel to any significant degree.
  • 27. Compute Gradients (DoG) X-Derivative of Gaussian Y-Derivative of Gaussian Gradient Magnitude An edge in an image may point in a variety of directions, so the Canny algorithm uses filters to detect horizontal, vertical and diagonal edges in the blurred image. The edge detection operator (Roberts, Prewitt, Sobel for example) returns a value for the first derivative in the horizontal direction (Gx) and the vertical direction (Gy). From this the edge gradient and direction can be determined.
  • 28. Get Orientation at Each Pixel • Threshold at minimum level • Get orientation theta = atan2(gy, gx) The edge direction angle is rounded to one of four angles representing vertical, horizontal and the two diagonals (0, 45, 90 and 135 degrees for example).
  • 29. Non-maximum suppression for each orientation 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 Non-maximum suppression is an edge thinning technique. Given estimates of the image gradients, a search is carried out to determine if the gradient magnitude assumes a local maximum in the gradient direction.
  • 30. 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
  • 31. Sidebar: Interpolation options • imx2 = imresize(im, 2, interpolation_type) • ‘nearest’ – Copy value from nearest known – Very fast but creates blocky edges • ‘bilinear’ – Weighted average from four nearest known pixels – Fast and reasonable results • ‘bicubic’ (default) – Non-linear smoothing over larger area (4x4) – Slower, visually appealing, may create negative pixel values Examples from http://en.wikipedia.org/wiki/Bicubic_interpolation
  • 34. Hysteresis thresholding • Threshold at low/high levels to get weak/strong edge pixels • Do connected components, starting from strong edge pixels Large intensity gradients are more likely to correspond to edges than small intensity gradients. It is in most cases impossible to specify a threshold at which a given intensity gradient switches from corresponding to an edge into not doing so. Therefore Canny uses thresholding with hysteresis.
  • 35. 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
  • 37. Canny edge detector 1. Filter image with x, y derivatives of Gaussian 2. Find magnitude and orientation of gradient 3. Non-maximum suppression: – Thin multi-pixel wide “ridges” down to single pixel width 4. Thresholding and linking (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
  • 38. 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
  • 39. Where do humans see boundaries? • Berkeley segmentation database: http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/segbench/ image human segmentation gradient magnitude
  • 40. pB boundary detector Figure from Fowlkes Martin, Fowlkes, Malik 2004: Learning to Detect Natural Boundaries… http://www.eecs.berkeley.edu/Research/Projects/C S/vision/grouping/papers/mfm-pami-boundary.pdf
  • 46. Human (0.90) Pb (0.35) For more: http://www.eecs.berkeley.edu/Research/Projects /CS/vision/bsds/bench/html/108082-color.html
  • 47. 45 years of boundary detection Source: Arbelaez, Maire, Fowlkes, and Malik. TPAMI 2011 (pdf)
  • 48. State of edge detection • Local edge detection works well – But many false positives from illumination and texture edges • Some methods to take into account longer contours, but could probably do better • Few methods that actually “learn” from data • Poor use of object and high-level information
  • 49. Style and abstraction in portrait sketching, Berger et al. SIGGRAPH 2013 • Learn from artist’s strokes so that edges are more likely in certain parts of the face.