boiler_filter.py 文件源码

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

项目:CompetitionBot2017 作者: Seamonsters-2605 项目源码 文件源码
def __hsl_threshold(input, hue, sat, lum):
        """Segment an image based on hue, saturation, and luminance ranges.
        Args:
            input: A BGR numpy.ndarray.
            hue: A list of two numbers the are the min and max hue.
            sat: A list of two numbers the are the min and max saturation.
            lum: A list of two numbers the are the min and max luminance.
        Returns:
            A black and white numpy.ndarray.
        """
        out = cv2.cvtColor(input, cv2.COLOR_BGR2HLS)
        return cv2.inRange(out, (hue[0], lum[0], sat[0]),  (hue[1], lum[1], sat[1]))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号