trackpy.masks.mask_image

trackpy.masks.mask_image(pos, image, radius, origin=None, invert=False, include_edge=None)

Masks an image so that pixels farther than radius to all given feature positions become 0.

Parameters:
posndarray

Feature positions (N x 2 or N x 3)

imagendarray
radiusnumber or tuple

Radius of the individual feature masks

origintuple, optional

The topleft coordinate (origin) of the image.

invertboolean, optional

If invert==True, the features instead of the background will become 0.

include_edgeboolean, optional

Determine whether pixels at exactly one radius from a position are included in the feature mask. Defaults to True if invert==False, and to False if invert==True.