1. A camera system including: an image sensor that is controlled by one or more camera parameters; and a pre-processing circuit adapted to associate weights respectively with cells of a grid, wherein the weights differ from the one or more camera parameters, wherein the cells respectively include a plurality of contiguous picture elements of the image sensor; wherein the pre-processing circuit is configured to adaptively change the weights responsive to changes in the scene being imaged by the image sensor; and wherein the pre-processing circuit is adapted to perform a weighted histogram by summing instances of a key over the cells of the grid, wherein the key includes the weights as a multiplicative factor.