functions.py 文件源码

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

项目:cvloop 作者: shoeffner 项目源码 文件源码
def load_hat(self, path):  # pylint: disable=no-self-use
        """Loads the hat from a picture at path.

        Args:
            path: The path to load from

        Returns:
            The hat data.
        """
        hat = cv2.imread(path, cv2.IMREAD_UNCHANGED)
        if hat is None:
            raise ValueError('No hat image found at `{}`'.format(path))
        b, g, r, a = cv2.split(hat)
        return cv2.merge((r, g, b, a))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号