A probabilistic similarity framework for content-based image retrieval