retrotape_old.py 文件源码

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

项目:StormCV2017 作者: 2729StormRobotics 项目源码 文件源码
def __find_contours(input, external_only):
        """Sets the values of pixels in a binary image to their distance to the nearest black pixel.
        Args:
            input: A numpy.ndarray.
            external_only: A boolean. If true only external contours are found.
        Return:
            A list of numpy.ndarray where each one represents a contour.
        """
        if(external_only):
            mode = cv2.RETR_EXTERNAL
        else:
            mode = cv2.RETR_LIST
        method = cv2.CHAIN_APPROX_SIMPLE
        im2, contours, hierarchy =cv2.findContours(input, mode=mode, method=method)
        return contours
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号