1. A method of processing a digital image, comprising: populating a bilateral grid comprising a plurality of cells, based on information obtained from the image, each cell comprising at least one value; cumulatively integrating the at least one value over the bilateral grid to form an integrated grid comprising integrated values; and generating a modified bilateral grid, comprising computing the sum of the at least one value over a predetermined rectangular box of cells of the bilateral grid, by using the integrated values corresponding to the corners of the box.