Accurate automatic segmentation of the prostate in ultrasound images is still a challenging research problem. In this work, we propose the use of gray level images, constructed with a sample of gray level profiles perpendicular to the contour of the prostate. A two dimensional principal component analysis (2D PCA) was performed on a set of training contour images. The reconstruction error from the 2D PCA was used as an objective function for automatic adjustment of a point distribution model of the prostate. Our method was validated on 9 ultrasound images of the prostate and compared to the optimization of an objective function based on the mean Mahalanobis distance of a sampled gray level profile to the corresponding statistical profile model. Our new method based on a 2D PCA shows improved prostate segmentation results.