Hi all, new here and having a lot of fun using Skimage for scientific image analysis.
I’m doign some normalization on images coming in as uint16, to expand their dynamic range. After normalization, images are float64, and I’m trying to convert them back to uint16. However, it seems like all the img_as functions ignore the kind of float coming in, since anything of kind float is constrained to [-1 to 1]. Below is the section out of the convert() function that seems to do this. # float -> any if kind_in == 'f': if np.min(image) < -1.0 or np.max(image) > 1.0: raise ValueError("Images of type float must be between -1 and 1.") if kind_out == 'f': # float -> float if itemsize_in > itemsize_out: prec_loss() return image.astype(dtype_out) Obviously my float64 array returns kind_in as ‘f’, but has values outside of this range. I’m pretty new to all this, am I missing something obvious? Thanks! Dave
_______________________________________________ scikit-image mailing list scikit-image@python.org https://mail.python.org/mailman/listinfo/scikit-image