trackpy.preprocessing.invert_image

trackpy.preprocessing.invert_image(raw_image, max_value=None)

This function has been made lazy. When passed a Slicerator, it will return a Pipeline of the results. When passed any other objects, its behavior is unchanged.

Invert the image.

Use this to convert dark features on a bright background to bright features on a dark background.

Parameters:
imagendarray
max_valuenumber

The maximum value of the image. Optional. If not given, this will is (for integers) the highest possible value and (for floats) 1.

Returns:
inverted image