Size functions are functions from the real plane to thenatural numbers useful for describing shapes of objects. They allow to translate the problem of comparing shapes to the problem of comparing functions, that is a much simpler task. In order to perform the comparison between size functions we present a method to measure the energy necessary to deform size functions into each other. Minimizing such an energy allows for a measure of the similarity between shapes. Some experimental results concerning the comparison of free hand-drawn sketches are shown.