This paper presents a system for pedestrian detection and tracking by using image processing techniques. It is an important task to protect pedestrians from impact, so we have to detect pedestrians fast and automatically. We propose a method which combines the pedestrian model and the walking rhythm of pedestrians. By using these spatial and temporal information, the detecting result will be accurate. And the technique of dynamical graph matching is used to track pedestrians. It is possible to inform the driver of the situation of the crossing by cooperating the techniques of communication, and the driver will have abundant time to cope with the traffic conditions. The safety of pedestrians can be ensured.