I have two images (grayscale, but doesn't really matter) with the same size and i would like to quantify their similarity.
For this I was thinking about something like a Levenshtein (or edit) distance between them built in the following way:
- Swap some pixels of image 2 to increase the similarity between the two images. The cost of this operation should be some physical distance (cartesian or manhattan) between the pixel being swapped.
- Alter the values of the pixels of image 2 in order to exactely match image 1. The cost of this operation should be the difference of the initial and final pixel values multiplied by some constant.
I am looking for some infrastructure to achieve this or something similar, thank you in advance for your advice.