This paper deals with an on-line mismachining error measurement for curve grinding based on digital image processing. Using CCD camera, the contour of the workpiece’s finished surface is captured and the image is preprocessed for denoising and edge detecting. The worktable is guided by the image of the finished workpiece to follow the path of the finished contour and then the real curve of the finished workpiece is measured by fitting a curve according to the moving path of the worktable. Finally, the machining error is obtained by comparing the measured curve with the theoretical curve of the workpiece. This method is applied to a CNC curve grinding machine MD9040. A measurement experiment is given. The experiment results show that the measurement method offers high detection precision and can be used in wide fields, especially for measuring the parts with complex curve.