According to the properties of steel images,this paper presents an automatic thresholding method of edge detection based on the properties of gray statistics and combined with texture detection and clustering analysis,automatic defect segmentation of steel images is successfully implemented.The experiment result shows that this method possesses the advantage precision and speed and is useful for the real-time defect segmentation for steel surface image.