camera_utils.py 文件源码

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

项目:pybot 作者: spillai 项目源码 文件源码
def get_bounded_projection(camera, pts, subsample=10): 
    """ Project points and only return points that are within image bounds """

    # Project points
    pts2d = camera.project(pts[::subsample].astype(np.float32))

    # Only return points within-image bounds
    valid = np.bitwise_and(np.bitwise_and(pts2d[:,0] >= 0, pts2d[:,0] < camera.shape[1]), \
                           np.bitwise_and(pts2d[:,1] >= 0, pts2d[:,1] < camera.shape[0]))
    return pts2d[valid], valid
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号