|
Algorithm 1 Circular model-fitting with outlier rejection |
| Input: |
|
| points
|
▹ Set of points to be fitted |
| T |
▹ Threshold used to compute the cost function |
| FAILURE_PROBABILITY |
▹ Probability of not finding a correct model |
| INLIER_PROPORTION |
▹ Proportion of inliers in data |
| Output: |
|
|
|
▹ Best model parameters found |
| Initialization |
|
| 1:
|
▹ Initialize to a large number |
| 2:
|
| Find model |
|
| 3: for to N
do
|
|
| Find possible model |
|
| 4: Take 3 points randomly |
|
| 5: Build matrices and using equations (4) and (5) and the 3 sampled points |
| 6: Find model parameters using equations (6) and (7) |
| 7: Compute the cost function C using equations (8) to () |
| If this possible model is better than the previous one, we keep it |
| 8: if () then
|
|
| 9:
|
|
| 10:
|
| 11: end if
|
|
| 12: end for
|
|
| Refine the model using inliers |
| 13: Select the points such that using (8) |
| 14: Build matrices and using equations (4) and (5) and the selected inliers |
| 15: Find model parameters using equations (6) to (7) |
| 16: return
|