Text this: Multitarget Pedestrian Tracking Algorithm Based on a Contour Template with Multiscale Stability