Download presentation
Presentation is loading. Please wait.
Published byAllyson Ray Modified over 9 years ago
1
Lecture 10: Lines from Edges, Interest Points, Binary Operations CAP 5415: Computer Vision Fall 2006
2
Clarification Gradient-Based Edge Detector with no hysterisis or non-maximal suppression is also often called a Sobel Edge Detector –Usually you convolve with a specific filter
3
PS2 How I would do it: Problem 2.1 –Write a function minimize that minimizes a function using gradient descent –Input:initial value of w (assume the function to be minimized is a function of w), data necessary for the function (this will be training examples later) –Output: Minimum value of the function and the corresponding w –hard code the function in
4
PS2 How I would do it: Problem 2.1 –Write a function minimize that minimizes a function using gradient descent –Input:initial value of w (assume the function to be minimized is a function of w), data necessary for the function (this will be training examples later) –Output: Minimum value of the function and the corresponding w –Hard code the function in –References: Forsyth and Ponce 22.4
5
PS2 Problem 2.3 –Write a function that takes a single input patch and builds a feature vector –Write a second function that builds a feature matrix out of all the patches in a directory
6
PS2-2.4 Write a function that computes Remember for non-edge examples L=
7
PS2-2.4 Also write a function that computes the gradient Check numerically! Both functions should have three arguments –Weights –Positive Example Matrix –Negative Example Matrix
8
PS2-2.4 Now, go back to minimize and plug these new functions in You'll need to do gradient ascent instead of descent
9
Detecting Corners Corners are often useful feature points for tracking and identification –Often denote unique locations on image Also sometimes referred to as interest- point detectors –Kadir and Brady –Lowe –Harris
10
Harris Corner Detector Step 1: Calculate horizontal and vertical derivatives Step 2: Compute a moment matrix by summing these values over a window Step 3: Analyze the eigenvalues of this matrix (Borrowed from Wikipedia)
11
Harris Corner Detector Or look at this function, which doesn’t require square roots Results from Kovesi’s implementation at http://www.csse.uwa.edu.au/~pk/research/matlabfns/
12
From Edges to Lines We’ve talked about detecting Edges, but how can we extract lines from those edges? Basic Idea: Let edge points vote for possible lines
13
Hough Transform Parameterize lines as Every line can be expressed as a pair of values, θ and r To find lines, we’ll let each point vote for the possible lines that it could lie on.
14
Basic Idea Discretize the space of θ and r Each point “votes” for all (θ, r) combinations that result in a line passing through that point Combinations corresponding to lines should receive many votes θ r (From Slides by Forsyth)
15
What if there’s noise? (From Slides by Forsyth)
16
What if there are no lines? (From Slides by Forsyth)
17
The Hough Transform Advantages: –Don’t need to know the number of lines ahead of time –Conceptually Simple Disadvantages: –Noise leads to lots of phantom lines –Have to pick the right quantization
18
Changing Gears The edge-detection algorithm gives us a binary map. It would be useful to group these edges into coherent structures.
19
Connected Components Algorithm Divides binary image into groups of connected pixels First, need to define the neighborhood
20
Algorithm is easily explained recursively
21
Connected Components Called bwlabel in MATLAB image processing toolbox
22
Next Week Image Segmentation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.