1. A method of extracting a feature of an input image, the method comprising: constructing an example pyramid including at least two hierarchical levels based on stored example images which include face images of different users; generating a codebook in each of the at least two hierarchical levels; calculating a similarity between each codebook and the input image; and extracting a feature of the input image based on the similarity, wherein the example pyramid is constructed using example image groups generated for each of the at least two hierarchical levels by clustering a feature vector of the stored example images based on a distance in a feature space.