We present an object detection system that is applied to detecting pedestrians in still images, without assuming any a priori knowledge about the image. The system works as follows: In a first stage a classifier examines each location in the image at different scales. Then in a second stage the system tries to eliminate false detections based on heuristics. The classifier is based on the idea that principal components analysis (PCA) can compress optimally only the kind of images that were used to compute the principal components (PCs), and that any other kind of images will not be compressed well using a few components. Thus the classifier performs separately the PCA from the positive examples and from the negative examples, when it needs to classify a new pattern it projects it into both sets of PCs and compares the reconstructions. The system is able to detect frontal and rear views of pedestrians, and usually can also detect side views of pedestrians despite not being trained for this task. Comparisons with other pedestrian detection systems are presented; our system has better performance in positive detection and in false detection rate.