TrackPy

← Back to Image Segmentation

TrackPy [21] is a Python library for particle tracking in image sequences. It implements the Crocker–Grier tracking algorithm:

  1. Particle detection: locate bright spots (or dark spots on a bright background) by bandpass filtering and local maxima detection.

  2. Subpixel refinement: estimate particle centroid positions with sub-pixel accuracy.

  3. Trajectory linking: connect particle positions across frames into trajectories by solving an assignment problem that minimizes total displacement.

  4. Drift correction: subtract ensemble-average motion to isolate individual particle dynamics.

  5. Motion analysis: mean-squared displacement (MSD), diffusion coefficients, velocity statistics.

TrackPy is well suited for tracking colloidal particles, bubbles, and other small objects in electrochemical or fluid-dynamics imaging experiments.

See also

  • SAM 2 — a deep-learning alternative for propagating masks across frames

  • Image Segmentation — every other segmentation and tracking approach