calibration_fit.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:pypilot 作者: pypilot 项目源码 文件源码
def ComputeDeviation(points, fit):
    m, d  = 0, 0
    for p in points:
        v = vector.sub(p[:3], fit[:3])
        m += (1 - vector.dot(v, v) / fit[3]**2)**2

        if len(fit) > 4:
            n = vector.dot(v, p[3:]) / vector.norm(v)
            if abs(n) <= 1:
                ang = math.degrees(math.asin(n))
                d += (fit[4] - ang)**2
            else:
                d += 1e111
    m /= len(points)
    d /= len(points)
    return [m**.5, d**.5]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号