Adaptive Template Matching with Shift-Invariant Semi-NMF