trackpy.preprocessing.convert_to_int

trackpy.preprocessing.convert_to_int(image, dtype='uint8')

Convert the image to integer and normalize if applicable.

Clips all negative values to 0. Does nothing if the image is already of integer type.

Parameters:
imagendarray
dtypenumpy dtype

dtype to convert to. If the image is already of integer type, this argument is ignored. Must be integer-subdtype. Default ‘uint8’.

Returns:
tuple of (scale_factor, image)