Camera lens quality control test method and system based on machine vision

Through the quality control testing method of camera lenses based on machine vision, the problems of low human detection efficiency and low accuracy are solved, efficient and accurate glue filling quality monitoring and real-time parameter adjustment are achieved, and the lens quality is ensured.

CN119056694AInactive Publication Date: 2024-12-03SHENZHEN RUI EURO OPTICAL ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410923488.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-12-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the glue filling defects of camera lenses rely on manpower to detect low efficiency and low accuracy, and cannot be corrected in real time, resulting in unavailable quality.

Method used

采用基于机器视觉的摄像头镜片品控测试方法,通过获取和预处理灌胶成品图像,建立显示图像模型,分析是否存在多胶、少胶或断胶,并调整灌胶出液速度和移动速度, The bubbles were detected using side light images and centrifuged.

Benefits of technology

It improves detection efficiency and accuracy, and can monitor and adjust glue filling parameters in real time to avoid glue filling problems and meet production needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119056694A_ABST
    Figure CN119056694A_ABST
Patent Text Reader

Abstract

The invention discloses a camera lens quality control test method and system based on machine vision, and relates to the technical field of camera lens processing, and the method comprises the steps: carrying out the preprocessing of a glue pouring finished product image, and obtaining a preprocessed image; establishing a glue pouring display image model; analyzing the pre-processed image, and judging whether the glue-filled finished product contains more glue or less glue; analyzing the pre-processed image, and judging whether the glue filling finished product has a glue breaking condition or not; and obtaining a first side light image of the glue-filled finished product, analyzing the first side light image, and judging whether the glue-filled finished product contains bubbles or not. Through the arrangement of the glue pouring quality detection module, the glue pouring liquid outlet speed adjustment module, the glue pouring moving speed adjustment module and the centrifugal treatment module, the detection efficiency and the detection precision are high, multiple glue finished products can be detected at the same time, the existing glue pouring problem can be found in time, glue pouring parameters can be adjusted in time according to the glue pouring problem, and the production efficiency is improved. And in the subsequent glue filling process, the detected glue filling problem is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of camera lens processing, and in particular to a camera lens quality control test method and system based on machine vision. Background Art

[0002] When producing camera lenses, glue needs to be poured, and then cooled and formed to form camera lenses. Camera lenses are precision optical devices, so the quality of glue pouring is crucial to the quality control of camera lenses. In actual production, due to the influence of various factors, the glue produced may contain bubbles, broken glue strips, and too much or too little glue. Therefore, in various occasions where glue pouring is required to achieve a connection effect, it is extremely important to strictly control the quality control of glue pouring.

[0003] It is obviously unreasonable to rely on manpower to detect glue filling defects. Due to its large workload, low efficiency, and low detection accuracy, it can no longer meet actual production needs. At the same time, manual inspection cannot correct the glue filling parameters in real time, resulting in the quality of the camera lens cannot be guaranteed. Summary of the invention

[0004] In order to solve the above technical problems, a camera lens quality control test method and system based on machine vision are provided. This technical solution solves the problem proposed in the above background technology that it is obviously unreasonable to rely on manpower to detect glue pouring defects. Due to its large workload, low efficiency and low detection accuracy, it can no longer meet actual production needs. At the same time, manual inspection cannot perform real-time correction of glue pouring parameters.

[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is: A camera lens quality control test method based on machine vision, comprising: Acquire the finished glue-filling product image during the glue-filling process, and pre-process the finished glue-filling product image. During the pre-processing, the finished glue-filling product image is denoised, and the finished glue-filling product image is binarized to obtain a pre-processed image; Establish glue-filling display image model; According to the glue pouring display image model, the pre-processed image is analyzed to determine whether the glue pouring product has too much glue or too little glue. If so, the glue pouring liquid discharge speed is adjusted according to the situation of too much glue or too little glue. If not, no processing is performed; Analyze the pre-processed image to determine whether the glue-filled finished product is broken. If so, adjust the moving speed of the glue-filling head and adjust the glue-filling liquid output speed for the second time. If not, do nothing. A first side-light image of the finished glue-filled product is obtained, and the first side-light image is analyzed to determine whether the finished glue product contains bubbles. If so, the colloid waiting for glue filling is centrifuged, and the colloid waiting for glue filling is monitored in real time to obtain a second side-light image, and the second side-light image is analyzed until there are no bubbles in the colloid waiting for glue filling. If not, no treatment is performed.

[0006] Preferably, the establishment of the glue-filling display image model comprises the following steps: Get the thickness range of the finished glue filling product during the actual glue filling process; Dividing the thickness range into equal parts at a preset interval to obtain at least one equal division point; Obtain a glue-filled sample with a thickness equal to the value of the equal-division point, and obtain a sample image of the glue-filled sample; All the glue-filled samples are matched one by one with the sample images, and the glue-filled display image model is obtained.

[0007] Preferably, the analyzing the pre-processed image to determine whether the glue-filled finished product has too much glue or too little glue comprises the following steps: Obtain the sample volume of qualified glue-filled finished products; Performing block processing on the preprocessed image to obtain at least one partition comparison block; Accumulating and averaging the chromaticity of the partition comparison block to obtain a first average chromaticity of the partition comparison block; In the glue-filling display image model, the second average chromaticity of each sample image is calculated, and the sample image with the smallest difference between the second average chromaticity and the first average chromaticity is obtained, and the thickness of the sample image is used as the thickness of the partition comparison block; Perform contour recognition on the partition comparison block to obtain the area of ​​the partition comparison block; The volume of the partition comparison block is calculated using the thickness of the partition comparison block and the area of ​​the partition comparison block; Accumulate the volumes of all partitioned comparison blocks in the preprocessed image to obtain the actual volume of the finished glue-filled product; The actual volume of the glue-filled finished product is compared with the sample volume of the qualified glue-filled finished product. If the actual volume of the glue-filled finished product is larger than the sample volume of the qualified glue-filled finished product, it is judged to be too much glue; if the actual volume of the glue-filled finished product is smaller than the sample volume of the qualified glue-filled finished product, it is judged to be too little glue.

[0008] Preferably, the adjusting of the glue pouring liquid discharge speed according to the situation of too much glue or too little glue comprises the following steps: when it is judged that there is too much glue, the actual volume of the glue pouring product is subtracted from the sample volume of the qualified glue pouring product to obtain the adjusted volume; Get the actual proportion of the adjusted volume in the actual volume of the finished glue-filled product; Reduce the glue filling and liquid discharge speed according to the actual proportion; If it is judged that there is insufficient glue, the sample volume of the qualified glue-filled finished product is subtracted from the actual volume of the glue-filled finished product to obtain the adjusted volume; Get the actual proportion of the adjusted volume in the actual volume of the finished glue-filled product; Increase the glue filling and liquid discharge speed according to the actual proportion.

[0009] Preferably, the analyzing of the pre-processed image to determine whether the glue-filled finished product is broken comprises the following steps: Get the chromaticity of the pixels of the preprocessed image; Statistical glue filling display image model sample image chromaticity range; Obtain pixel points in the preprocessed image whose chromaticity exceeds the chromaticity range of the sample image to form a suspected glue break set; If the suspected glue break set is an empty set, then the glue product has no glue break; If not, the finished glue product will be broken.

[0010] Preferably, the adjusting the moving speed of the glue pouring head and the secondary adjustment of the glue pouring liquid discharge speed include the following steps: Using the preset interval as the adjustment interval, the moving speed of the glue filling head is reduced; After each adjustment, the adjusted colloid is obtained, and it is judged whether the adjusted colloid is broken. The judging steps are the same as the steps for judging whether the glue-filled finished product is broken. If it is determined that the colloid is broken during adjustment, continue to adjust until the colloid is no longer broken, and obtain the real-time moving speed of the glue filling head; Compare the real-time moving speed with the moving speed to obtain the adjustment ratio; The real-time moving speed is used as the moving speed of the glue filling head; The glue pouring liquid discharge speed is multiplied by the adjustment ratio to obtain the glue pouring adjusted liquid discharge speed. When the glue pouring liquid discharge speed is adjusted for the second time, the liquid discharge speed is converted into the glue pouring adjusted liquid discharge speed.

[0011] Preferably, the step of obtaining the first side-light image of the finished glue-filled product comprises the following steps: The lateral light is emitted from the side to the glue-filled finished product, the intensity of the lateral light is kept constant, the distance between the lateral light and the glue-filled finished product is kept constant, and the direction of the lateral light is horizontal; A first side-light image is acquired from a side of the glue-filled finished product that is different from the side light.

[0012] Preferably, the step of analyzing the first side light image to determine whether the finished adhesive product contains bubbles comprises the following steps: Obtaining an average chromaticity of the first side-light image; Performing contour recognition in the first side-light image to obtain at least one suspected bubble contour as a suspected bubble set; Performing horizontal segmentation on the suspected bubble contours in the suspected bubble set, dividing the suspected bubble contours into an upper half and a lower half; Fit the upper part to obtain the first fitting function; The second-order derivative of the first fitting function is calculated. If the second-order derivative is not always less than 0 in the upper half, it is determined that the suspected bubble contour is not a bubble, and the suspected bubble contour is deleted from the suspected bubble set. If not, fit the lower half to obtain the second fitting function; The second-order derivative of the second fitting function is calculated. If the second-order derivative is not always greater than 0 in the lower half, the suspected bubble contour is judged to be not a bubble, and the suspected bubble contour is deleted from the suspected bubble set. If not, the suspected bubble contour is judged to be a bubble, and the suspected bubble contour is retained in the suspected bubble set. After the suspected bubble outline traverses the suspected bubble set, if the suspected bubble set is an empty set, the finished glue product does not contain bubbles; otherwise, the finished glue product contains bubbles.

[0013] Preferably, the step of analyzing the second side-light image is consistent with the step of analyzing the first side-light image.

[0014] A camera lens quality control test system based on machine vision, used to implement the above-mentioned camera lens quality control test method based on machine vision, comprising: An image acquisition module, wherein the image acquisition module acquires an image of a finished glue-filling product during the glue-filling process and acquires a first side-light image of the finished glue-filling product; An image preprocessing module, wherein the image preprocessing module removes noise from the glue-filled finished product image and performs binarization processing on the glue-filled finished product image to obtain a preprocessed image; A model building module, wherein the model building module builds a glue-filled display image model; A glue pouring quality detection module, which determines whether the glue pouring product has too much glue or too little glue, whether the glue pouring product is broken, and whether the glue pouring product contains bubbles; A glue pouring liquid discharge speed adjustment module, wherein the glue pouring liquid discharge speed adjustment module adjusts the glue pouring liquid discharge speed; A glue pouring moving speed adjustment module, which adjusts the moving speed of the glue pouring head; A centrifugal processing module is used to centrifuge the colloid waiting for glue filling.

[0015] Compared with the prior art, the present invention has the following beneficial effects: By setting up a glue pouring quality detection module, a glue pouring liquid speed adjustment module, a glue pouring movement speed adjustment module and a centrifugal processing module, visual inspection can be used to monitor problems that are likely to occur in the glue pouring process. The inspection has high efficiency and accuracy, and multiple colloid finished products can be inspected at the same time, avoiding the disadvantages of manual inspection. In addition, existing glue pouring problems can be discovered in time, and glue pouring parameters can be adjusted in time according to the glue pouring problems, thereby avoiding the detected glue pouring problems in the subsequent glue pouring process. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flow chart of the camera lens quality control test method based on machine vision of the present invention; Figure 2 A schematic diagram of the process of establishing a glue-filling display image model according to the present invention; Figure 3 This is a schematic diagram of the process of analyzing the preprocessed image and judging whether the glue-filled finished product has too much glue or too little glue in the present invention; Figure 4 It is a schematic diagram of a flow chart of adjusting the glue pouring and liquid discharge speed according to the situation of too much glue or too little glue in the present invention; Figure 5 This is a schematic diagram of the process of analyzing the pre-processed image to determine whether the glue-filled finished product is broken; Figure 6 The present invention is a schematic diagram of a process for adjusting the moving speed of the glue pouring head and performing a secondary adjustment on the glue pouring liquid discharge speed; Figure 7 This is a schematic diagram of the process of obtaining a first side-light image of a glue-filled finished product according to the present invention; Figure 8 This is a schematic diagram of the process of analyzing the first side light image to determine whether the finished glue product contains bubbles. DETAILED DESCRIPTION

[0017] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.

[0018] Reference Figure 1 As shown, a camera lens quality control test method based on machine vision includes: Acquire the finished glue-filling product image during the glue-filling process, and pre-process the finished glue-filling product image. During the pre-processing, the finished glue-filling product image is denoised, and the finished glue-filling product image is binarized to obtain a pre-processed image; Establish glue-filling display image model; According to the glue pouring display image model, the pre-processed image is analyzed to determine whether the glue pouring product has too much glue or too little glue. If so, the glue pouring liquid discharge speed is adjusted according to the situation of too much glue or too little glue. If not, no processing is performed; Analyze the pre-processed image to determine whether the glue-filled finished product is broken. If so, adjust the moving speed of the glue-filling head and adjust the glue-filling liquid output speed for the second time. If not, do nothing. A first side-light image of the finished glue-filled product is obtained, and the first side-light image is analyzed to determine whether the finished glue product contains bubbles. If so, the colloid waiting for glue filling is centrifuged, and the colloid waiting for glue filling is monitored in real time to obtain a second side-light image, and the second side-light image is analyzed until there are no bubbles in the colloid waiting for glue filling. If not, no treatment is performed.

[0019] Reference Figure 2 As shown, establishing the glue-filling display image model includes the following steps: Get the thickness range of the finished glue filling product during the actual glue filling process; Dividing the thickness range into equal parts at a preset interval to obtain at least one equal division point; Obtain a glue-filled sample with a thickness equal to the value of the equal-division point, and obtain a sample image of the glue-filled sample; All the glue-filling samples are matched with the sample images one by one, and the glue-filling display image model is obtained; The glue-casting display image model can be used to obtain the thickness of the glue-casting product through planar analysis of the image. The reason is that the intensity of light reflected by glue-casting products of different thicknesses is different, so the resulting images are different. Therefore, sample images of glue-casting samples of different thicknesses can be used for comparative analysis. When the preset spacing is small enough, there are enough equal-division points, and the accuracy of the sample image used for comparison in approximating the actual image is high enough to meet actual analysis needs.

[0020] Reference Figure 3 As shown, analyzing the pre-processed image to determine whether the finished glue-filled product has too much glue or too little glue includes the following steps: Obtain the sample volume of qualified glue-filled finished products; Performing block processing on the preprocessed image to obtain at least one partition comparison block; Accumulating and averaging the chromaticity of the partition comparison block to obtain a first average chromaticity of the partition comparison block; In the glue-filling display image model, the second average chromaticity of each sample image is calculated, and the sample image with the smallest difference between the second average chromaticity and the first average chromaticity is obtained, and the thickness of the sample image is used as the thickness of the partition comparison block; Perform contour recognition on the partition comparison block to obtain the area of ​​the partition comparison block; The volume of the partition comparison block is calculated using the thickness of the partition comparison block and the area of ​​the partition comparison block; Accumulate the volumes of all partitioned comparison blocks in the preprocessed image to obtain the actual volume of the finished glue-filled product; Compare the actual volume of the glue-filled finished product with the sample volume of the qualified glue-filled finished product. If the actual volume of the glue-filled finished product is larger than the sample volume of the qualified glue-filled finished product, it is judged to be too much glue. If the actual volume of the glue-filled finished product is smaller than the sample volume of the qualified glue-filled finished product, it is judged to be too little glue. If the actual volume of the finished glue-filled product is consistent with the sample volume of the qualified finished glue-filled product, the finished glue-filled product does not have too much glue or too little glue; Using the block method, the first average chromaticity is used to approximate each partition comparison block, and the sample image closest to the partition comparison block is used for estimation. The thickness of the sample image is used as the partition comparison block, and the volume of the partition comparison block can be calculated. The volume of the finished glue-filled product can be obtained by accumulation. According to the sample volume of the qualified finished glue-filled product, the situation of too much glue or too little glue can be judged.

[0021] Reference Figure 4 As shown, according to the situation of too much glue or too little glue, adjusting the glue pouring and liquid discharge speed includes the following steps: When it is judged that there is too much glue, the actual volume of the glue-filled finished product is subtracted from the sample volume of the qualified glue-filled finished product to obtain the adjusted volume; Get the actual proportion of the adjusted volume in the actual volume of the finished glue-filled product; Reduce the glue filling and liquid discharge speed according to the actual proportion; If it is judged that there is insufficient glue, the sample volume of the qualified glue-filled finished product is subtracted from the actual volume of the glue-filled finished product to obtain the adjusted volume; Get the actual proportion of the adjusted volume in the actual volume of the finished glue-filled product; Increase the glue filling and liquid discharge speed according to the actual proportion; If there is too much glue, the glue pouring liquid discharge speed needs to be reduced. The reduction ratio ensures that after the reduction, the actual volume of the glue pouring product is consistent with the sample volume of the qualified glue pouring product. Less glue increases the glue discharge speed, and the increase ratio ensures that after the increase, the actual volume of the glue-filled finished product is consistent with the sample volume of the qualified glue-filled finished product.

[0022] Reference Figure 5 As shown, analyzing the pre-processed image to determine whether the glue-filled finished product is broken includes the following steps: Get the chromaticity of the pixels of the preprocessed image; Statistical glue filling display image model sample image chromaticity range; Obtain pixel points in the preprocessed image whose chromaticity exceeds the chromaticity range of the sample image to form a suspected glue break set; If the suspected glue break set is an empty set, then the glue product has no glue break; If not, the finished glue product will be broken; Glue breakage means that there is no glue injection at that location. Therefore, the chromaticity of that location must be outside the chromaticity range of the existing glue injection situation, so it is possible to determine whether glue breakage has occurred.

[0023] Reference Figure 6 As shown, adjusting the moving speed of the glue filling head and performing secondary adjustment on the glue filling liquid discharge speed includes the following steps: Using the preset interval as the adjustment interval, the moving speed of the glue filling head is reduced; After each adjustment, the adjusted colloid is obtained, and it is judged whether the adjusted colloid is broken. The judging steps are the same as the steps for judging whether the glue-filled finished product is broken. If it is determined that the colloid is broken during adjustment, continue to adjust until the colloid is no longer broken, and obtain the real-time moving speed of the glue filling head; Compare the real-time moving speed with the moving speed to obtain the adjustment ratio; The real-time moving speed is used as the moving speed of the glue filling head; The glue pouring liquid discharge speed is multiplied by the adjustment ratio to obtain the glue pouring adjusted liquid discharge speed. When the glue pouring liquid discharge speed is adjusted for the second time, the liquid discharge speed is converted into the glue pouring adjusted liquid discharge speed. The glue breaking is caused by the glue filling head moving too fast, which leads to glue breaking. Therefore, the moving speed needs to be reduced. However, after adjustment, when the real-time moving speed is obtained as the moving speed of the glue pouring head, the glue pouring liquid discharge speed needs to be changed accordingly, otherwise the thickness of the glue pouring will increase and excessive glue will occur.

[0024] Reference Figure 7 As shown, obtaining the first side-light image of the glue-filled finished product includes the following steps: The lateral light is emitted from the side to the glue-filled finished product, the intensity of the lateral light is kept constant, the distance between the lateral light and the glue-filled finished product is kept constant, and the direction of the lateral light is horizontal; Acquire a first side-light image from a side of the glue-filled finished product that is different from the side light; Using light that penetrates the finished glue-filled product can better capture the shape of the bubbles. Otherwise, the image captured using reflected light from the front will affect the judgment of the existence of bubbles.

[0025] Reference Figure 8 As shown, analyzing the first side light image to determine whether the finished adhesive product contains bubbles includes the following steps: Obtaining an average chromaticity of the first side-light image; Performing contour recognition in the first side-light image to obtain at least one suspected bubble contour as a suspected bubble set; Performing horizontal segmentation on the suspected bubble contours in the suspected bubble set, dividing the suspected bubble contours into an upper half and a lower half; Fit the upper part to obtain the first fitting function; The second-order derivative of the first fitting function is calculated. If the second-order derivative is not always less than 0 in the upper half, it is determined that the suspected bubble contour is not a bubble, and the suspected bubble contour is deleted from the suspected bubble set. If not, fit the lower half to obtain the second fitting function; The second-order derivative of the second fitting function is calculated. If the second-order derivative is not always greater than 0 in the lower half, the suspected bubble contour is judged to be not a bubble, and the suspected bubble contour is deleted from the suspected bubble set. If not, the suspected bubble contour is judged to be a bubble, and the suspected bubble contour is retained in the suspected bubble set. After the suspected bubble outline traverses the suspected bubble set, if the suspected bubble set is an empty set, the finished glue product does not contain bubbles, if not, the finished glue product contains bubbles; The bubble is a circular shape, so it is a convex curve. The segmentation method is used to segment the suspected bubble contour into the upper half and the lower half; Then the upper part must be a convex function. The property of a convex function is that its second-order derivative is always less than 0 in the domain. Therefore, anything that does not meet this condition is not a bubble. Then the lower part must be a convex function. The property of a convex function is that its second-order derivative is always greater than 0 in the domain. Therefore, anything that does not meet this condition is not a bubble. Bubbles are the ones that meet both of these conditions.

[0026] The step of analyzing the second side-light image is consistent with the step of analyzing the first side-light image.

[0027] A camera lens quality control test system based on machine vision, used to implement the above-mentioned camera lens quality control test method based on machine vision, comprising: An image acquisition module, wherein the image acquisition module acquires an image of a finished glue-filling product during the glue-filling process and acquires a first side-light image of the finished glue-filling product; An image preprocessing module, wherein the image preprocessing module removes noise from the glue-filled finished product image and performs binarization processing on the glue-filled finished product image to obtain a preprocessed image; A model building module, wherein the model building module builds a glue-filled display image model; A glue pouring quality detection module, which determines whether the glue pouring product has too much glue or too little glue, whether the glue pouring product is broken, and whether there are bubbles in the glue pouring product; a glue pouring liquid discharge speed adjustment module, which adjusts the glue pouring liquid discharge speed; A glue pouring moving speed adjustment module, which adjusts the moving speed of the glue pouring head; A centrifugal processing module is used to centrifuge the colloid waiting for glue filling.

[0028] The working process of the above-mentioned camera lens quality control test system based on machine vision is as follows: Step 1: The image acquisition module acquires the image of the finished glue filling product during the glue filling process, and the image preprocessing module preprocesses the image of the finished glue filling product. During the preprocessing, the image of the finished glue filling product is denoised and the image of the finished glue filling product is binarized to obtain a preprocessed image; Step 2: The model building module builds a glue-filling display image model; Step 3: According to the glue pouring display image model, the glue pouring quality detection module analyzes the pre-processed image to determine whether the glue pouring product has too much glue or too little glue. If so, the glue pouring liquid discharge speed adjustment module adjusts the glue pouring liquid discharge speed according to the situation of too much glue or too little glue. If not, no processing is performed; Step 4: Analyze the pre-processed image, and the glue pouring quality detection module determines whether the glue pouring product has glue breakage. If so, the glue pouring moving speed adjustment module adjusts the moving speed of the glue pouring head, and the glue pouring liquid speed adjustment module makes a secondary adjustment to the glue pouring liquid speed. If not, no processing is performed; Step 5: The image acquisition module acquires the first side light image of the finished glue-filled product, analyzes the first side light image, and the glue-filling quality detection module determines whether there are bubbles in the finished glue product. If so, the centrifugal processing module centrifuges the colloid waiting for glue filling, and monitors the colloid waiting for glue filling in real time. The image acquisition module obtains the second side light image, and the glue-filling quality detection module analyzes the second side light image until there are no bubbles in the colloid waiting for glue filling. If not, no processing is performed.

[0029] Furthermore, the present solution also proposes a storage medium on which a computer-readable program is stored. When the computer-readable program is called, the above-mentioned camera lens quality control test method based on machine vision is executed.

[0030] It is understandable that the storage medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; an optical medium, such as a DVD; or a semiconductor medium, such as a solid state drive (SSD).

[0031] To sum up, the advantages of the present invention are: by setting a glue pouring quality detection module, a glue pouring liquid speed adjustment module, a glue pouring movement speed adjustment module and a centrifugal processing module, visual inspection can be used to monitor problems that are likely to occur in the glue pouring process, with high detection efficiency and high detection accuracy. Multiple colloid finished products can be inspected at the same time, avoiding the disadvantages of manual inspection. In addition, existing glue pouring problems can be discovered in time, and glue pouring parameters can be adjusted in time according to the glue pouring problems, thereby avoiding the detected glue pouring problems in the subsequent glue pouring process.

[0032] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.

Claims

1. A camera lens quality control test method based on machine vision, It is characterized in that include: Acquire the finished glue-filling product image during the glue-filling process, and pre-process the finished glue-filling product image. During the pre-processing, the finished glue-filling product image is denoised, and the finished glue-filling product image is binarized to obtain a pre-processed image; Establish glue-filling display image model; According to the glue pouring display image model, the pre-processed image is analyzed to determine whether the glue pouring product has too much glue or too little glue. If so, the glue pouring liquid discharge speed is adjusted according to the situation of too much glue or too little glue. If not, no processing is performed; Analyze the pre-processed image to determine whether the glue-filled finished product is broken. If so, adjust the moving speed of the glue-filling head and adjust the glue-filling liquid output speed for the second time. If not, do nothing. A first side-light image of the finished glue-filled product is obtained, and the first side-light image is analyzed to determine whether the finished glue product contains bubbles. If so, the colloid waiting for glue filling is centrifuged, and the colloid waiting for glue filling is monitored in real time to obtain a second side-light image, and the second side-light image is analyzed until there are no bubbles in the colloid waiting for glue filling. If not, no treatment is performed.

2. According to the camera lens quality control test method based on machine vision according to claim 1, It is characterized in that The establishment of the glue-filling display image model comprises the following steps: Get the thickness range of the finished glue filling product during the actual glue filling process; Dividing the thickness range into equal parts at a preset interval to obtain at least one equal division point; Obtain a glue-filled sample with a thickness equal to the value of the equal-division point, and obtain a sample image of the glue-filled sample; All the glue-filled samples are matched one by one with the sample images, and the glue-filled display image model is obtained.

3. A camera lens quality control test method based on machine vision according to claim 2, It is characterized in that The analysis of the pre-processed image to determine whether the finished glue-filled product has too much glue or too little glue comprises the following steps: Obtain the sample volume of qualified glue-filled finished products; Performing block processing on the preprocessed image to obtain at least one partition comparison block; Accumulating and averaging the chromaticity of the partition comparison block to obtain a first average chromaticity of the partition comparison block; In the glue-filling display image model, the second average chromaticity of each sample image is calculated, and the sample image with the smallest difference between the second average chromaticity and the first average chromaticity is obtained, and the thickness of the sample image is used as the thickness of the partition comparison block; Perform contour recognition on the partition comparison block to obtain the area of ​​the partition comparison block; The volume of the partition comparison block is calculated using the thickness of the partition comparison block and the area of ​​the partition comparison block; Accumulate the volumes of all partitioned comparison blocks in the preprocessed image to obtain the actual volume of the finished glue-filled product; The actual volume of the glue-filled finished product is compared with the sample volume of the qualified glue-filled finished product. If the actual volume of the glue-filled finished product is larger than the sample volume of the qualified glue-filled finished product, it is judged to be too much glue; if the actual volume of the glue-filled finished product is smaller than the sample volume of the qualified glue-filled finished product, it is judged to be too little glue.

4. The camera lens quality control test method based on machine vision according to claim 3, It is characterized in that The method of adjusting the glue pouring and liquid discharge speed according to the situation of too much glue or too little glue comprises the following steps: When it is judged that there is too much glue, the actual volume of the glue-filled finished product is subtracted from the sample volume of the qualified glue-filled finished product to obtain the adjusted volume; Get the actual proportion of the adjusted volume in the actual volume of the finished glue-filled product; Reduce the glue filling and liquid discharge speed according to the actual proportion; If it is judged that there is insufficient glue, the sample volume of the qualified glue-filled finished product is subtracted from the actual volume of the glue-filled finished product to obtain the adjusted volume; Get the actual proportion of the adjusted volume in the actual volume of the finished glue-filled product; Increase the glue filling and liquid discharge speed according to the actual proportion.

5. A camera lens quality control test method based on machine vision according to claim 4, It is characterized in that The analysis of the pre-processed image to determine whether the glue-filled finished product has glue breakage includes the following steps: Get the chromaticity of the pixels of the preprocessed image; Statistical glue filling display image model sample image chromaticity range; Obtain pixel points in the preprocessed image whose chromaticity exceeds the chromaticity range of the sample image to form a suspected glue break set; If the suspected glue break set is an empty set, then the glue product has no glue break; If not, the finished glue product will be broken.

6. A camera lens quality control test method based on machine vision according to claim 5, It is characterized in that The step of adjusting the moving speed of the glue pouring head and performing secondary adjustment on the glue pouring liquid discharge speed comprises the following steps: Using the preset interval as the adjustment interval, the moving speed of the glue filling head is reduced; After each adjustment, the adjusted colloid is obtained, and it is judged whether the adjusted colloid is broken. The judging steps are the same as the steps for judging whether the glue-filled finished product is broken. If it is determined that the colloid is broken during adjustment, continue to adjust until the colloid is no longer broken, and obtain the real-time moving speed of the glue filling head; Compare the real-time moving speed with the moving speed to obtain the adjustment ratio; The real-time moving speed is used as the moving speed of the glue filling head; The glue pouring liquid discharge speed is multiplied by the adjustment ratio to obtain the glue pouring adjusted liquid discharge speed. When the glue pouring liquid discharge speed is adjusted for the second time, the liquid discharge speed is converted into the glue pouring adjusted liquid discharge speed.

7. A camera lens quality control test method based on machine vision according to claim 6, It is characterized in that The method of obtaining the first side-light image of the finished glue-filled product comprises the following steps: The lateral light is emitted from the side to the glue-filled finished product, the intensity of the lateral light is kept constant, the distance between the lateral light and the glue-filled finished product is kept constant, and the direction of the lateral light is horizontal; A first side-light image is acquired from a side of the glue-filled finished product that is different from the side light.

8. A camera lens quality control test method based on machine vision according to claim 7, It is characterized in that The analyzing of the first side light image to determine whether the finished adhesive product contains bubbles comprises the following steps: Obtaining an average chromaticity of the first side-light image; Performing contour recognition in the first side-light image to obtain at least one suspected bubble contour as a suspected bubble set; Performing horizontal segmentation on the suspected bubble contours in the suspected bubble set, dividing the suspected bubble contours into an upper half and a lower half; Fit the upper part to obtain the first fitting function; The second-order derivative of the first fitting function is calculated. If the second-order derivative is not always less than 0 in the upper half, it is determined that the suspected bubble contour is not a bubble, and the suspected bubble contour is deleted from the suspected bubble set. If not, fit the lower half to obtain the second fitting function; The second-order derivative of the second fitting function is calculated. If the second-order derivative is not always greater than 0 in the lower half, the suspected bubble contour is judged to be not a bubble, and the suspected bubble contour is deleted from the suspected bubble set. If not, the suspected bubble contour is judged to be a bubble, and the suspected bubble contour is retained in the suspected bubble set. After the suspected bubble outline traverses the suspected bubble set, if the suspected bubble set is an empty set, the finished glue product does not contain bubbles; otherwise, the finished glue product contains bubbles.

9. A camera lens quality control test method based on machine vision according to claim 8, It is characterized in that The step of analyzing the second side-light image is consistent with the step of analyzing the first side-light image.

10. A camera lens quality control test system based on machine vision, used to implement the camera lens quality control test method based on machine vision as claimed in any one of claims 1 to 9, It is characterized in that include: An image acquisition module, wherein the image acquisition module acquires an image of a finished glue-filling product during the glue-filling process and acquires a first side-light image of the finished glue-filling product; An image preprocessing module, wherein the image preprocessing module removes noise from the glue-filled finished product image and performs binarization processing on the glue-filled finished product image to obtain a preprocessed image; A model building module, wherein the model building module builds a glue-filled display image model; A glue pouring quality detection module, which determines whether the glue pouring product has too much glue or too little glue, whether the glue pouring product is broken, and whether the glue pouring product contains bubbles; A glue pouring liquid discharge speed adjustment module, wherein the glue pouring liquid discharge speed adjustment module adjusts the glue pouring liquid discharge speed; A glue pouring moving speed adjustment module, which adjusts the moving speed of the glue pouring head; A centrifugal processing module is used to centrifuge the colloid waiting for glue filling.