A feature extraction apparatus (10, 430) comprising: a sub-region setting section for setting all or some pixels in an image taken by a camera to be pixels of interest, respectively, and for setting a plurality of sub-regions with respect to each of the pixels of interest; and a binary pattern generating section for generating 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 the binary pattern generating section is configured for calculating representative values respectively for the sub-regions, each of the representative values representing a pixel value of one pixel or a group of pixel values of a plurality of pixels constituting a corresponding one of the sub-regions, and for generating, as the local binary pattern, bit data indicating whether differences between a pixel value of the pixel of interest and the representative values are each equal to or greater than a predetermined threshold using bit values, the sub-region setting section is configured for setting the sub-regions based on spatial frequency characteristics of the camera, the sub-region setting section is configured for setting each of the sub-regions so that a length of the sub-region is set to such a size that all pixel values of the sub-region in a length-direction of the sub-region are regarded as being nearly equal to each other in view of the spatial frequency characteristics of the camera, wherein two pixel values are regarded as being nearly equal to each other when the interval between these two pixels is equal to or less than the number of pixels equivalent to the reciprocal of the maximum value of a spatial frequency reproducible by the camera. a sub-region setting section for setting all or some pixels in an image taken by a camera to be pixels of interest, respectively, and for setting a plurality of sub-regions with respect to each of the pixels of interest; and a binary pattern generating section for generating 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 the binary pattern generating section is configured for calculating representative values respectively for the sub-regions, each of the representative values representing a pixel value of one pixel or a group of pixel values of a plurality of pixels constituting a corresponding one of the sub-regions, and for generating, as the local binary pattern, bit data indicating whether differences between a pixel value of the pixel of interest and the representative values are each equal to or greater than a predetermined threshold using bit values, the sub-region setting section is configured for setting the sub-regions based on spatial frequency characteristics of the camera, the sub-region setting section is configured for setting each of the sub-regions so that a length of the sub-region is set to such a size that all pixel values of the sub-region in a length-direction of the sub-region are regarded as being nearly equal to each other in view of the spatial frequency characteristics of the camera, wherein two pixel values are regarded as being nearly equal to each other when the interval between these two pixels is equal to or less than the number of pixels equivalent to the reciprocal of the maximum value of a spatial frequency reproducible by the camera.