1. A method for performing at least one driver assistance function, the method using a computerized system mounted on a moving vehicle, the computerized system including a camera and an image processor, wherein under control of the image processor the camera is adapted for capturing in real time a plurality of image frames of the environment in the field of view of the camera, the method comprising: partitioning a first portion of the image frames and a second portion of the image frames; for said first portion of the image frames, controlling a camera parameter based on ambient lighting conditions in the environment in the field of view of the camera; based on said camera parameter of said first portion of the image frames, setting a camera parameter of said second portion of the image frames; capturing the image frames; and transferring the image frames to the processor for processing of the at least one driver assistance function.