1. A computer-based method of a person identification by a facial image comprising: localizing the facial image; detecting coordinates of eye pupil centers on the facial image; deriving a normalized facial image based on the facial image; splitting the normalized facial image into rectangular blocks; describing the rectangular blocks of the normalized facial image by a DCT (discrete cosine transform); calculating distances between the normalized facial image and existing templates performed in two stages, the distances being weighted sums of shortest distances between each rectangular block of the normalized facial image and a set of rectangular blocks of the existing templates, wherein a small part of most different blocks are excluded from the weighted sum; and recognizing the normalized facial image based on the distances calculated.