replace findMatches with matMaxima/matMinima in matchTemplate for faster and more accurate matches