1. A method of generating a compact representation of a digital image, the method comprising: dividing the digital image into a plurality of cells; identifying a minimum intensity region in each cell in each set of the plurality of cells; identifying a maximum intensity region in each cell in each set of the plurality of cells; generating cell representation data for each cell in each set of cells based on the positions of the minimum intensity region and the maximum intensity region in that cell; and generating a representation of the digital image, the representation including the cell representation data.