Vision-based vehicle detection and segmentation in intelligent transportation systems, particularly under outdoor illuminations, camera vibration, cast shadows and vehicle variations is still an area of active research for analysis and processing of traffic data. This paper proposes an effective scheme that improves Gaussian mixture model (GMM) for non-stationary temporal distributions through dynamically updating the learning rate at each pixel. In this proposed technique, sleeping foreground pixels and slow moving vehicles cannot become the part of background model that also does not lead to extra computational cost as compare to other methods that are proposed in the literature. Sudden illumination change is also captured in this technique. Vision based system cannot be efficient without fixing of camera vibration, so movement of camera is adjusted based on clues from background model. At the end, shadows are removed from detected vehicles through applying a new recursive method in dark regions. Experimental results demonstrate the robustness and high level performance of the proposed adaptive foreground extraction algorithm under illumination variations compared to state-of-the-art methods.