geom_utils.py 文件源码

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

项目:pybot 作者: spillai 项目源码 文件源码
def convex_hull(pts, ccw=True): 
    """
    Returns the convex hull of points, ordering them in ccw/cw fashion

    Note: Since the orientation of the coordinate system is x-right,
    y-up, ccw is interpreted as cw in the function call.

    """ 
    assert(pts.ndim == 2 and pts.shape[1] == 2)
    return (cv2.convexHull(pts.reshape(-1,1,2), clockwise=ccw)).reshape(-1,2)


# ===========================================================================
# BBOX-functions
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号