Automobile lamp shell defect intelligent identification method and system

The intelligent defect recognition method using multiple light angles and grayscale matrix analysis addresses the low accuracy of existing automotive lamp shell detection by eliminating environmental light interference and accurately detecting thickness variations.

CN120318238AActive Publication Date: 2025-07-15XIAN WEIER PRECISION TECH CO LTD

Patent Information

Application Number
CN202510812067.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-07-15
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

The existing automotive light shell detection methods cannot accurately identify complex defects, and the detection results are greatly disturbed by ambient light and material reflections, and the thickness differences in different areas cannot be quantified, resulting in low detection accuracy.

Method used

By obtaining grayscale images at different lighting intensities and angles, an effective grayscale matrix is constructed, the degree of mutation and abnormal matrix is calculated, the influence of ambient light is eliminated, and defective areas are identified.

Benefits of technology

It improves the accuracy of automotive lamp shell defect detection, can identify uneven thickness and structural defects, reduces interference from ambient light, and achieves more accurate detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318238A_ABST
    Figure CN120318238A_ABST
Patent Text Reader

Abstract

The invention relates to the field of automobile lamp shell detection, in particular to an automobile lamp shell defect intelligent identification method and system, and the method comprises the steps: obtaining gray-scale maps of an automobile lamp shell under different illumination intensities, and constructing an image set; calculating the abrupt change degree of each pixel point at each position in the grey-scale map, and taking the grey-scale value of the pixel point with the maximum abrupt change degree as an effective grey-scale point at the corresponding position; constructing an effective gray scale matrix by using the effective gray scale points; comparing the effective gray matrix with a preset standard gray matrix to obtain an abnormal matrix about the image set, wherein the abnormal matrix comprises a non-zero connected domain; changing illumination angles to obtain image sets under different illumination angles, and further obtaining an anomaly matrix of each image set; and taking the intersection of the non-zero connected domains in the plurality of abnormal matrixes as the defect area of the automobile lamp housing. According to the invention, the accuracy of automobile lamp shell defect detection results is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automotive lamp housing detection, and particularly to an intelligent method and system for identifying defects in automotive lamp housings. Background Art

[0002] Currently, automotive lamp housings mainly adopt polycarbonate injection molding technology, and surface defects and structural defects are likely to occur during the production process. Among them, common surface defects are weld lines, sink marks, and flow marks, and common structural defects are uneven thickness and invisible cracks. Traditional detection of automotive lamp housing defects relies on manual inspection and other auxiliary equipment, and it is difficult to accurately identify complex defects. Manual inspection is easily affected by subjective factors, with low efficiency, high cost, and prone to missed inspections.

[0003] Chinese patent document with the publication number CN118644480B discloses a method and system for detecting the surface of automotive lamps. The method includes the steps of: obtaining lamp images and standard images under light sources with different intensities, calculating the similarity degree between the pixel points of the lamp images and the pixel points of the standard images, and obtaining a similarity feature map according to the similarity degree; marking the points with a similarity degree greater than a preset threshold in the similarity feature map as initial damaged points, and obtaining an initial damaged area according to the initial damaged points; calculating a damage evaluation, and taking the initial damaged area with the smallest damage evaluation in each lamp image as the optimal analysis area; for any two lamp images under light sources with different intensities, marking the optimal analysis area with the largest area among the optimal analysis areas with overlapping positions as the final damaged area; and taking the ratio of the number of pixel points in the final damaged area to the number of non-zero pixel points as the quality evaluation.

[0004] In existing lamp housing detection methods, images of lamps are mostly taken at a fixed angle, and the detection results are greatly interfered by ambient light and material reflection, making it difficult to comprehensively and accurately reflect the true quality status of the lamp housing. Moreover, the existing automotive lamp housing has a complex shape, and the existing detection methods cannot accurately quantify the thickness differences in different regions, resulting in low accuracy of the detection results. Summary of the Invention

[0005] In order to solve the problem of low accuracy of detection results in existing automotive lamp housing detection methods, the present invention provides an intelligent method and system for identifying defects in automotive lamp housings.

[0006] In a first aspect, the present invention provides an intelligent method for identifying defects in automotive lamp housings, adopting the following technical solutions: Obtain grayscale images of an automotive lamp housing under different light intensities and construct an image set; Calculate the mutation degree of each pixel at each position in the grayscale image, and use the grayscale value of the pixel with the largest mutation degree as the effective grayscale point at the corresponding position; construct an effective grayscale matrix using the effective grayscale points; compare the effective grayscale matrix with a preset standard grayscale matrix to obtain an abnormal matrix for the image set, and the abnormal matrix includes non-zero connected regions. Change the illumination angle to obtain image sets under different illumination angles, and further obtain the abnormal matrix for each image set; take the intersection of the non-zero connected regions in multiple abnormal matrices as the defective area of the car lamp housing.

[0007] By calculating the effective grayscale points and constructing an effective grayscale matrix, defective areas can be identified, facilitating the detection of defects in the car lamp housing. Moreover, by changing the illumination angle to obtain multiple abnormal matrices, the influence of ambient light is eliminated, improving the accuracy of the detection results.

[0008] Preferably, the method further includes: obtaining the grayscale values of the pixel points at the same position in the image set, sorting the grayscale values in chronological order to obtain a grayscale sequence, and using any grayscale value in the grayscale sequence to divide the grayscale sequence into two subsequences.

[0009] Classifying the grayscale sequence provides a theoretical basis for calculating the mutation degree of each pixel point.

[0010] Preferably, the expression for the mutation degree is:

[0011] In the formula, is the mutation degree of the a-th grayscale value in the grayscale sequence, is the number of grayscale values in the grayscale sequence, a is the serial number corresponding to the a-th grayscale value in the grayscale sequence, is the subsequence composed of the first to the a-1-th grayscale values in the grayscale sequence, is the subsequence composed of the a+1-th to the last grayscale values in the grayscale sequence, and STD is the standard deviation.

[0012] By calculating the mutation degree, the mutation situation of the grayscale values can be understood, facilitating the calculation of the effective grayscale points at each position.

[0013] Preferably, the expression for the mutation degree is:

[0014] In the formula, is the mutation degree of the a-th grayscale value in the grayscale sequence, is the subsequence composed of the first to the a-1-th grayscale values in the grayscale sequence, is the subsequence composed of the a+1-th to the last grayscale values in the grayscale sequence, and STD is the standard deviation.

[0015] Preferably, the calculation method of the mutation degree is as follows: fitting the gray-scale sequence to obtain a fitting curve, calculating the slope of each data point in the fitting curve, and taking the slope as the mutation degree of the corresponding gray-scale value.

[0016] Taking the slope of the data point as the mutation degree of the gray-scale value improves the calculation rate and reduces the amount of calculation data.

[0017] Preferably, the method for obtaining the abnormal matrix of the image set by comparing the effective gray-scale matrix with the preset standard gray-scale matrix is as follows: calculating the ratio of the data at the same position in the effective gray-scale matrix and the standard gray-scale matrix, and the absolute value of the difference between the ratio and 1. In response to the absolute value being less than the preset difference threshold, updating the data point at the corresponding position in the effective gray-scale matrix to 0, and further obtaining the abnormal matrix.

[0018] Preferably, the method for obtaining the abnormal matrix of the image set by comparing the effective gray-scale matrix with the preset standard gray-scale matrix is as follows: calculating the difference between the data at the same position in the effective gray-scale matrix and the standard gray-scale matrix. In response to the difference being less than the preset difference threshold, updating the data point at the corresponding position in the effective gray-scale matrix to 0, and further obtaining the abnormal matrix.

[0019] Preferably, before comparing the effective gray-scale matrix with the preset standard gray-scale matrix, it further includes the step of performing abnormal detection on the effective gray-scale matrix using the local outlier factor and removing the outliers.

[0020] Preferably, the illumination angles include 0 degrees, 90 degrees, 180 degrees, and 270 degrees.

[0021] By adjusting the illumination angle, the influence of the ambient light is eliminated, and the accuracy of the detection result is improved.

[0022] In a second aspect, the present invention provides an intelligent recognition system for automobile lamp housing defects, adopting the following technical solution: An intelligent recognition system for automobile lamp housing defects includes: a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, it realizes an intelligent recognition method for automobile lamp housing defects according to the above.

[0023] Generating a computer program for the above intelligent recognition method for automobile lamp housing defects and storing it in the memory to be loaded and executed by the processor. Thus, making a system according to the memory and the processor is convenient to use.

[0024] The present invention has the following technical effects: By calculating the effective gray points and constructing an effective gray matrix, comparing the effective gray matrix with the standard gray matrix, it is possible to identify defective areas with relatively thick or thin parts, facilitating the detection of thickness defects in automotive lamp housings. Moreover, by changing the illumination angle to obtain multiple abnormal matrices, the influence of ambient light is eliminated, improving the accuracy of the detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a flowchart of an intelligent method for identifying defects in an automotive lamp housing according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0027] An embodiment of the present invention discloses an intelligent method for identifying defects in an automotive lamp housing. Referring to Figure 1 , the method includes the following steps: S1: Obtain grayscale images of the automotive lamp housing under different illumination intensities and construct an image set.

[0028] Linearly increase the internal light source power of the automotive lamp housing from zero to the maximum power, so that the illumination intensity gradually increases. Collect grayscale images of the automotive lamp housing at equal time intervals. Multiple grayscale images form an image set, and the grayscale images in the image set are arranged in chronological order.

[0029] Due to the complex shape design of the automotive lamp housing, the thickness of different regions of the automotive lamp housing may be inconsistent, resulting in inconsistent light transmittance of different thickness regions under different illumination intensities, and the brightness change ratio of lamp housing regions with different thicknesses is also inconsistent as the light source intensity increases. For example, in a relatively thick region, obvious changes will only occur when the illumination intensity is large enough. Therefore, the lamp housing regions can be distinguished by changing the illumination intensity.

[0030] S2: Calculate the mutation degree of each pixel point at each position in the grayscale image, and use the grayscale value of the pixel point with the largest mutation degree as the effective gray point at the corresponding position.

[0031] Obtain the gray values of the pixel points at the same position in the image set, sort the gray values in chronological order to obtain a gray sequence, and use any gray value in the gray sequence to divide the gray sequence into two subsequences. In the image set, the pixel points at the same position in each gray image correspond to the same position point in the lamp housing. For example, the m-th pixel point in each gray image corresponds to the same position point in the lamp housing. In multiple gray images, the gray values of the m-th pixel point form a gray sequence. Since the light intensity gradually increases during the acquisition of the gray images, the gray values in the gray sequence are arranged in ascending order.

[0032] In one embodiment, the expression for the degree of mutation is:

[0033] In the formula, is the degree of mutation of the a-th gray value in the gray sequence, is the subsequence composed of the first to the (a - 1)-th gray values in the gray sequence, is the subsequence composed of the (a + 1)-th to the last gray values in the gray sequence, and STD is the standard deviation.

[0034] The above formula means that the gray sequence is divided into two subsequences with the a-th gray value as the demarcation point, and the difference between the standard deviations of the two subsequences is calculated, which can also be understood as the difference in the volatility of the two subsequences. The larger the value of, the more obvious the gray change occurs at the a-th gray value in the gray sequence.

[0035] Exemplarily, for the gray sequence of the first pixel point in the gray image, the number of data points in the gray sequence is 10, and the degree of mutation of the 6th gray value is the largest, indicating that the gray value in the gray sequence has changed significantly from the 6th data point. The 6th gray value is used as the effective gray point of the first pixel point.

[0036] In one embodiment, the expression for the degree of mutation is:

[0037] In the formula, is the degree of mutation of the a-th gray value in the gray sequence, is the number of gray values in the gray sequence, a is the serial number corresponding to the a-th gray value in the gray sequence, is the subsequence composed of the first to the (a - 1)-th gray values in the gray sequence, is the subsequence composed of the (a + 1)-th to the last gray values in the gray sequence, and STD is the standard deviation.

[0038] Based on the volatility of the two subsequences before and after, since the power of the light source corresponding to the previous subsequence is relatively low, the volatility of the subsequence is relatively small. The power of the light source corresponding to the latter subsequence is relatively high, and the gray value changes greatly, so the volatility of the subsequence is relatively large. Therefore, pair is corrected to improve the accuracy of the calculation result of the mutation degree.

[0039] It should be noted that The formula is simple and the calculation result is relatively fast, which is applicable to the automotive lamp housing with a relatively low degree of structural complexity.

[0040] The accuracy of the calculation result of the formula is relatively high, which is applicable to the automotive lamp housing with a relatively high degree of structural complexity.

[0041] In one embodiment, the calculation method of the mutation degree is as follows: the gray level sequence is fitted to obtain a fitting curve, the slope of each data point in the fitting curve is calculated, and the slope is used as the mutation degree of the corresponding gray value. This calculation method is applicable to the automotive lamp housing with a relatively low degree of structural complexity.

[0042] S3: An effective gray matrix is constructed using the effective gray points, and an abnormal matrix of the image set is obtained by comparing the effective gray matrix with a preset standard gray matrix. The abnormal matrix includes non-zero connected domains.

[0043] In the grayscale image of the image set, each position corresponds to an effective gray point. An effective gray matrix is constructed according to the effective gray points. The size of the effective gray matrix is the same as that of the grayscale image, and the positions of the data points in the effective gray matrix correspond one by one to the positions of the data points in the grayscale image. The local outlier factor is used to perform outlier detection on the effective gray matrix and eliminate the outliers, and the mean value of the corresponding position gray level sequence is taken for supplementation.

[0044] In the effective gray matrix, the larger the value of the effective gray point, the greater the change in the gray value of the corresponding pixel point under stronger illumination conditions, which further indicates that the thickness of the automotive lamp housing in the corresponding position area is larger. On the contrary, the smaller the value of the effective gray point, the smaller the thickness of the automotive lamp housing in the corresponding position area.

[0045] In one embodiment, the ratio of the data at the same position in the effective gray matrix and the standard gray matrix is calculated, and the absolute value of the difference between the ratio and 1 is calculated. In response to the absolute value being less than a preset difference threshold, the data point at the corresponding position in the effective gray matrix is updated to zero, and an abnormal matrix is further obtained. The standard gray matrix is the effective gray matrix corresponding to the image set of automotive lamp housings without quality defects and with uniform thickness.

[0046] An absolute value less than a preset difference threshold indicates that the corresponding position area is a normal area. Update the data points in the normal area to zero in the effective grayscale matrix. The connected domain composed of zero data points is the zero-value connected domain. Conversely, an absolute value greater than the preset difference threshold indicates that the corresponding position area is an abnormal area, and the data points in the abnormal area in the effective grayscale matrix remain unchanged. The connected domain composed of non-zero data points is the non-zero connected domain.

[0047] In one embodiment, calculate the difference between the data at the same position in the effective grayscale matrix and the standard grayscale matrix. In response to the difference being less than the preset difference threshold, update the data points at the corresponding positions in the effective grayscale matrix to zero, and further obtain an abnormal matrix.

[0048] S4: Change the lighting angle to obtain an image set under different lighting angles, further obtain the abnormal matrix of each image set, and use the intersection of the non-zero connected domains in multiple abnormal matrices as the defective area of the automotive lamp housing.

[0049] Automotive lamp housing materials often use polished polycarbonate high-reflection materials. Specular reflection causes light to be concentrated at a fixed angle to form bright spots. If a point light source or strong light is used without diffusion, and the angle between the light source and the camera satisfies the specular reflection condition, the reflection will be intensified. The complex curved surface of the lamp housing changes the light reflection direction, and areas with large curvature are prone to local high brightness, even causing multiple reflections. Ambient light such as factory lighting or reflected light from surrounding objects further increases the complexity of interference, resulting in abnormalities in the effective grayscale matrix of the automotive lamp housing.

[0050] Therefore, if only the effective grayscale matrix obtained by lighting at a single angle is used, it will be interfered by reflection, making the values of the effective grayscale points in the effective grayscale matrix relatively large and unable to accurately represent the thickness of the automotive lamp housing. Therefore, multi-angle shooting is required to eliminate the interference of ambient light.

[0051] In summary, under lighting angles of 0 degrees, 90 degrees, 180 degrees, and 270 degrees, obtain the image sets of the automotive lamp housing respectively, so as to obtain the abnormal matrix of each image set. The intersection of the non-zero connected domains in multiple abnormal matrices is the defective area of the automotive lamp housing.

[0052] The embodiment of the present invention also discloses an intelligent recognition system for automotive lamp housing defects, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, an intelligent recognition method for automotive lamp housing defects according to the present invention is implemented.

[0053] The above system also includes other components well known to those skilled in the art such as a communication bus and a communication interface. Their settings and functions are known in the art, so they will not be described in detail here.

[0054] The above are all preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby. Therefore, all equivalent changes made according to the structure, shape and principle of the present invention shall be covered within the protection scope of the present invention.

Claims

1. An intelligent identification method for defects in automobile lamp housings, characterized in that, Including the steps: Obtain the grayscale images of the automobile lamp housing under different light intensities, and construct an image set; Calculate the mutation degree of each pixel at each position in the grayscale image, and use the grayscale value of the pixel with the maximum mutation degree as the effective grayscale point at the corresponding position; construct an effective grayscale matrix using the effective grayscale points; compare the effective grayscale matrix with a preset standard grayscale matrix to obtain an anomaly matrix for the image set, and the anomaly matrix includes non-zero connected domains; Change the light angle to obtain image sets under different light angles, and further obtain the anomaly matrix for each image set; Take the intersection of the non-zero connected domains in multiple anomaly matrices as the defect area of the automobile lamp housing.

2. The intelligent identification method for defects of an automobile lamp housing according to claim 1, wherein, The method further includes: obtaining the grayscale values of the pixel points at the same position in the image set, sorting the grayscale values in chronological order to obtain a grayscale sequence, and using any grayscale value in the grayscale sequence to divide the grayscale sequence into two subsequences.

3. The intelligent defect recognition method for an automobile lamp housing according to claim 2, characterized in that, The expression for the mutation degree is: Wherein, is the mutation degree of the ath gray value in the gray level sequence, is the number of gray values in the gray level sequence, a is the serial number corresponding to the ath gray value in the gray level sequence, is the subsequence composed of the first to the (a - 1)th gray values in the gray level sequence, is the subsequence composed of the (a + 1)th to the last gray values in the gray level sequence, and STD is the standard deviation.

4. The intelligent recognition method for defects of an automobile lamp housing according to claim 2, characterized in that, The expression for the mutation degree is: In the formula, is the mutation degree of the a-th gray value in the gray scale sequence, is the subsequence composed of the first to the (a - 1)-th gray values in the gray scale sequence, is the subsequence composed of the (a + 1)-th to the last gray values in the gray scale sequence, and STD is the standard deviation.

5. The intelligent identification method for defects of an automobile lamp housing according to claim 2, wherein, The calculation method of the mutation degree is: fit the grayscale sequence to obtain a fitting curve, calculate the slope of each data point in the fitting curve, and use the slope as the mutation degree of the corresponding grayscale value.

6. The intelligent recognition method for defects of an automobile lamp housing according to claim 1, wherein The method for comparing the effective grayscale matrix with a preset standard grayscale matrix to obtain an anomaly matrix for the image set is: calculate the ratio of the data at the same position in the effective grayscale matrix and the standard grayscale matrix, and the absolute value of the difference between the ratio and 1. In response to the absolute value being less than a preset difference threshold, update the data point at the corresponding position in the effective grayscale matrix to 0, and further obtain the anomaly matrix.

7. An intelligent recognition method for defects of an automobile lamp housing according to claim 1, characterized in that, The method for comparing the effective grayscale matrix with a preset standard grayscale matrix to obtain an anomaly matrix for the image set is: calculate the difference between the data at the same position in the effective grayscale matrix and the standard grayscale matrix. In response to the difference being less than a preset difference threshold, update the data point at the corresponding position in the effective grayscale matrix to 0, and further obtain the anomaly matrix.

8. The intelligent identification method for defects of an automobile lamp housing according to claim 6 or 7, characterized in that, Before comparing the effective grayscale matrix with a preset standard grayscale matrix, it further includes the step of performing anomaly detection on the effective grayscale matrix using the local outlier factor and removing the outliers.

9. The intelligent identification method for defects of an automobile lamp housing according to claim 1, characterized in that, The light angles include 0 degrees, 90 degrees, 180 degrees, and 270 degrees.

10. An intelligent recognition system for defects in automobile lamp housings, characterized in that, Including: A processor and a memory, the memory stores computer program instructions, and when the computer program instructions are executed by the processor, it realizes an intelligent identification method for defects of an automobile lamp housing according to any one of claims 1-9.

Citation Information

Patent Citations

  • Intelligent detection method for pitting corrosion defect on surface of mechanical part

    CN116977335A

  • Image processing-based abnormal identification method and device for special-shaped metal part, and medium

    CN118279304A

  • Structural deformation non-contact dynamic measurement method and system based on ultra-sensitive optical flow method, processing equipment and storage medium

    CN119068038A

  • Data line appearance defect rapid detection method based on intelligent image recognition

    CN119963551A

  • Machine vision identification method and device for silicon wafer surface defect, and medium

    WO2024250578A1

Cited By

  • Automobile light-operated detection method and system based on image recognition

    CN120628567A

  • An image recognition-based light control detection method and system for a vehicle

    CN120628567B