1. A method for generating a representation of an image comprising: receiving an image for which a representation is to be generated; partitioning the image into a plurality of regions; for each of the plurality of regions of the image, computing a runlength histogram; generating a representation of the image based on the runlength histograms, comprising concatenating the runlength histograms from the plurality of regions; and outputting the representation of the image.