haze.py 文件源码

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

项目:flownetS_tensorflow 作者: studian 项目源码 文件源码
def read_disp_png(disp_file):
        """
        Read kitti disp from .png file
        :param disp_file:
        :return:
        """
        image_object = png.Reader(filename=disp_file)
        image_direct = image_object.asDirect()
        image_data = list(image_direct[2])
        (w, h) = image_direct[3]['size']
        channel = len(image_data[0]) / w
        disp = np.zeros((h, w, channel), dtype=np.uint16)
        for i in range(len(image_data)):
            for j in range(channel):
                disp[i, :, j] = image_data[i][j::channel]
        return disp[:, :, 0] / 256
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号