#RANSAC 伪代码
Given:
data – a set of observations
model – a model to explain observed data points
n – minimum number of data points required to estimate model parameters
k – maximum number of iterations allowed in the algorithm
t – threshold value to determine data points that are fit well by model
d – number of close data points required to assert that a model fits well to data
Return:
bestFit – model parameters which best fit the data (or nul if no good model is found)
iterations = 0
bestFit = nul
bestErr = something really large
while iterations < k {
maybeInliers = n randomly selected values from data
maybeModel = model parameters fitted to maybeInliers
alsoInliers = empty set
for every point in data not in maybeInliers {
if point fits maybeModel with an error smaller than t
add point to alsoInliers
}
if the number of elements in alsoInliers is &g

RANSAC(RANdom SAmple Consensus)算法是一种用于从观测数据中估计数学模型参数的方法,尤其适用于存在噪声和异常值的情况。算法核心是通过迭代选取随机子集来判断潜在的内点(即符合模型的数据点),并计算最优模型。当找到足够数量的内点以确定一个良好的模型时,算法结束。以下是RANSAC的伪代码描述。
最低0.47元/天 解锁文章
843

被折叠的 条评论
为什么被折叠?



