camera_utils.py 文件源码

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

项目:pybot 作者: spillai 项目源码 文件源码
def compute_fundamental(x1, x2, method=cv2.FM_RANSAC): 
    """
    Computes the fundamental matrix from corresponding points x1, x2 using
    the 8 point algorithm.

    Options: 
    CV_FM_7POINT for a 7-point algorithm.  N = 7
    CV_FM_8POINT for an 8-point algorithm.  N >= 8
    CV_FM_RANSAC for the RANSAC algorithm.  N >= 8
    CV_FM_LMEDS for the LMedS algorithm.  N >= 8"
    """
    assert(x1.shape == x2.shape)
    if len(x1) < 8:
        raise RuntimeError('Fundamental matrix requires N >= 8 pts')

    F, mask = cv2.findFundamentalMat(x1, x2, method)
    return F, mask
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号