Surface defects that affect the quality of metals are an important factor. Machine vision systems commonly perform surface inspection, and feature extraction of defects is essential. The rapidity and universality of the algorithm are two crucial issues in actual application. A new method of feature extraction based on contourlet transform and kernel locality preserving projections is proposed to extract sufficient and effective features from metal surface images. Image information at certain direction is important to recognition of defects, and contourlet transform is introduced for its flexible direction setting. Images of metal surfaces are decomposed into multiple directional subbands with contourlet transform. Then features of all subbands are extracted and combined into a high-dimensional feature vector, which is reduced to a low-dimensional feature vector by kernel locality preserving projections. The method is tested with a Brodatz database and two surface defect databases from industrial surface-inspection systems of continuous casting slabs and aluminum strips. Experimental results show that the proposed method performs better than the other three methods in accuracy and efficiency. The total classification rates of surface defects of continuous casting slabs and aluminum strips are up to 93.55% and 92.5%, respectively.