1. A feature extraction apparatus comprising: a sub-region setting section that sets all or some pixels in an image taken by a camera to be pixels of interest, respectively, and that sets a plurality of sub-regions with respect to each of the pixels of interest based on spatial frequency characteristics of the camera; and a binary pattern generating section that generates a local binary pattern for each of the pixels of interest, the local binary pattern indicating comparison results between a pixel value of the pixel of interest and pixel values of the plurality of set sub-regions using bit values, wherein the plurality of sub-regions include at least a sub-region constituted by a plurality of pixels including a pixel separated from a corresponding one of the pixels of interest by one or more pixels, and at least one of a width and a length of the sub-region is equal to or less than the number of pixels equivalent to the reciprocal of the maximum value of a spatial frequency of the camera.