3-D Computer Vision CSc 83020 - PowerPoint PPT Presentation

About This Presentation
Title:

3-D Computer Vision CSc 83020

Description:

Least Squares Fitting of Lines. Minimize E. CSc 83020 3-D Computer Vision Ioannis Stamos. Least Squares Fitting of Lines. Minimize E. Problem: E must be ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 43
Provided by: ioannis9
Category:
Tags: computer | csc | vision

less

Transcript and Presenter's Notes

Title: 3-D Computer Vision CSc 83020


1
3-D Computer VisionCSc 83020
  • Feature Detection and Grouping

2
Finding Corners
3
What Is a Corner?
Large gradients in more than one direction.
4
A Simple Corner Detector
Find eigenvalues of C
If the smaller eigenvalue is above a threshold
then we have a corner.
5
A Simple Corner Detector
Find eigenvalues of C
If the smaller eigenvalue is above a threshold
then we have a corner.
6
A Simple Corner Detector
7
Sobel Operator
-1 -2 -1 0 0 0 1 2 1
-1 0 1 -2 0 2 -1 0 1
S1
S2
Edge Magnitude
2
2
S1 S2
Edge Direction
8
Sobel in Matlab
9
Canny Edge Detector
10
Comparison
Canny
Sobel
11
Canny Edge Detection
  • Steps
  • Apply derivative of Gaussian
  • Non-maximum suppression
  • Thin multi-pixel wide ridges down to single
    pixel width
  • Linking and thresholding
  • Low, high edge-strength thresholds
  • Accept all edges over low threshold that are
    connected to edge over high threshold

12
Non-Maximum Supression
Non-maximum suppression Select the single
maximum point across the width of an edge.
13
Linking to the Next Edge Point
Assume the marked point q is an edge point.
Take the normal to the gradient at that point
and use this to predict continuation points
(either r or p).
14
Edge Hysteresis
  • Hysteresis A lag or momentum factor
  • Idea Maintain two thresholds khigh and klow
  • Use khigh to find strong edges to start edge
    chain
  • Use klow to find weak edges which continue edge
    chain
  • Typical ratio of thresholds is roughly
  • khigh / klow 2

15
Canny Edge Detection (Example)
Strong connected weak edges
Original image
Strong edges only
Weak edges
courtesy of G. Loy
16
Canny Edge Detection (Example)
Using Matlab with default thresholds
17
Bridge Example Again
edge(im,canny)
18
Summary Canny Edge Detection
  • Most commonly used method
  • Traces edges, accommodates variations in contrast
  • Not a linear filter!
  • Problems with corners

19
Towards Global Features
Local versus global
20
From Edges to Lines
21
Finding Lines
  • Assume edge detection
  • Each pixel is either edge or not
  • How do we find the line?

22
Finding Lines
  • Assume edge detection
  • Each pixel is either edge or not
  • How do we find the line?

23
Least Squares Fitting of Lines
Minimize E
24
Least Squares Fitting of Lines
Minimize E
Problem E must be formulated carefully!
25
Least Squares Fitting of Lines
Minimize E
26
Hough Transform
y
x
27
Hough Transform Quantization
y
x
m
Detecting Lines by finding maxima / clustering in
parameter space
28
Hough Transform Algorithm
  • For each image point, determine
  • most likely line parameters b,m (direction of
    gradient)
  • strength (magnitude of gradient)
  • Increment parameter counter by strength value
  • Cluster in parameter space, pick local maxima

29
Hough Transform Results
Hough Transform
Image
Edge detection
30
Finding Lines Using the Hough Transform
31
Algorithm
  • Discretize the parameter spaces ? and ?.
  • Create Accumulator array A(1..R,1..T).
  • Set A(k,h)0 for all k and h.
  • For each image edge E(i,j)1
  • For h1T
  • ? i cos?d(h)j sin?d (h)
  • Find index k ?d is closest to ?
  • Increment A(h,k) by one.
  • Find all local maxima (kp, hp) such that A (kp,
    hp)gtt

32
Finding Lines Using the Hough Transform
Strong local peaks correspond to lines.
33
Finding Lines Using the Hough Transform
Resolution Issues

34
From Forsyth and Ponce
35
Summary Hough Transform
  • Smart counting
  • Local evidence for global features
  • Organized in a table
  • Careful with parameterization!
  • Problem Curse of dimensionality
  • Works great for simple features with 3 unknowns
  • Will fail for complex objects
  • Problem Not a local algorithm

36
Finding Circles by Hough Transform
y
r
b0
(xi,yi)
x
a0
Equation of Circle
37
Finding Circles by Hough Transform
y
r
b0
(xi,yi)
x
a0
Equation of Circle
Circles!
If radius r is known
b
y
(xi,yi)
x
a
Accumulator array A(a,b)
38
Finding Circles by Hough Transform
y
r
b0
(xi,yi)
x
a0
If r is not known Use accumulator array
A(a,b,r) For each (xi,yi) increment A(a,b,r)
such that
39
Using Gradient Information
Can save lot of computations!
Given location (xi,yi) Edge direction fi
y
x
40
Using Gradient Information
Can save lot of computations!
Given location (xi,yi) Edge direction fi
y
x
Assume r is known
ax-rcosf by-rsinf Need to increment only one
point in Accumulator Array.
(xi,yi)
y
fi
(a,b)
x
41
Hough Transform for Curves
  • Curve yf(x,a)
  • aa1, , ap the parameters of the curve.
  • Limitation size of parameter space wrt of
    parameters.
  • Solution variable-resolution parameter space.

42
Hough Transform
  • Pattern Matching.
  • More efficient than template matching.
  • Handles occlusion.
  • Finds all instances of pattern.
  • Handling inaccurate edge locations?
  • Drawbacks?
Write a Comment
User Comments (0)
About PowerShow.com