image_handler.py 文件源码

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

项目:harpreif 作者: harpribot 项目源码 文件源码
def get_puzzle_pieces(self):
        """
        returns the puzzle pieces, as well as their true locations in row major numbering format, as a dictionary,
        where the key, is row_major puzzle_piece_id and the value is the piece image itself
        :return: The dictionary of piece_id => piece_image
        """
        result = dict()
        for piece_id, piece in enumerate(self.tiles):
            piece_image = np.array(piece.image)
            result[piece_id] = rgb2gray(piece_image)

        return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号