Spatial-temporal improvements of a two-frame particle-tracking algorithm