1. A method of determining an instance of an object in a query image, comprising the steps of: receiving a plurality of matches of feature points between the query image and a database image; deriving a kernel bandwidth for a clustering method by analyzing statistics of the database image; applying the clustering method with the derived kernel bandwidth to the matches of feature points between the query image and the database image thereby generating at least one cluster; and determining a number of instances of the object in the database image within the query image.