This document summarizes recent developments in line detection techniques for computer vision. It discusses the goal of line detection and how it differs from edge detection. It then explains techniques like the successive approximation method, Hough transform, RANSAC, and how the Hough transform can be used for vanishing point detection. Applications like rectangle detection using these techniques are also covered. Key algorithms and their strengths/weaknesses are outlined for each method.
Line Detection in Computer Vision - Recent Developments and Applications
1. Line Detection in Images–
Recent Developments and Applications
NANDEDKAR PARTH SHIRISH
1
Department of
Intelligent Media,
Yagi Laboratory
2. 今日の流れーTopics
1.Goal of Line Detection, difference with Edge Detection
2.Successive Approximation Method
3.Hough Transform Method
4.RANSAC(Random Sample Consensus) Method
5.Vanishing Point Detection using Hough Transform
6.Applications-Rectangle Detection
2
Department of
Intelligent Media,
Yagi Laboratory
3. 1. Goal of Line Detection
Line detection is an algorithm that takes a collection of
n edge points and finds all the lines on which these edge
points lie.
Most popular line detectors are Hough
transform and convolution-based techniques.
Convolution-based Line Detection:
Same process as Edge Detection.
3
4. 1. Difference with Edge Detection
An edge is a transition from one phase/object/thing to
another. On one side you have one color, on the other side
you have another color.
A line is a 1D structure. It has the same phase/object/thing
on either side. On one side you have background, on the
other side you have background also.
→Better techniques can better differentiate between these.
4
5. 2.Successive Approximation Method
• Transforming from a curve-contour to a simpler
representation (to Piecewise-linear polyline or B-spline cur
• Algorithm: Mark the first and last point. Find the farthest
inlier from this line and join First and this point. Now remov
the farthest inlier to this line.
• If contour is a line we can simplify it to that line.
5
6. 3.Hough Transform Basics
A line-to-point transform, that transforms the data from
x,y space to m,h space, where each line is transformed
to a point.
Problem: neither m or h are bounded
Line k to x axis ⇒ h not defined
Line k to y axis ⇒ m → ∞ 6
7. 3.Polar Hough Transform
Now both variables are bounded!
→ Polar Hough Transform:
Value for an arbitrary line (r – xcosθ – ysinθ = 0) in (r, θ)
Where f(x,y) is the 2D image
→ Unit Sphere & Cubemap Mappings possible(pg. 253)
7
8. 3.Polar Hough Transform – Theoretical Example
Output in the case of perfectly continuous lines.
8
9. 3.Hough Transform for Line Detection
→ Goal: To identify straight lines
• Process: For each pixel at (x,y) the Polar Hough transform
algorithm determines if there is enough evidence of a
straight line at that pixel, using votes from sample points.
→ Strengths:
• Gives equations of lines(but not “end-points” of segments).
• Works well with simple images that contain good straight
lines. (Good for Robot Vision)
• Deals with broken lines very well (in next slide).
• Reasonably efficient if there are “few” edge points.
9
13. 3.Hough Transform for Line Detection
→ Problems:
• Very slow of there are many edge points.
• Hough Space is non-linear, different edge sensitivities in
different directions.
• Poor for short lines.
→ Recent Extensions of Hough Method:
• Circle and Ellipse detection by Double Hough Method.
• Image transform plus Hough for general 2D shape
detection.
• Vanishing Points Detection(section 4.3.3, part 5 of slides)13
14. 4.RANSAC (Random Sample Consensus)
Method – (For Feature Detection)
• Determines the best transformation that includes the
most number of match features (inliers) from the previous
step.
• RANSAC loop for planar pattern detection:
1. Select four feature pairs (at random) in the two angles.
2. Compute homography H (see next slide).
3. Compute inliers where SSD(pi’, Hpi) < a certain value,ε.
4. Keep largest set of inliers.
5. Re-compute least-squares estimate on all of the inliers.
14
15. 4.RANSAC Method – What are Homographies?
• Example of Homography
• Definition: Projective–mapping between any two
projection planes with the same center of
projection
15
16. 4.RANSAC Method – What are Homographies?
• Definition: Projective–mapping between any two
projection planes with the same center of
projection
16
17. 4.RANSAC Method – (For Line Detection)
→ Simple example: Let us fit a line
• Use biggest set of inliers
• Do least-square fit => SD is low, Very likely it is a line
17
18. 4.RANSAC Method – Video: Fitting a Line
→ Strengths:
• Robust estimation
• Relatively high
accuracy
→ Weaknesses:
• Randomness.
• Number of
Iterations required
for p% success
18
19. → Goal: To collect lost 3D information from perspective in a
2D image detecting Vanishing points of Parallel lines.
19
5.Vanishing Points Detection – using Hough Transform
20. 5.Vanishing Points Detection – using Hough Transform
→ Textbook method using Cross Product:
Step 1) Calculate Vanishing Point Hypothesis (weight)
= Cross product of any two line vectors =
Near-Collinear segments downweighted
Step 2) Populate Hough space(accumulator) with weights
and find peaks for Vanishing point votes from the lines.
Step 3) Calculate Least Squares Estimate for all Vanishing
points with respect to lines that voted for it.
20
21. where = Green Triangle area
Rule: The lower the sum of all areas subtended to segment
endpoints, the more appropriate the vanishing point.
21
5.Vanishing Points Detection – using Hough Transform
22. 6.Applications
Rectangle Detection:
Step 1) First, detect all vanishing points
Step 2) Detect the Edge points/Lines that are aligned along
vanishing lines.
We then efficiently recover the inter-sections of pairs of
lines corresponding to different vanishing points. (論文[8])22
23. 6.Applications
Rectangle Detection:
Using only Hough
Detection is an 8D
vector-space problem
(論文[8]).
Major Quadrilaterals in
image can be detected
using only Vanishing
Point and Line Detection
(論文[8]).
23