Lens surface detection method and detection system based on visual identification

By analyzing the reflective and penetrating areas in lens images, obtaining their correlation, and adjusting the shooting angle, the problem of interference between reflective and penetrating areas in lens detection is solved, improving detection accuracy and system stability.

CN120833322APending Publication Date: 2025-10-24张小斌
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510994398.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

Existing vision-based lens surface inspection technologies are difficult to effectively reduce the interference from the image reflection and image penetration areas when dealing with the optical characteristics of lenses, resulting in decreased detection accuracy. Furthermore, the lack of angle adjustment methods to match lens characteristics affects the stability and reliability of the inspection system.

Method used

By analyzing the image reflection and image penetration areas in images captured by a polarization camera, their positional relationship and correlation are obtained, detection interference between adjacent reflection and penetration areas is identified, and the shooting angle is adjusted according to the correlation to reduce the probability of the appearance of image penetration areas.

Benefits of technology

It improves the accuracy of lens surface inspection, distinguishes between real defects and artifacts, enhances the stability and reliability of the inspection system, and meets the inspection needs of lenses with complex optical characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120833322A_ABST
    Figure CN120833322A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of optical visual inspection, and provides a visual identification-based lens surface detection method and detection system, which are used for detecting a plurality of lens images shot by a polarization camera, and respectively identifying an image reflection area and an image penetration area in each lens image. The correlation degree between the shooting angle and the image penetration area is analyzed, the position relation between the image reflection area and the image penetration area is obtained, the reflection adjacent penetration area is obtained, the detection interference degree of the reflection adjacent penetration area on the image reflection area is analyzed, and a basis is provided for parameter setting in a detection algorithm; and misjudgment on the surface of the lens caused by visual features similar to defects generated by reflecting adjacent penetration areas is avoided, and the detection accuracy of the surface of the lens is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of optical vision detection, and particularly relates to a lens surface detection method and system based on visual recognition. BACKGROUND

[0002] With the development of machine vision technology, lens surface detection methods based on visual recognition have gradually become mainstream. Such methods use image acquisition devices such as cameras to obtain lens surface images, and then analyze the images through image processing algorithms to identify defects on the lens surface. However, in actual applications, due to the optical properties of the lens, such as refraction and reflection, the captured lens images have complex light distribution. When a polarized camera is used to capture the lens image, image reflection zones and image penetration zones will appear in the image. The image reflection zone is the area formed by the reflection of light on the lens surface, while the image penetration zone is the area formed on the imaging plane after the light penetrates the lens. The existence of these two zones will have a significant impact on lens surface defect detection.

[0003] In the prior art, existing lens surface detection techniques based on visual recognition mainly rely on polarized cameras to capture lens images, and then analyze and process the images to detect defects on the lens surface. However, in the actual detection process, due to the optical properties of the lens, there will be image reflection zones and image penetration zones in the captured lens images. The image reflection zone is the area formed by the reflection of light on the lens surface, which may contain real defect information on the lens surface; while the image penetration zone is the area formed after the light penetrates the lens, which will interfere with the detection of the image reflection zone; Secondly, the degree of correlation between the shooting angle and the image penetration zone is often not fully considered. Under different shooting angles, the distribution and number of image penetration zones in the lens image will be different. If this correlation is not analyzed, it is difficult to accurately grasp the influence of the image penetration zone on the detection, and thus it is not possible to effectively reduce its interference with the detection of the image reflection zone, which can easily lead to misjudgment of defects on the lens surface and reduce the detection accuracy; Finally, the prior art does not further analyze whether the interference of different reflection adjacent penetration zones on the image reflection zone is consistent. The interference of reflection adjacent penetration zones with different positions and characteristics on the image reflection zone can be different, and if the difference is not distinguished, it is difficult to accurately identify the real defects and false images caused by the interference of reflection adjacent penetration zones, and when the image reflection zone on the lens surface is unevenly distributed due to the penetration zone, similar defect pseudo images are generated, and there is no effective solution. There is no method for adjusting the shooting angle according to the correlation between the shooting angle and the image penetration zone, which cannot reduce the probability of the image penetration zone, resulting in that the camera shooting angle does not match the lens surface characteristics, so that the detection system is not stable and reliable when facing complex optical characteristics of the lens, and it is difficult to meet the needs of high-precision lens surface detection. Therefore, it is of great practical significance to develop a lens surface detection method based on visual recognition which can solve the above problems.

[0004] Therefore, the present application provides a lens surface detection method and detection system based on visual recognition. SUMMARY

[0005] In order to make up for the shortcomings of the prior art and solve at least one technical problem proposed in the background art.

[0006] The technical scheme adopted by the present application to solve its technical problems is: A lens surface detection method based on visual recognition, comprising: detecting a plurality of lens images shot by a polarization camera, respectively identifying the image reflection zone and the image penetration zone in each lens image, and analyzing the correlation between the shooting angle and the image penetration zone; obtaining the positional relationship between the image reflection zone and the image penetration zone, obtaining the reflection adjacent penetration zone, and analyzing the detection interference degree of the reflection adjacent penetration zone on the image reflection zone; if the detection interference degree is large, analyze whether the interference of different reflection adjacent penetration zones on the image reflection zone is consistent; if consistent, adjust the shooting angle according to the correlation between the shooting angle and the image penetration zone, and reduce the probability of the image penetration zone.

[0007] As a further scheme of the present application, the identification and screening process of the image reflection zone and the image penetration zone is as follows: divide the target analysis image into a plurality of image analysis zones with equal area and regular shape according to a grid format; if the analysis zone pixel is greater than or equal to the analysis zone pixel threshold, it is identified as an image reflection zone; if the analysis zone pixel is less than the analysis zone pixel threshold, it is identified as an image penetration zone.

[0008] As a further scheme of the present application, the correlation degree between the shooting angle and the image penetration area is analyzed, and the process is as follows: The ratio of the number of the image penetration areas to the total number of the image analysis areas in the target analysis image is calculated to obtain a penetration area number ratio; The shooting angle when each target analysis image is shot is obtained, and the shooting angles are sorted from small to large, and the penetration area number ratio corresponding to each target analysis image is used to construct an angle-number correlation analysis curve; The end point coordinates on the angle-number correlation analysis curve are extracted, and a straight line is connected to fit a correlation analysis fitting line; The perpendicular distance from each coordinate point on the angle-number correlation analysis curve to the correlation analysis fitting line is obtained, and mean value calculation is performed to output a curve linear trend value; If the curve linear trend value is less than or equal to a curve linear trend threshold value, a linear trend signal is shown, adjacent coordinate points on the angle-number correlation analysis curve are combined to obtain a plurality of adjacent coordinate combinations, a unit change sub-slope corresponding to each adjacent coordinate combination is obtained, variance calculation is performed, and an angle penetration correlation value is obtained.

[0009] As a further scheme of the present application, the correlation degree between the shooting angle and the image penetration area is analyzed, and the process is as follows: If the angle penetration correlation value is less than or equal to an angle penetration correlation threshold value, a high correlation degree signal is displayed; If the angle penetration correlation value is greater than the angle penetration correlation threshold value, a low correlation degree signal is displayed.

[0010] As a further scheme of the present application, the reflection adjacent penetration area is obtained, and the detection interference of the reflection adjacent penetration area on the image reflection area is analyzed, and the process is as follows: In the target analysis image divided by the grid, the image penetration area adjacent to the image reflection area in the spatial dimension is obtained as the reflection adjacent penetration area; The reflection adjacent penetration area corresponding to each image reflection area is extracted, and the total number ratio of the reflection adjacent penetration area number to the image analysis area is obtained to obtain a reflection adjacent penetration number ratio; The image reflection area is equally divided into a plurality of image reflection sub-areas, the brightness of each image reflection sub-area is obtained, and a ratio calculation is performed with the image reflection sub-area brightness threshold value to obtain a reflection sub-area brightness; Based on the inner and outer line distances of the image reflection area, the plurality of image reflection sub-areas in the image reflection area are divided into inner image reflection sub-areas and outer image reflection sub-areas; The reflection sub-area brightness corresponding to any one inner image reflection sub-area is combined with the reflection sub-area brightness corresponding to one outer image reflection sub-area to obtain a plurality of inner and outer area brightness groups; Inputting the plurality of inner and outer brightness groups into the Euclidean distance model, and outputting inner and outer brightness difference values; Summing the reflection adjacent penetration quantity ratio and the inner and outer brightness difference values, and outputting a detection interference value.

[0011] As a further scheme of the present application, the detection interference degree evaluation process is as follows: If the detection interference value is greater than the detection interference threshold value, a large detection interference degree signal is displayed; If the detection interference value is less than or equal to the detection interference threshold value, a small detection interference degree signal is displayed.

[0012] As a further scheme of the present application, the inner and outer line distance acquisition method is as follows: The four edge lengths of the image reflection sub-region are extracted, and the sum of the average value after the addition is one-half, which is used as the inner and outer line distance.

[0013] As a further scheme of the present application, the process of analyzing whether the interference of different reflection adjacent penetration regions on the image reflection region is consistent is as follows: Each image reflection region and the corresponding reflection adjacent penetration region at different positions are taken as a detection interference group, and the reflection adjacent penetration quantity ratio corresponding to each detection interference group is extracted; The detection interference groups with the same reflection adjacent penetration quantity ratio are summarized as adjacent penetration quantity interference sequences; The reflection adjacent penetration quantity ratios corresponding to all adjacent penetration quantity interference sequences are compared in size, and each adjacent penetration quantity interference sequence is sorted in descending order to obtain an interference analysis list; An adjacent penetration quantity interference sequence is randomly selected from the interference analysis list as a target analysis sequence; The detection interference values corresponding to all detection interference groups in the target analysis sequence are calculated to obtain a detection interference standard deviation; The detection interference values corresponding to all detection interference groups in the target analysis sequence are calculated to obtain a detection interference mean value; The detection interference standard deviation and the detection interference mean value are input into a coefficient of variation calculation formula to obtain a degree consistency evaluation value; If the degree consistency evaluation value is greater than a degree consistency evaluation threshold value, a degree inconsistency signal is displayed; If the degree consistency evaluation value is less than or equal to the degree consistency evaluation threshold value, a degree consistency signal is displayed.

[0014] As a further scheme of the present application, the acquisition process of adjusting the shooting angle is as follows: If the signal is consistent, the unit change sub-slope corresponding to each adjacent coordinate combination is calculated by mean value, and the angle penetration coefficient is outputted; According to the detection interference threshold, a detection interference group less than or equal to the detection interference threshold is screened from a plurality of detection interference groups, and the corresponding reflection adjacent penetration quantity ratio is extracted for size comparison, and the detection interference group with the minimum reflection adjacent penetration quantity ratio is selected as the reference target group; The reflection adjacent penetration quantity ratio corresponding to the reference target group is calculated by ratio with the angle penetration coefficient, and the adjusted shooting angle is outputted.

[0015] A lens surface detection system based on visual recognition, comprising: A recognition analysis module: detecting a plurality of lens images after being shot by a polarization camera, recognizing an image reflection area and an image penetration area in each lens image, and analyzing the correlation between the shooting angle and the image penetration area; A detection interference evaluation module: obtaining the positional relationship between the image reflection area and the image penetration area, obtaining the reflection adjacent penetration area, and analyzing the detection interference degree of the reflection adjacent penetration area on the image reflection area; An interference consistency analysis module: if the detection interference degree is large, analyzing whether the interference of different reflection adjacent penetration areas on the image reflection area is consistent; A shooting angle adjustment module: if consistent, obtaining the adjusted shooting angle according to the correlation between the shooting angle and the image penetration area, and reducing the appearance probability of the image penetration area.

[0016] The beneficial effects of the present application are as follows: The present application detects a plurality of lens images after being shot by a polarization camera, recognizes an image reflection area and an image penetration area in each lens image, analyzes the correlation between the shooting angle and the image penetration area, obtains the positional relationship between the image reflection area and the image penetration area, obtains the reflection adjacent penetration area, and analyzes the detection interference degree of the reflection adjacent penetration area on the image reflection area, thereby providing a basis for parameter setting in the detection algorithm, avoiding the generation of similar defect visual features in the reflection adjacent penetration area, causing false judgment on the lens surface, and improving the detection accuracy of the lens surface. The application detects the interference degree, analyzes whether the interference of the reflection adjacent penetrating area on the image reflection area is consistent, helps to distinguish and identify the real defects and the false image caused by the interference of the reflection adjacent penetrating area, improves the accuracy of visual recognition detection on the lens surface, and further subdivides the quality level of the lens according to the consistency of the interference degree of the reflection adjacent penetrating area on the image reflection area. If the consistency is consistent, the shooting angle is adjusted according to the correlation degree between the shooting angle and the image penetrating area, the appearance probability of the image penetrating area is reduced, the problem that the light distribution of the reflection area on the lens surface is uneven due to the penetrating area, and similar defects are generated during detection is solved, the optimal shooting angle is selected to reduce the appearance probability of the penetrating area, the misjudgment of the real defects on the lens surface is avoided, the angle adjustment basis is provided for the detection algorithm, the camera shooting angle is matched with the lens surface characteristics, and the stability and reliability of the detection system are improved. BRIEF DESCRIPTION OF DRAWINGS

[0017] The application will be further described below with reference to the drawings.

[0018] Figure 1 is a step flow chart of a lens surface detection method based on visual recognition according to the application; Figure 2 is a schematic view of a lens surface detection system based on visual recognition according to the application; Figure 3 is a judgment flow chart of a lens surface detection method based on visual recognition according to the application. DETAILED DESCRIPTION

[0019] In order to make the technical means, creative features, purposes and effects of the application easy to understand, the application will be further described below with reference to the specific embodiments. Embodiment 1

[0020] Please refer to Figure 1 - Figure 2 A lens surface detection method based on visual recognition according to the embodiment of the application includes the following steps: Step 1: Detecting a plurality of lens images shot by a polarized camera, respectively identifying the image reflection area and the image penetrating area in each lens image, and analyzing the correlation degree between the shooting angle and the image penetrating area; It should be noted that each lens image shot by each polarized camera is shot at different shooting angles; In the preferred embodiment, an arbitrary lens image is selected as a target analysis image; The target analysis image is divided into a plurality of image analysis areas according to a grid format, wherein the area of each image analysis area is equal, and the shape of each image analysis area is a regular shape, for example, a square or a rectangle. Obtain pixel values ​​within each image analysis area as analysis area pixels; If the pixel value of the analysis area is greater than or equal to the pixel threshold of the analysis area, it means that the pixel value of the analysis area of ​​the analyzed image is high and is marked as the image reflection area; If the pixel value of the analysis area is less than the pixel threshold of the analysis area, it means that the pixel value of the analysis area of ​​the analyzed image is low and is marked as an image penetration area; Counting the ratio of the number of image penetration areas to the total number of image analysis areas divided in the target analysis image, to obtain the penetration area number ratio; Obtain the shooting angle of each target analysis image and sort them from small to large according to the shooting angle. Input the penetration area number ratio corresponding to each target analysis image into a two-dimensional coordinate system, where the X-axis is the shooting angle and the Y-axis is the penetration area number ratio. Construct an angle-number correlation analysis curve. Extract the coordinates of the endpoints of the angle quantity correlation analysis curve, connect them with straight lines, and fit them into a correlation analysis fitting line; It should be noted that the coordinates of the endpoints on the angle quantity correlation analysis curve are the starting point coordinates and the end point coordinates of the angle quantity correlation analysis curve respectively; Obtain the vertical distance from each coordinate point on the angle quantity correlation analysis curve to the correlation analysis fitting line, perform average calculation, and output the linear trend value of the curve; If the linear trend value of the curve is less than or equal to the linear trend threshold of the curve, it means that the overall trend of the angle quantity correlation analysis curve is close to linear, which is displayed as a linear trend signal; If the linear trend value of the curve is greater than the linear trend threshold of the curve, it means that the overall trend of the angle quantity correlation analysis curve is close to nonlinearity, which is displayed as a nonlinear trend signal; Based on the linear trend signal, adjacent coordinate points on the angle quantity correlation analysis curve are combined to obtain multiple adjacent coordinate combinations; Input two adjacent coordinate points in the adjacent coordinate combination into the slope formula, and output the unit change sub-slope; The variance of the unit change sub-slope corresponding to each adjacent coordinate combination is calculated and the output is the angle penetration correlation value; The angle penetration correlation value is compared with the angle penetration correlation threshold as follows: If the angle penetration correlation value is greater than the angle penetration correlation threshold, it means that the correlation between the shooting angle and the image penetration area is low, which is displayed as a low correlation signal; If the angle penetration correlation value is less than or equal to the angle penetration correlation threshold, it means that the correlation between the shooting angle and the image penetration area is high, which is displayed as a high correlation signal; Step two: obtain the positional relationship between the image reflection area and the image penetration area, obtain the reflection adjacent penetration area, and analyze the detection interference degree of the reflection adjacent penetration area to the image reflection area; In the preferred embodiment, in the target analysis image divided by the grid, the image penetration area adjacent to the image reflection area in the spatial dimension is obtained as the reflection adjacent penetration area; Extract the reflection adjacent penetration area corresponding to each image reflection area, and obtain the total number proportion of the reflection adjacent penetration area in the total number of image analysis areas to obtain the reflection adjacent penetration number ratio; Divide the image reflection area into several image reflection sub-areas, obtain the brightness of each image reflection sub-area, and perform ratio calculation with the image reflection sub-area brightness threshold value as the reflection sub-area brightness; It should be noted that the image reflection sub-area brightness threshold value is represented as the image reflection sub-normal brightness, which is set by a person skilled in the art; Based on the inner-outer line distance of the image reflection area, the several image reflection sub-areas in the image reflection area are divided into inner image reflection sub-areas and outer image reflection sub-areas; Among them, the inner image reflection sub-area is represented as: taking the image reflection area as the center and the inner-outer line distance as the radius to draw an inner circle, and the image reflection sub-area within the inner circle is the inner image reflection sub-area; Similarly, the outer image reflection sub-area is represented as: taking the image reflection area as the center and the inner-outer line distance as the radius to draw an inner circle, and the image reflection sub-area outside the inner circle is the outer image reflection sub-area; The inner-outer line distance is obtained as follows: Extract the four side lengths of the image reflection sub-area, and perform one-half of the sum and mean calculation after addition to obtain the inner-outer line distance; Further, the image reflection sub-area whose inner-outer line distance exceeds the distance from the inner vertex to the center point of the image reflection sub-area is the inner image reflection sub-area, and the image reflection sub-area whose inner-outer line distance does not exceed the distance from the inner vertex to the center point of the image reflection sub-area is the outer image reflection sub-area; For example, the difference between the adjacent two side lengths of the image reflection sub-area is in the range of (3, 5); Combine the reflection sub-area brightness corresponding to any one inner image reflection sub-area with the reflection sub-area brightness corresponding to one outer image reflection sub-area to obtain multiple inner-outer area brightness groups; Input the multiple inner-outer brightness groups into the Euclidean distance model to output the inner-outer brightness difference value; Sum the reflection adjacent penetration number ratio and the inner-outer brightness difference value to output the detection interference value; It can be understood that the meaning represented by the detection interference value is that it reflects the interference degree of the reflection adjacent penetration area on the image reflection area detection. On the one hand, the reflection adjacent penetration quantity ratio from the quantity angle reflects the interference range size of the penetration area on the reflection area, and on the other hand, the internal and external brightness difference value reflects the inconsistency of the brightness characteristics of the image reflection area, which may be related to the existence of the reflection adjacent penetration area, because the penetration area may affect the light distribution around the reflection area, and then affect the brightness of different positions in the reflection area. The detection interference value is compared with the detection interference threshold value, and the process is as follows: If the detection interference value is greater than the detection interference threshold value, it means that the relative quantity proportion of the reflection adjacent penetration area in the image is relatively high, and the brightness difference of different positions in the image reflection area is also large, which shows a large signal of the detection interference degree. If the detection interference value is less than or equal to the detection interference threshold value, it means that the relative quantity proportion of the reflection adjacent penetration area in the image is relatively low, and the brightness difference of different positions in the image reflection area is also small, which shows a small signal of the detection interference degree. The specific scheme of the embodiment is: detecting a plurality of lens images after being shot by a polarization camera, identifying the image reflection area and the image penetration area in each lens image respectively, analyzing the correlation degree between the shooting angle and the image penetration area, obtaining the positional relationship between the image reflection area and the image penetration area, obtaining the reflection adjacent penetration area, and analyzing the detection interference degree of the reflection adjacent penetration area on the image reflection area, to provide a basis for parameter setting in the detection algorithm, avoid the reflection adjacent penetration area from generating similar visual features of defects, cause misjudgment on the lens surface, and improve the detection accuracy of the lens surface. Embodiment 2

[0021] Please refer to Figure 1 - Figure 2 As shown in FIG. 1, the lens surface detection method based on visual recognition provided by the embodiment of the application comprises the following steps: Step three: if the detection interference degree is large, whether the interference of different reflection adjacent penetration areas on the image reflection area is consistent is analyzed. In a preferred embodiment, each image reflection area and the corresponding reflection adjacent penetration area at different positions are taken as a detection interference group, and the reflection adjacent penetration quantity ratio corresponding to each detection interference group is extracted. The detection interference groups with the same reflection adjacent penetration quantity ratio are induced into the same adjacent penetration quantity interference sequence. The reflection adjacent penetration quantity ratios corresponding to all the same adjacent penetration quantity interference sequences are compared in size, and each adjacent penetration quantity interference sequence is sorted in descending order to obtain an interference analysis list. In the interference analysis list, an arbitrary adjacent penetration number interference sequence is selected as a target analysis sequence; The standard deviation of the detection interference values corresponding to all detection interference groups in the target analysis sequence is calculated, and the detection interference standard deviation is output; The mean value of the detection interference values corresponding to all detection interference groups in the target analysis sequence is calculated, and the detection interference mean value is output; The detection interference standard deviation and the detection interference mean value are input into the coefficient of variation calculation formula, and the degree consistency evaluation value is output ; Specifically, the coefficient of variation calculation formula is: , wherein represents the detection interference standard deviation, represents the detection interference mean value; It can be understood that the meaning represented by the degree consistency evaluation value is to measure the consistency of the interference degree of the reflection adjacent penetration area on the image reflection area. On the one hand, the detection interference mean value reflects the average level of the interference degree represented by each detection interference group under the condition of having the same reflection adjacent penetration number ratio. On the other hand, the detection interference standard deviation reflects the dispersion degree of the detection interference values corresponding to each detection interference group relative to the detection interference mean value. Thus, the purpose of visual recognition detection of the lens surface is: Purpose one: to reflect the complexity of the interference of the reflection adjacent penetration area in different lens images, which helps to distinguish and identify real defects and false images caused by the interference of the reflection adjacent penetration area, and improves the accuracy of visual recognition detection of the lens surface; Purpose two: the degree consistency evaluation value can be used as an important supplementary index for lens quality grading. In addition to considering the number and severity of defects on the lens surface, the quality grade of the lens can be further subdivided according to the consistency of the interference degree of the reflection adjacent penetration area on the image reflection area; The degree consistency evaluation value is compared with the degree consistency evaluation threshold value, and the process is as follows: If the degree consistency evaluation value is greater than the degree consistency evaluation threshold value, it means that the interference degree of the reflection adjacent penetration area on the image reflection area at different adjacent positions is inconsistent, and the degree inconsistency signal is displayed; If the degree consistency evaluation value is less than or equal to the degree consistency evaluation threshold value, it means that the interference degree of the reflection adjacent penetration area on the image reflection area at different adjacent positions is consistent, and the degree consistency signal is displayed; Step four: if consistent, the adjustment of the shooting angle is obtained according to the correlation between the shooting angle and the image penetration area, and the probability of the image penetration area is reduced; In the preferred embodiment, if the display is consistent with the signal, the corresponding unit change sub-slope of each adjacent coordinate combination is calculated by mean value, and the angle penetration coefficient is outputted; According to the detection interference threshold, a detection interference group less than or equal to the detection interference threshold is selected from a plurality of detection interference groups, and the corresponding reflection adjacent penetration quantity ratio is extracted for size comparison, and the detection interference group with the minimum reflection adjacent penetration quantity ratio is selected as the reference target group; The reflection adjacent penetration quantity ratio corresponding to the reference target group is calculated by ratio with the angle penetration coefficient, and the adjusted shooting angle is outputted; It should be noted that the purpose of adjusting the shooting angle is to solve the problem that the light distribution of the reflection area on the lens surface is uneven due to the penetration area, resulting in similar defect artifacts during detection, select the optimal shooting angle to reduce the probability of the appearance of the penetration area, avoid misjudgment of the real defects on the lens surface, provide angle adjustment basis for the detection algorithm, match the camera shooting angle with the lens surface characteristics, improve the stability and reliability of the detection system; The specific scheme of the embodiment is: if the detection interference degree is large, it is analyzed whether the interference of different reflection adjacent penetration areas on the image reflection area is consistent, which is helpful to distinguish and identify the real defects and the false images caused by the interference of the reflection adjacent penetration area, improve the accuracy of visual recognition detection of the lens surface, and further subdivide the quality level of the lens according to the consistency of the interference degree of the reflection adjacent penetration area on the image reflection area, if consistent, the adjusted shooting angle is obtained according to the correlation degree between the shooting angle and the image penetration area, the probability of the appearance of the image penetration area is reduced, the problem that the light distribution of the reflection area on the lens surface is uneven due to the penetration area, resulting in similar defect artifacts during detection, the optimal shooting angle is selected to reduce the probability of the appearance of the penetration area, avoid misjudgment of the real defects on the lens surface, provide angle adjustment basis for the detection algorithm, match the camera shooting angle with the lens surface characteristics, improve the stability and reliability of the detection system.

[0022] The basic principles, main features and advantages of the present application are shown and described above. Those skilled in the art should understand that the present application is not limited to the above embodiments, and the above embodiments and descriptions in the specification are only to illustrate the principles of the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection of the present application is defined by the appended claims and their equivalents.

Claims

1. A visual recognition based lens surface detection method, characterized in that: The method comprises the following steps: Detecting a plurality of lens images taken by a polarized camera, respectively identifying the image reflection area and the image penetration area in each lens image, and analyzing the correlation between the shooting angle and the image penetration area; Obtain the positional relationship between the image reflection area and the image penetration area, obtain the reflection adjacent penetration area, and analyze the detection interference degree of the reflection adjacent penetration area to the image reflection area; If the detection interference degree is large, analyze whether the interference of different reflection adjacent penetration areas to the image reflection area is consistent; If it is consistent, adjust the shooting angle according to the correlation between the shooting angle and the image penetration area to reduce the appearance probability of the image penetration area.

2. The lens surface detection method based on visual recognition according to claim 1, characterized in that: The identification and screening process of the image reflection area and the image penetration area is as follows: Divide the target analysis image according to the grid format to obtain a plurality of image analysis areas with equal area and regular shape; If the analysis area pixel is greater than or equal to the analysis area pixel threshold, it is identified as an image reflection area; If the analysis area pixel is less than the analysis area pixel threshold, it is identified as an image penetration area.

3. The lens surface detection method based on visual recognition according to claim 1, characterized in that: The correlation between the shooting angle and the image penetration area is analyzed as follows: Calculate the ratio of the number of image penetration areas to the total number of divided image analysis areas in the target analysis image to obtain the penetration area number ratio; Obtain the shooting angle when each target analysis image is taken, and sort the shooting angles from small to large, and construct an angle-number correlation analysis curve by using the penetration area number ratio corresponding to each target analysis image; Extract the end point coordinates on the angle-number correlation analysis curve and connect them in a straight line to fit a correlation analysis fitting line; Calculate the perpendicular distance from each coordinate point on the angle-number correlation analysis curve to the correlation analysis fitting line and perform mean value calculation to output the curve linear trend value; If the curve linear trend value is less than or equal to the curve linear trend threshold, it indicates a linear trend signal, and the adjacent coordinate points on the angle-number correlation analysis curve are combined to obtain a plurality of adjacent coordinate combinations, the unit change sub-slope corresponding to each adjacent coordinate combination is obtained, and the variance is calculated to obtain the angle-penetration correlation value.

4. The lens surface detection method based on visual recognition according to claim 1, characterized in that: The evaluation process of the correlation between the shooting angle and the image penetration area is as follows: If the angle-penetration correlation value is less than or equal to the angle-penetration correlation threshold, it indicates a high correlation degree signal; If the angle-penetration correlation value is greater than the angle-penetration correlation threshold, it indicates a low correlation degree signal.

5. The lens surface detection method based on visual recognition according to claim 1, characterized in that: The process of obtaining the reflection adjacent penetration area and analyzing the detection interference of the reflection adjacent penetration area to the image reflection area is as follows: In the grid-divided target analysis image, obtain the image penetration area adjacent to the image reflection area in the spatial dimension as the reflection adjacent penetration area; Extract the reflection adjacent penetration area corresponding to each image reflection area, and obtain the proportion of the number of reflection adjacent penetration areas to the total number of image analysis areas to obtain the reflection adjacent penetration number ratio; Divide the image reflection area into a plurality of image reflection sub-areas, obtain the brightness of each image reflection sub-area, and calculate the ratio with the image reflection sub-area brightness threshold as the reflection sub-area brightness; According to the inner and outer line distance of the image reflection area, divide the plurality of image reflection sub-areas in the image reflection area into inner image reflection sub-areas and outer image reflection sub-areas; Combining the brightness of the reflection sub-region corresponding to any one of the inner image reflection sub-regions with the brightness of the reflection sub-region corresponding to one of the outer image reflection sub-regions, a plurality of inner-outer region brightness groups are obtained; Inputting the plurality of inner-outer brightness groups into the Euclidean distance model, an inner-outer brightness difference value is outputted; Summing the reflection adjacent penetration number ratio and the inner-outer brightness difference value, a detection interference value is outputted.

6. The lens surface detection method based on visual recognition according to claim 5, characterized in that: The evaluation process of the detection interference degree is as follows: If the detection interference value is greater than the detection interference threshold, a large signal of the detection interference degree is displayed; If the detection interference value is less than or equal to the detection interference threshold, a small signal of the detection interference degree is displayed.

7. The lens surface detection method based on visual recognition according to claim 5, characterized in that: The acquisition method of the inner-outer line distance is as follows: Extracting the four side lengths of the image reflection sub-region, and performing half of the sum and average calculation, as the inner-outer line distance.

8. The lens surface detection method based on visual recognition according to claim 1, characterized in that: The process of analyzing whether the interference of different reflection adjacent penetration regions on the image reflection region is consistent is as follows: Taking each image reflection region and the reflection adjacent penetration region at the corresponding different positions as a detection interference group, extracting the reflection adjacent penetration number ratio corresponding to each detection interference group; The detection interference groups with the same reflection adjacent penetration number ratio are summarized as the same adjacent penetration number interference sequence; Comparing the reflection adjacent penetration number ratios corresponding to all the same adjacent penetration number interference sequences, and sorting each adjacent penetration number interference sequence in descending order to obtain an interference analysis list; Randomly selecting an adjacent penetration number interference sequence in the interference analysis list as a target analysis sequence; Calculating the standard deviation of the detection interference values corresponding to all the detection interference groups in the target analysis sequence, and outputting a detection interference standard deviation; Calculating the mean of the detection interference values corresponding to all the detection interference groups in the target analysis sequence, and outputting a detection interference mean; Inputting the detection interference standard deviation and the detection interference mean into the coefficient of variation calculation formula, and outputting a degree consistency evaluation value; If the degree consistency evaluation value is greater than the degree consistency evaluation threshold, a degree inconsistency signal is displayed; If the degree consistency evaluation value is less than or equal to the degree consistency evaluation threshold, a degree consistency signal is displayed.

9. The lens surface detection method based on visual recognition according to claim 1, characterized in that: The acquisition process of the adjusted shooting angle is as follows: If the degree consistency signal is displayed, the unit change sub-slope corresponding to each adjacent coordinate combination is calculated, and an angle penetration coefficient is outputted; Based on the detection interference threshold, the detection interference groups less than or equal to the detection interference threshold are selected from the plurality of detection interference groups, and the reflection adjacent penetration number ratios corresponding to the detection interference groups are compared to select the detection interference group with the minimum reflection adjacent penetration number ratio as a reference target group; Calculating the ratio of the reflection adjacent penetration number ratio corresponding to the reference target group to the angle penetration coefficient, and outputting an adjusted shooting angle.

10. A visual recognition based lens surface inspection system, characterized by: It includes: An identification analysis module: detecting a plurality of lens images captured by a polarization camera, identifying the image reflection region and the image penetration region in each lens image, and analyzing the correlation between the shooting angle and the image penetration region; A detection interference evaluation module: obtaining the positional relationship between the image reflection region and the image penetration region, obtaining the reflection adjacent penetration region, and analyzing the detection interference degree of the reflection adjacent penetration region on the image reflection region; The interference consistency analysis module: if the interference degree is large, analyze whether the interference of different reflection adjacent penetration areas on the image reflection area is consistent; The shooting angle adjustment module: if consistent, according to the correlation degree between the shooting angle and the image penetration area, obtain the adjustment shooting angle, and reduce the appearance probability of the image penetration area.