I have two images. One is a screenshot of a desktop (source image), and the other is a screenshot of the same desktop, but through a remote access window (to-be-compared image). I need to compare the two images and work out what percentage of the image is the same. My issue is that an offset is created by the remote access window. The title bar of the remote access window creates an offset of 20 pixels or so in the second image, and the task bar cuts of almost 30 pixels from the bottom of the original image. I know I can trim the second image and do a sub image search, but this is not a route I'd like to take.
Is there a way to use imagemagick to compare the two images and work out what percentage of them is the same, even with the offset? Obviously the percentage by which they are the same would be a minimum of 90% or so given the addition of the title and footer bars, and the cut off of the original image.
Here's the source:

And here's the image to be compared:

Thanks for your help!