1. A method for calculating ambient light in a space, the method comprising: obtaining a top view 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; calculating ambient light in the space based on the weighted parameters; and modulating ambient light in the space based on the calculated ambient light.