Depends on what you want to compare. How about if you simply subtract the two images? Will that work for you? Basically there's no way to answer this until you define what you want to compare. See the links on the right hand side of this page for a start. I mean you could be wanting to compare the area fraction of pixels that are different, the size distribution of fish, the clustering of stars in an astronomical image, the amount of noise in round-trip compression/decompressions routines, the number of plants in images of a crop taken at two different time points, and an infinite number of other things that can be compared. Do you understand from the prior examples that there is just no way to answer your question without more details?