In industrial production, machine vision is widely used in a variety of automated testing industry, because of its non-contact, high precision, fast detection time, etc. This paper introduces a nondestructive detection system for the outline dimensions of a kind of special workpiece. For the purpose of controlling the quality of image，an ultra-high-resolution monochrome CCD image sensor is adopted to capture source image. Then it’s image preprocessing, including image clipping processing, grey scale processing, image denoising, etc. Then it was the progress of edge extraction, using gradient operator to get its contour edge, then a piecewise fitting method to get the dimensions. This method achieves once measuring multiple outline dimensions without moving the workpiece. It has been used in industrial production. The result sees its practical value for meeting the production needs, with the advantages of high accuracy, fast speed high stability of the measurement system through experiments.