a self-adapting weight method is proposed to update the background model to fit the complex changes in the traffic scene.The single Gaussian models are established in multi-channels for foreground extraction
and the probability distribution of pixels in the traffic scene is utilized to detect the moving region.After above operations
the traffic flow is calculated by the result of detection finally.The proposed method is not only to detect moving vehicles and calculate traffic flow effectively but also is robust to illumination changes