1. A feature extracting apparatus comprising: an edge image extracting section that generates edge images from a grayscale image; and a feature calculation section that calculates a number of edge pixels stipulated by an edge direction of a predetermined pixel and/or an edge direction of an edge pixel present in a neighboring area of the predetermined pixel, and a spatial relationship between the predetermined pixel and an edge pixel present in the neighboring area, as a feature of an image.