Piston ring is one of the most important parts in internal combustion engine, and the width of end gap is an important
parameter which should be detected one by one. In comparison to the previous measurements of end gap, a new efficient
detection method is presented based on computer vision and image processing theory. This paper describes the
framework and measuring principle of the measurement system. In which, the image processing algorithm is highlighted.
Firstly, the partial end gap image of piston ring is acquired by the area array CCD; secondly, the end gap edge contour
which is connected by single pixel is obtained by grayscale threshold segmentation, mathematical morphology contour
edge detection, contour trace and other image processing tools; finally, the distance between the two end gap edge
contour lines is calculated by using the least distance method of straight-line fitting. It has been proved by the repetitive
experiments that the measurement accuracy can reach 0.01mm. What's more, the detection efficiency of automatic
inspected instrument on parameters of piston ring based on this method can reach 10~12 pieces/min.