Large-scale near-duplicate image retrieval by kernel density estimation