Three-dimensional measurement and defect detection is an effective guarantee for improving the product quality. In this paper, we present a new 3-D overall measurement method using only one image, which can be effectively used in the defect detection. Compared with the former defect technology, such as the eddy current technology, the leakage of magnetic technology, the infrared technology, and the radial technology, our defect detection method is low cost, easy to operate, and can be expanded widely. The main device in the detection system is a CCD. When fixed the CCD in the workstation, CCD can capture the image of each workpiece. From the single image, we can get the three-dimensional data of the workpiece's shape ranged from 0 degrees to 180 degrees. Moreover, it can give an overall recognition of plane dimensions and depth information of the defect. The main working theory is, according to the 3D cues, "shading value" information left by single measurement image. According to shading, we can acquire the workpiece slant and tilt of every point's normal in the light source system of coordinates, and then transferring it to the image system of coordinates, calculating the depth information by slant and tilt. Compared with the former three-dimensional shape recovery method based on single image, this method has great improvement on the design of optical system, such as improving three-dimensional recovery accuracy and speed, with the simplification of the arithmetic, and first apply it to the industrial environment detection of defect. The three-dimensional detection method of defects, mentioned in this paper, has advantages of simple working pattern and workpiece configuration that just needs light source, CCD, image-collection card and computer, which greatly reduces the cost, and is good for use in industrial application.