In this recipe, you will learn how to implement a simple image search engine (SE). It will be a search by example system, relying only on the image contents, known as content-based image retrieval (CBIR) systems. The images along with the features extracted are stored so that the system can return similar images (based on the features) during a search. The following describes the four steps of any CBIR system:
- Defining an image descriptor (descriptive features of an image)
- Indexing search images (for quick retrieval of the images with similar descriptors to the query image. Use an efficient data structure for fast retrieval)
- Defining the similarity metric to be used (Euclidean/cosine/chi-squared distance, and so on)
- Searching (the user submits a query image to the SE, and the SE extracts features from this query image and uses the indexed features...