Multi-stage Sampling with Boosting Cascades for Pedestrian Detection in Images and Videos