Title: Curve Fitting
1Curve Fitting
Lecture 11
2(No Transcript)
3(No Transcript)
4(No Transcript)
5(No Transcript)
6(No Transcript)
7(No Transcript)
8(No Transcript)
9- Three main questions
- what object (line, circle, ellipse,) represents
this set of points best? - how many objects are there?
- which of several objects gets which point?
What criteria of fitting?
10Fitting lines
Number of lines 1
Error ? min
11d
d
d f(x) - y
12Least Square Error
Maximum Absolute Error
Mean Square Error
Normalized Maximum Error
13?r²i,j ?min
14Assume we do not know how many lines there are.
Polyline fitting
- Splitting
- Merging
15Polyline splitting
16Polyline splitting
17Polyline splitting
dmax
dmax lt Thresh
18- Polyline Splitting
- Input L- list of pixels (edges), Thresh
- L(x1,y1),(x2,y2),,(xn,yn)
- Output Polyline
- Fit a line between the first and last edges in
the list - If the ? gt Thresh, split the list by the point
of maximum error (xi,yi) L1(x1,y1),(x2,y2),,(
xi,yi) and L2(xi,yi),(xi1,yi1),,(xn,yn) - 2.1 Polyline Splitting(L1,Thresh)
- 2.2 Polyline Splitting(L2,Thresh)
19Incremental line fitting (Merging)
20Incremental line fitting (Merging)
21Incremental line fitting (Merging)
22(No Transcript)
23Hop-Along Polyline fitting (SplitMerge)
24Hop-Along Polyline fitting (SplitMerge)
- Start with the first k edges from the list
- Fit a line between the first and the last edges
in the sublist - If NME gt Thresh , shorten the sublist to the
point of maximum error. Return to step 2. - If the line fit succeeds, compare the orientation
of the current line segment with the previous
line segment. If the lines have similar
orientation, replace the two line segments with a
single line. - Make the current line segment the previous line
segment and advance the window of edges so that
there are k edges in the sublist. Return to the
step 2.
25If the number of lines is known
26Robustness
A computer vision algorithm is called robust if
it can tolerate outliers (data which does not
obey the assumed model).
Robustness is the ability to extract the visual
information of relevance for a specific task,
even when this information is carried only by a
small subset of the data.
27LSE criteria
28LSE criteria
29Least-median-squares
30RANSAC
- Choose a small subset uniformly at random
- Fit to that
- Anything that is close to result is signal all
others are noise - Refit
- Do this many times and choose the best
- How many times?
- Often enough that we are likely to have a good
line - How big a subset?
- Smallest possible
- What does close mean?
- Depends on the problem
- What is a good line?
- One where the number of nearby points is so big
it is unlikely to be all outliers
31(No Transcript)
32Fitting curves other than lines
Circular arcs
P1(x1,y1),P2(x2,y2),P3(x3,y3)
x x - x1, y y - y1
33q
d q - r