1. A feature extracting apparatus comprising: a comparison target pixel acquiring section that acquires pixel values of a plurality of comparison target pixels included in a neighborhood region when an annular region having a pixel of interest at its center is set as the neighborhood region while all pixels or partial pixels in an image taken through a lens are each set as the pixel of interest; a pixel difference calculating section that calculates a difference between the pixel value of the pixel of interest and the pixel value of each of the comparison target pixels; and a local binary pattern generating section that generates a local binary pattern indicating, using a bit value, whether the difference between the pixel value and the pixel value of each of the comparison target pixels is equal to or greater than a predetermined threshold for each of the pixels, wherein a plurality of the neighborhood regions are present for each of the pixels of interest, and a distance between the plurality of neighborhood regions is determined based on spatial frequency characteristics of the lens.