sefibk / KernelGAN

Other
337 stars 77 forks source link

The parameters when the image is saved #44

Open zerodohero opened 3 years ago

zerodohero commented 3 years ago
    **max_val = 255 if sr.dtype == 'uint8' else 1.
    plt.imsave(os.path.join(conf.output_dir_path, 'ZSSR_%s.tif' % conf.img_name), sr, vmin=0, vmax=max_val, dpi=1)**

I want to ask what is the significance of max_val?Since Matplotlib does not hold tiF images, I need another library, such as Imageio, to hold TIF images, but it does not have these parameters. Does this affect the final result?Because the image I get is whiter, just like the transparent white layer above.

sefibk commented 3 years ago

It either clips or compresses the values accordingly. I do not remember. Any, I think it is not significant at all

zerodohero commented 3 years ago

It either clips or compresses the values accordingly. I do not remember. Any, I think it is not significant at all

thank you very much.