Learning and Matching Multiscale Template Descriptors for Real-Time Detection, Localization and Tracking