Answers for "io.imsave 16 bit"

0

io.imsave 16 bit

import numpy as np
from skimage import io, exposure, img_as_uint, img_as_float

io.use_plugin('freeimage')

im = np.array([[1., 2.], [3., 4.]], dtype='float64')
im = exposure.rescale_intensity(im, out_range='float')
im = img_as_uint(im)

io.imsave('test_16bit.png', im)
im2 = io.imread('test_16bit.png')
Posted by: Guest on November-29-2020

Python Answers by Framework

Browse Popular Code Answers by Language