RS.py 文件源码

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

项目:osrmacro 作者: jjvilm 项目源码 文件源码
def isInvEmpty():
    bag, bagx,bagy = get_bag('bag and coords', 'hsv')
    # looks for color of empty inv
    low = np.array([10,46,58])
    high= np.array([21,92,82])
    # applies mask
    mask = cv2.inRange(bag, low, high)
    # removes any noise
    kernel = np.ones((5,5), np.uint8)
    closing = cv2.morphologyEx(mask, cv2.MORPH_CLOSE, kernel)

    # looks to see if the inv is all white pixels
    # returns true, else False
    if (closing.view() == 255).all():
        return True
    return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号