Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As hinted in this answer, Perceptual hashing is a way to ascribe comparable measures (hashes) to images (rectangular patches). The images do not need to be the same size, and can be slightly distorted, according to the answer.

I might soon need a way to measurably describe image patches of different sizes, as well as irregular (not only different) shapes, and if Perceptual hashing could be adapted to work on non-rectangular image patches, it sounds interesting in this context.

I don't have any limitation to the way I describe the patches though, so any other suggestions are welcome. It does not have to be a distance measure, in other words, I just want a measure with a tendency to:

  • be more similar between patches of similar shape
  • be more similar between patches of similar content (similar subparts of the image)
  • still tolerate slight distortion in shapes and pixel values
  • can be but does not have to be more similar for shapes of similar size
share|improve this question
Can you give an example image? Without the binarisation, perceptual hashes would be vectors of DCT coefficients, and comparison would be a distance measure. – geometrikal Nov 16 '12 at 23:07
@geometrikal I opened this question as a response to the comments in the linked answer. The answer got me thinking ahead to something I might need in a few months, and what I wanted to ask was out of the scope of that question. So, I opened a new one. But, I won't have example images in a while, sorry :( – penelope Nov 17 '12 at 11:51
@penelope Quick note: I liked your answers on the previous question, they were quite good! Anyway...for your irregular patches, would you be able to fit a contour (of arbitrary degree) to your irregular patches, hash the contour, and then construct a texture hash using, for example, a shape-adaptive DCT approach? Smash them together into one hash afterwards? – Eric Nov 23 '12 at 23:31
@Eric Nope, not really for contours. They would probably be patches (or merged patches) determined by some (fine) segmenting technique. So, on a fine level, (median) color, area, and maybe elongation are okay, but when I merge them using various criteria, they become less homogeneous so I would need something more complex. – penelope Nov 26 '12 at 9:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.