Pedestrian detection, which has a wide application in surveillance, advanced robotics, and especially intelligent vehicles, is an important area in computer vision. This paper applies a detection approach based on improved Adaboost algorithm. We use a dataset to train the weak classifiers (with different numbers) to cascade to be strong classifiers, in which we employ optimized strategy of sample weight adjustment to reduce the over-fit. After constructing a strong classifier, we apply different scale of sliding widow to shift and calculate the corresponding features to classify them as pedestrians or non-pedestrians. The experiments show that different numbers of weak classifiers layer and different scale of sliding windows can give different performance in detecting.