1. A method for calculating ambient light in a space, the method comprising: obtaining an image of the space from an array of pixels; defining a plurality of pixel groups in the image; determining a representative parameter for each of the pixel groups; assigning a weight to each representative parameter; and calculating ambient light in the space based on the weighted parameters.