Falafel Vision Processing.py 文件源码

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

项目:Millennium-Eye 作者: Elysium1937 项目源码 文件源码
def sizeFiltering(contours):
    """
    this function filters out the smaller retroreflector (as well as any noise) by size
    """

    if len(contours) == 0:
        print "sizeFiltering: Error, no contours found"
        return 0

    big = contours[0]

    for c in contours:
        if type(c) and type(big) == numpy.ndarray:
            if cv2.contourArea(c) > cv2.contourArea(big):
                big = c
        else:
            print type(c) and type(big)
            return 0
    x,y,w,h = cv2.boundingRect(big)
    return big
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号