1. A method of controlling a lighting system including a set of lighting devices for lighting an environment, the method including:receiving from at least one image sensor an image signal including a sequence of images of said environment under different conditions of illumination and light reflection,
processing said image signal to provide a light source identification signal representative of light sources affecting said environment, and
controlling said set of lighting devices as a function of said light source identification signal,
wherein processing said image signal includes:
extracting illumination conditions of said environment from said sequence of images to provide shading information, and
identifying a number of said light sources affecting said environment by linear dimensionality reduction.