Abstract:In modern industrial production, the quality requirements for product parts are very strict. Often the performance of the product cannot be exerted due to the poor airtightness of a part. Therefore, high requirements are put forward for the airtightness test of the product. . Aiming at this problem, this paper designs a set of bubble detection system based on OpenCV, which can be used to achieve air tightness detection. In this paper, the relatively mature technology of photography is used as the basis to capture bubble images in real time. First, Gaussian filtering is used to remove the noise in the bubble image, and the binarization process is performed, and then the Canny edge detection algorithm based on the big law is used. The edge contour of the bubble is detected, and finally the bubble contour is filled by the image filling algorithm, and the volume of the bubble is calculated by the force analysis method. In order to verify the effectiveness of the system, this paper made a simple experimental device to determine whether the bubble detection system is effective. The experimental results show that the system based on the algorithm has high real-time performance, fast calculation speed, high accuracy and can reach more than 94% effectiveness.