trackpy.masks

Functions

N_binary_mask(radius, ndim)

binary_mask(radius, ndim)

Elliptical mask in a rectangular array

cosmask(radius)

Sin of theta_mask

gaussian_kernel(sigma[, truncate])

1D discretized gaussian

get_mask(pos, shape, radius[, include_edge, ...])

Create a binary mask that masks pixels farther than radius to all given feature positions.

get_slice(coords, shape, radius)

Returns the slice and origin that belong to slice_image

mask_image(pos, image, radius[, origin, ...])

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

r_squared_mask(radius, ndim)

Mask with values r^2 inside radius and 0 outside

sinmask(radius)

Sin of theta_mask

slice_image(pos, image, radius)

Slice a box around a group of features from an image.

theta_mask(radius)

Mask of values giving angular position relative to center.

x_squared_masks(radius, ndim)

Returns ndim masks with values x^2 inside radius and 0 outside