Image Search Engine using OpenCV and Python
In this project, we explored how to build an image search engine using OpenCV and Python.
- Defining image descriptor: At this phase we need to decide what aspect of the image we want to describe. Are we interested in the color of the image? The shape of an object in the image? Or do we want to characterize texture?
- Indexing our dataset: Now that we have our image descriptor defined, our job is to apply this image descriptor to each image in your dataset, extract features from these images, and write the features to storage (ex. CSV file, RDBMS, Redis, etc.) so that they can be later compared for similarity.
- Defining our similarity metric: Now we have a bunch of feature vectors. Then we have to compare them.Popular choices include the Euclidean distance, Cosine distance, and chi-squared distance, but the actual choice is highly dependent on (1) Our dataset and (2) the types of features you extracted.
- Searching: The final step is to perform an actual search. A user will submit a query image to your system (from an upload form or via a mobile app, for instance) and our job will be to (1) extract features from this query image and then (2) apply our similarity function to compare the query features to the features already indexed. From there, We simply return the most relevant results according to your similarity function.
Write Your Own Review