Disclaimer: cryptography and hashing are not my major areas of expertise.
So, say we have two images $A$ and $B$ with corresponding hashes $h_A$ and $h_B$, respectively. Here, $h_A=f(A,key)$ and $h_B=f(B,key)$, where $f$ is the hashing function.
We also want that $f^{-1}(h_A,[key])$ does not exist, implying that it involves extremely computationally expensive procedures.
Now, we want to know, if there is a function $g(h_A,h_B)$ that is going to measure a similarity between $A$ and $B$ given their hashes $h_A$ and $h_B$. However, that directly contradicts with the requirements on $f^{-1}$ being computationally expensive as it gives me an option to construct $f^{-1}$ procedure by constructing a sequence of more-and-more similar images that will iteratively converge to the original.
So, I would say that even if such function exists, such process severely compromises non-recoverability of the image by having only its hash.
Appendix
(construction of $f^{-1}$):
Input: $h_A$, $f$
Procedure:
- Take initial image guess $B^{(0)}$ (random, or based on something known)
- Calculate $h_B^{(0)}$ using $f$
- Calculate $g(h_A,h_B^{(0)}$)
- If value of $g$ is less than tolerance -> stop. Otherwise continue.
- Find new image guess $B^{(1)}$ based on some procedure (genetic algorithms, black-box optimization, etc.). Return to step 2.
Of course, it is hard to find an efficient procedure of finding a new image guess $B^{(i+1)}$ based on $B^{(i)}$ and $g(h_A,h_B^{(i)})$; however, it is still significantly better than trying to crack a good hashing function.