1. An image processing apparatus comprising: first distribution calculation means that calculates a distribution of luminance gradient vectors in a first local area that includes a feature point on an image; second distribution calculation means that calculates distributions of the luminance gradient vectors in second local areas close to the feature point on the image; selection means that compares the distribution of the luminance gradient vectors of the first local area with the distributions of the luminance gradient vectors of the second local areas to select the distribution of the luminance gradient vectors of the second local area of which the distribution is most different from the distribution of the luminance gradient vectors of the first local area from among the distributions of the luminance gradient vectors of the plurality of second local areas; and feature descriptor calculation means that calculates a feature descriptor at the feature point on the basis of the distribution of the luminance gradient vectors of the first local area and the distribution of the luminance gradient vectors of the second local area selected by the selection means.