skimage2.util.img_as_int#

skimage2.util.img_as_int(image, force_copy=False)[source]#

Convert an image to 16-bit signed integer format.

Parameters:
imagendarray

Input image.

force_copybool, optional

Force a copy of the data, irrespective of its current dtype.

Returns:
outndarray of int16

Output image.

Notes

The values are scaled between -32768 and 32767. If the input data-type is positive-only (e.g., uint8), then the output image will still only have positive values.