identification ModuleΒΆ
Warning
This module is not in use by the author.
A minimal implementation of the Crocker-Grier algorithm for locating round features in images. This is done in three passes:
- band pass (
trackpy.identification.band_pass())- locating the pixels which are local maximum (
trackpy.identification.find_local_max())- sub-pixel refinement (
trackpy.identification.subpixel_centroid())
as such:
import trackpy.identification as tid
# load a single frame
img = load_your_image()
# band pass the image
bp_img = tid.band_pass(img, p_rad, hwhm)
# locate the local maximum (more-or-less the center of the particles)
res_lm = tid.find_local_max(bp_img, d_rad)
# refine to get sub-pixel resolution
locs, mass, r2 = tid.subpixel_centroid(bp_img, res_lm, mask_rad)