1. A method for compiling an image database that is used for a three-dimensional object recognition comprising the steps of: extracting, from a plurality of images each image showing a three-dimensional object from different viewpoint, a plurality of local descriptors each of which is a vector representing respective local features of each image; constructing an object model of the three-dimensional object, the object model being obtained by estimating contribution of each vector to the three-dimensional object recognition, by choosing the vectors making positive contribution and by organizing the chosen vectors in such a manner that each vector is adapted to be used for approximate nearest neighbor searching; and storing into the image database the images showing the three-dimensional object and the constructed object model with an object ID for identifying the three-dimensional object being attached, wherein: each of the steps is executed by a computer; the storing step stores the object model and the corresponding object ID so that, when an image showing a three-dimensional object in question is given as a query while a plurality of object models are stored in the image database, the computer extracts a plurality of query local descriptors from the query through a similar step to the extracting step, retrieves vectors as neighbor vectors of each query local descriptor, each neighbor vector being retrieved from the stored object models in the image database by using an algorithm of the approximate nearest neighbor searching, obtains object IDs attached to the neighbor vectors, determines at least one three-dimensional object which is identified by the object IDs as a candidate and determines at least one three-dimensional object based on points of similarities and/or of differences between each query local descriptor and corresponding neighbor vector; and the object model construction step estimates the contribution of each vector in such a manner that when a vector extracted from an image of a three-dimensional object is approximately nearest to another vector according to the same three-dimensional object from a different viewpoint, the vector is regarded to make a positive contribution, and when the vector is approximately nearest to another vector according to a different three-dimensional object, the vector is regarded to make a negative contribution.