1. An image processing apparatus, comprising: an extraction unit configured to extract a plurality of feature points from an inputted query image; a computation unit configured to compute respective feature amounts for each of the plurality of feature points; an estimation unit configured to estimate a fluctuation distribution of the respective feature amounts computed according to transformation of the inputted query image; and a retrieval unit configured to retrieve an image similar to the inputted query image from among a plurality of stored images, based on a weighted distance of each of the feature points of the computed feature amounts of the inputted query image, wherein each weighted distance is computed for the respective feature point of the inputted query image according to magnitude of fluctuation of the respective feature amount in the estimated fluctuation distribution.