| Algorithm 1. Algorithm of RANSAC-based plane detection. | |
|
| |
| FindPlanesRansac | |
|
| |
| Input: Point cloud G, sampling ratio σ, positive ratio of acceptance ρ, error tolerance ∈, number of iterations k | |
| Output: Set of detected planes N | |
|
| |
| 1 | N ← {∅} |
| 2 | For i = 1 to k |
| 3 | Draw a sample gi ∈ G and σ samples Si ∈ G in the vicinity of gi |
| 4 | ni ← BestFitPlane(Si) |
| 5 | Pi ← {p ∈ G: δ(p, ni) < ε} |
| 6 | If |Pi|/|G| > ρ |
| 7 | ni ← RefinePlaneICP(Pi, ni, ∈, Pi ←{p ∈ G: δ(p, ni) < ε} |
| 8 | N ← N ∪ {ni}, G ← G − Pi |
| 9 | End If |
| 10 | End For |
|
| |