Hash algorithm for very similar images

I am looking for an image hashing algorithm (at the moment I am thinking of a kind of perceptual hash) able to preserve details a bit more than usual hashing algorithms. The images I have to differentiate between are initially pretty similar, and the details need to be taken into account so that I do not really want to downsize them. I need to be able to tell if a particular image matches a database already in a database, but I want it to be at least insensitive to trimming and rotation (trimmed / rotated images should deliver the same or almost the same result) , An added bonus would be if he can not change by a few pixels (with a certain threshold of course.). My fear with the usual perception hashes is that they make the picture so much smaller and the pictures I have everything look too similar. Many Thanks!