You will use SIFT keypoints/descriptors to compute the similarity between two images (using opencv-python). Here are the steps that you will need to follow:
- First, read the query image. Also, read all of the images from the search directory to find the best possible matches:
query = cv2.imread("images/query.jpg") matched_images = defaultdict(list) for image_file in glob.glob('images/search/*.jpg'): search_image = cv2.imread(image_file)
The query image is shown here:
- Extract the SIFT keypoints and descriptors for the query image and all of the search images using the following ...