Robust and hight accurate pattern matching using eigen decomposed templates