Automobile mold data acquisition method and system

By acquiring the normal direction information of the mold surface, using multi-azimuth grazing illumination and time-series image acquisition, and combining brightness value analysis, the problem of identifying micron-level coating defects under uneven illumination and complex curved surfaces in traditional detection systems has been solved, achieving high-precision defect detection.

CN121298734BActive Publication Date: 2026-05-08KUNSHAN HAIYATE AUTOMOBILE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KUNSHAN HAIYATE AUTOMOBILE TECH CO LTD
Filing Date
2025-10-14
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Traditional machine vision inspection systems face challenges from uneven lighting and complex curved surfaces when inspecting micron-level coating surface defects on automotive molds, resulting in insufficient inspection accuracy and reliability.

Method used

By acquiring the normal direction information of the mold surface, using multi-azimuth grazing illumination and time-series image acquisition, and combining time-series comparison analysis of pixel brightness values, micron-scale coating defects can be identified.

Benefits of technology

It effectively overcomes the interference of uneven lighting and complex curved surfaces, improves detection accuracy and reliability, and can accurately identify micron-level coating defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121298734B_ABST
    Figure CN121298734B_ABST
Patent Text Reader

Abstract

The application provides a kind of automobile mould data acquisition method and system, comprising: the normal direction information of each micro area on the cavity surface of the automobile part mould to be detected is obtained;Based on the normal direction information obtained, control a narrow-band light source of a specific wavelength, to any micro area on the cavity surface with multiple preset azimuth angles for time-sequential illumination, during each time-sequential illumination, a frame of image is synchronously collected, so as to obtain the image sequence corresponding to the micro area under multiple preset azimuth angles;The luminance values of the pixel points corresponding to the same physical position in the micro area in the obtained image sequence are compared and analyzed in time sequence, to identify the pixel points whose luminance values change with multiple preset azimuth angles by a preset change, and the identified pixel points are determined as coating defects, which can effectively identify micron-scale coating defects, overcome the problem of uneven illumination and background interference caused by complex curved surface, improve detection accuracy and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine vision inspection, particularly the field of mold surface defect detection, and more specifically, to a method and system for acquiring data from automotive molds. Background Technology

[0002] In the field of precision manufacturing of automotive parts, especially for components with high requirements for appearance, such as transparent lamp covers for automotive lights, transparent protective covers for dashboards, or plastic parts with fine textures in the interior, the surface quality of the corresponding injection molds or die-casting mold cavities directly determines the quality of the final product. In order to further improve the smoothness of demolding of these high-gloss molds during the injection or die-casting process, a special thin coating is often prepared on the key working surfaces of the mold cavity during production.

[0003] In the periodic maintenance or quality inspection of molds, accurate detection of the surface condition of these coated molds becomes crucial. Traditional machine vision inspection systems face severe challenges in the accuracy and reliability of data acquisition when dealing with micron-level coating surface defects. Under normal lighting conditions, the contrast they produce in the image may be very low, almost drowned out by the extremely fine processing marks inherent in the mold surface, even after mirror polishing, or random ambient light noise, making it very easy to miss detections.

[0004] Furthermore, the cavities of these precision molds are often not simple planes, but contain numerous complex three-dimensional freeform surfaces. For example, in the mold for an automotive headlight cover, numerous tiny optical prism structures and surface transitions with varying radii of curvature are designed to achieve specific light distribution effects. Some areas may produce strong overexposure highlights due to near-positive reflection, obscuring all details; while other areas on slopes or in recesses may appear dim and blurry because light cannot effectively reach them or form shadows. This uneven illumination and focus drift caused by complex surfaces make it extremely difficult to stably and reliably acquire high-quality image data reflecting the true state of minute coating defects across the entire mold working surface. Even if images are managed to be acquired, the accuracy of subsequent defect identification and dimensional quantization is significantly reduced due to inconsistent image quality. Summary of the Invention

[0005] The technical objective of this application is to provide a data acquisition method and system for automotive molds, which has the advantages of effectively identifying coating defects at the micron scale, overcoming uneven lighting and background interference caused by complex curved surfaces, and improving detection accuracy and reliability.

[0006] The core technical solution of this application is a method for acquiring data from automotive molds, specifically including:

[0007] Obtain the normal direction information of each tiny region on the cavity surface of the automotive part mold to be inspected;

[0008] Based on the acquired normal direction information, a narrowband light source of a specific wavelength is controlled to illuminate any tiny area on the surface of the cavity in a time-sequential manner at multiple preset azimuth angles. During the illumination period of each azimuth angle, the beam of the narrowband light source is incident at a preset grazing angle relative to the surface tangent plane of the tiny area.

[0009] During each time-sequential illumination period, one frame of image is acquired synchronously to obtain an image sequence corresponding to a small area at multiple preset azimuth angles;

[0010] A temporal comparison analysis is performed on the brightness values ​​of pixels corresponding to the same physical location within a small area in the obtained image sequence to identify pixels whose brightness values ​​change with multiple preset azimuth angles, and the identified pixels are determined to be coating defects.

[0011] The above method can effectively identify coating defects at the micrometer scale, overcome the problems of uneven lighting and background interference caused by complex curved surfaces, and improve detection accuracy and reliability.

[0012] This application also provides an automotive mold data acquisition system, specifically including:

[0013] The normal information acquisition module is used to acquire the normal direction information of each tiny area on the cavity surface of the automotive part mold to be inspected;

[0014] The lighting control module is used to control a narrowband light source of a specific wavelength to illuminate any tiny area on the surface of the cavity at multiple preset azimuth angles based on the acquired normal direction information. During the illumination period of each azimuth angle, the beam of the narrowband light source is incident at a preset grazing angle relative to the surface tangent plane of the tiny area.

[0015] The image acquisition module is used to synchronously acquire one frame of image during each time-sequential illumination period, thereby obtaining an image sequence corresponding to a small area under multiple preset azimuth angles;

[0016] The defect identification module is used to perform time-series comparison analysis on the brightness information of pixels corresponding to the same physical location within a small area in the obtained image sequence, so as to identify pixels whose brightness values ​​change by a preset angle with multiple preset azimuth angles, and to determine the identified pixels as coating defects.

[0017] Through the above technical solutions, the automotive mold data acquisition method and system provided in this application effectively identify micron-level defects by grazing illumination and time-series analysis of brightness changes, overcome complex curved surfaces and background interference, and achieve the advantages of effectively identifying micron-scale coating defects, overcoming uneven illumination and background interference caused by complex curved surfaces, and improving detection accuracy and reliability. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of an embodiment of an automotive mold data acquisition method provided in this application.

[0019] Figure 2 This is a schematic diagram of an automotive mold data acquisition system provided in this application.

[0020] Figure 3 A schematic diagram of a computer device provided in this application. Detailed Implementation

[0021] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following drawings indicate similar items; therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0022] Faced with the aforementioned problems of complex curved surfaces and background interference, this application initially considered using a higher resolution camera or a stronger illumination source to enhance image details. However, simply increasing the resolution or light source intensity cannot solve the problems of uneven illumination and defocus caused by complex curved surfaces, nor can it effectively improve the contrast between subtle defects and the background. Therefore, this application further considered whether defect features could be highlighted by controlling the illumination method. Considering that defects are minute changes in surface morphology, their reflection or scattering characteristics to incident light from different directions may differ from intact surfaces. Therefore, this application attempted to observe the surface response by changing the incident angle and direction of the light source. In particular, using grazing angle illumination can utilize the tiny shadows or scattering produced by defects to enhance contrast. Simultaneously, to cope with complex curved surfaces, the illumination angle needs to be adjusted according to the local surface normal direction to ensure effective grazing illumination in different areas. Furthermore, if images are acquired from multiple different azimuth angles and the brightness change sequence of pixels at the same location under different azimuth angles is analyzed, this change pattern may become a feature distinguishing defects from intact areas, thereby overcoming the limitations of single-angle illumination and the interference of background noise.

[0023] Reference Figure 1 The diagram illustrates an embodiment of a data acquisition method for automotive molds according to the present invention, which may specifically include the following steps:

[0024] Step 101: Obtain the normal direction information of each micro-region on the cavity surface of the automotive part mold to be inspected;

[0025] Step 102: Based on the acquired normal direction information, control a narrowband light source of a specific wavelength to illuminate any tiny area on the surface of the cavity in a time-sequential manner at multiple preset azimuth angles. During the illumination period of each azimuth angle, the beam of the narrowband light source is incident at a preset grazing angle relative to the surface tangent plane of the tiny area.

[0026] Step 103: During a single time-series illumination, a frame of image is acquired synchronously to obtain an image sequence corresponding to a small region at multiple preset azimuth angles;

[0027] Step 104: Perform time-series comparison analysis on the brightness values ​​of pixels corresponding to the same physical location within a small area in the obtained image sequence to identify pixels whose brightness values ​​change with multiple preset azimuth angles, and determine the identified pixels as coating defects.

[0028] Among them, normal direction information refers to the geometric orientation information of a local area of ​​the surface, which can be obtained using 3D scanning equipment, structured light measurement equipment, or computer-aided design model data of the mold. Its purpose is to provide a geometric reference for determining the local illumination angle. Narrowband light source with specific wavelength refers to a light source whose emission spectrum width is limited to a specific range. It can be a light-emitting diode light source, a laser light source, or a light source combined with optical filters. Its purpose is to reduce the impact of ambient stray light on image acquisition and improve the optical contrast of target features. Multiple preset azimuth angles refer to a set of discrete angles set around the local normal direction of the surface in a plane tangent to the surface. This can be achieved by arranging multiple light sources in a ring, using a rotatable light source device, or by rotating the mold to be inspected. Its purpose is to provide directional illumination to the surface from multiple directions and obtain the optical response of the surface under different illumination directions. Time-sequential illumination refers to illumination at different times. The intermittent points are activated or the lighting conditions are adjusted sequentially according to a predetermined order. This can be achieved by controlling the power switch of the light source, adjusting the physical position or angle of the light source, and the purpose is to collect corresponding image data under different lighting conditions. The preset grazing angle refers to the angle between the central axis of the light source beam and the local tangent plane of the surface. This angle is less than 90 degrees and can be achieved by adjusting the position and direction of the light source relative to the surface. The purpose is to use grazing illumination to produce significant shadow or highlight effects on small height changes or structures on the surface. The temporal comparison analysis refers to comparing and recognizing the brightness values ​​of pixels at the same physical location in images acquired at different time points (corresponding to different lighting conditions). This can be achieved by calculating the statistics of the brightness value sequence, the amplitude of change, or a specific pattern matching method. The purpose is to distinguish the changes in optical response caused by surface defects from normal surfaces or background noise.

[0029] The core innovation of this application lies in the fact that by combining multi-azimuth grazing illumination based on normal direction information with temporal comparison analysis of pixel brightness values, the optical contrast of micron-scale coating defects is enhanced and the uneven illumination caused by complex curved surfaces is suppressed, thereby achieving high-precision data acquisition of micron-scale coating defects on the surface of such molds.

[0030] This application's solution acquires the normal direction information of each micro-region on the surface of the mold cavity to be inspected, providing a foundation for subsequent precise lighting control. Based on the acquired normal direction information, a narrowband light source of a specific wavelength is controlled to illuminate any micro-region sequentially at multiple preset azimuth angles. During each specific azimuth angle illumination period, the beam of the narrowband light source is incident at a preset grazing angle relative to the surface tangent plane of the micro-region. This multi-azimuth angle grazing illumination method causes micro-defects on the surface to produce different optical responses under different illumination directions, while the optical response of normal areas exhibits different variation patterns. During each sequential illumination period, a frame of image is simultaneously acquired, thereby obtaining an image sequence corresponding to the micro-region at multiple preset azimuth angles. This image sequence contains the optical response information of the region under different illumination directions. The brightness values ​​of pixels corresponding to the same physical location within the micro-region in the obtained image sequence are subjected to temporal comparative analysis. By analyzing the variation pattern of pixel brightness values ​​with multiple preset azimuth angles, pixels whose brightness values ​​change according to preset values ​​are identified, and these identified pixels are determined as coating defects. This analysis method based on temporal brightness changes can distinguish defective areas from normal areas and eliminate the influence of background texture or ambient light.

[0031] In one specific implementation, a computer system carrying an optical sensor head can be used. The optical sensor head integrates a camera and a narrowband light source array. Based on the geometric model data of the mold, the computer system positions the optical sensor head above the area to be inspected on the surface of the mold cavity and adjusts its orientation to maintain a preset grazing angle of the light source array relative to the local surface tangent plane. The narrowband light source array consists of multiple independently controlled LEDs arranged in a ring. By sequentially activating different LEDs or combinations of LEDs in the ring array, illumination at multiple preset azimuth angles is achieved. The camera and LEDs are activated synchronously, acquiring images corresponding to each azimuth angle illumination. The acquired image sequence is received by an image processing unit. The image processing unit analyzes the brightness value of the same pixel in the image sequence, for example, calculating the amplitude or pattern of brightness value variation with azimuth angle, and compares it with preset judgment criteria to identify the pixel where the coating defect is located.

[0032] The above technical solution effectively addresses the inspection challenges of complex three-dimensional curved surface molds. Multi-azimuth grazing illumination controlled by normal direction information enhances the optical contrast of micron-scale coating defects, improving detectability. Temporal comparison analysis of pixel brightness values ​​distinguishes defect areas from the normal background, reducing false positives and false negatives. This method achieves high-precision data acquisition of micron-scale coating defects on automotive mold surfaces, providing a reliable technical means for mold quality control and maintenance.

[0033] In some embodiments described above, this application proposes acquiring the normal direction information of each micro-region on the cavity surface of an automotive part mold to be inspected. Based on the acquired normal direction information, a narrowband light source of a specific wavelength is controlled to provide time-sequential illumination of any micro-region on the cavity surface at multiple preset azimuth angles. During each time-sequential illumination, a frame of image is simultaneously acquired, thereby obtaining an image sequence corresponding to the micro-region at multiple preset azimuth angles. The brightness values ​​of pixels at the same physical location within the micro-region in the obtained image sequence are then compared temporally to identify pixels whose brightness values ​​change with the multiple preset azimuth angles, and these identified pixels are determined as coating defects. Specifically, this method can precisely control the incident angle and azimuth of the light source so that micro-defects on the mold surface produce different optical responses under different illumination conditions. By acquiring a series of images and comparing the brightness changes of the same pixel in these images, areas where defects may exist can be preliminarily identified. This utilizes the sensitivity of grazing illumination to minute surface undulations to enhance the contrast of defects. However, in its implementation, simple time-sequential comparison analysis alone is insufficient to accurately distinguish between coating defects and non-defect areas. For example, inherent textures on the mold surface and uneven lighting can cause variations in brightness values, leading to misjudgments. Furthermore, different types of coating defects can result in different brightness variation patterns, making it difficult for simple time-series comparative analysis to comprehensively cover all defect types. Therefore, improving the accuracy and robustness of defect identification is a technical problem that needs to be solved.

[0034] To address this, this application further proposes a temporal comparative analysis of the brightness values ​​of pixels corresponding to the same physical location within a small region in the obtained image sequence, in order to identify pixels whose brightness values ​​change with multiple preset azimuth angles. The steps include:

[0035] The brightness values ​​of pixels at multiple preset azimuth angles are obtained to form a brightness response sequence;

[0036] Based on the luminance response sequence, the first morphological feature parameter of the luminance response sequence is calculated. The first morphological feature parameter is used to characterize the significance of the change in luminance value in the luminance response sequence.

[0037] Based on the luminance response sequence, the second morphological feature parameter of the luminance response sequence is calculated. The second morphological feature parameter is used to characterize the degree of concentration of the distribution of luminance value changes among multiple preset azimuth angles in the luminance response sequence.

[0038] When the first morphological feature parameter exceeds a first preset threshold and the second morphological feature parameter exceeds a second preset threshold, the pixel is identified as a coating defect, thereby identifying the pixel whose brightness value changes with multiple preset azimuth angles.

[0039] The brightness response sequence refers to a set of values ​​obtained by arranging the brightness values ​​of a pixel at a specific physical location within a tiny area of ​​the mold surface in azimuth order at each preset illumination azimuth angle during the process of sequential illumination and simultaneous image acquisition. This sequence reflects the optical response changes of the pixel under different illumination directions.

[0040] The first morphological characteristic parameter refers to a statistical measure used to quantify the severity of fluctuations or changes in brightness values ​​within a brightness response sequence. This parameter can be calculated using various statistical methods, such as the difference between the maximum and minimum values ​​of the sequence, the standard deviation, variance, or mean absolute deviation of the sequence. Its purpose is to distinguish between significant brightness changes caused by actual defects and slight fluctuations caused by background noise or subtle textures.

[0041] The second morphological characteristic parameter refers to a statistical measure used to quantify the distribution characteristics of brightness value changes (especially significant changes) in a brightness response sequence at different preset azimuth angles. This parameter can characterize whether brightness changes are concentrated in a few azimuth angles or dispersed across multiple azimuth angles. For example, it can analyze the azimuth angles where peaks or valleys occur in the sequence, as well as their number and intervals, or calculate azimuth-related statistics such as angular variance. The purpose is to distinguish the specific directional optical responses that may be caused by different types of surface features or defects.

[0042] The first preset threshold is a reference value used to determine whether the degree of change in brightness value in the brightness response sequence reaches the defect standard. This threshold can be set based on experimental data, experience, or dynamically determined based on statistical analysis, with the aim of filtering out non-defect areas where the brightness change is not obvious.

[0043] The second preset threshold is a reference value used to determine whether the concentration of brightness value changes in the azimuth angle in the brightness response sequence meets the defect standard. This threshold can be set according to the typical distribution characteristics that different defect types may exhibit, and its purpose is to further distinguish defects with specific directional responses from background noise or non-defect features.

[0044] This application's solution constructs a brightness response sequence reflecting the optical response characteristics of pixels by acquiring their brightness values ​​at different illumination azimuth angles. It is precisely because of the use of time-series, multi-azimuth angle controlled illumination that fine information about the variation of pixel brightness with illumination direction can be captured, forming a brightness response sequence with diagnostic value. Based on this, the solution further analyzes the morphological characteristics of the sequence, calculating a first morphological characteristic parameter to quantify the significance of brightness changes, and simultaneously calculating a second morphological characteristic parameter to quantify the concentration of brightness changes in azimuth angles. By comprehensively considering these two parameters and comparing them with preset thresholds, the surface state of the pixel area can be assessed more comprehensively and accurately. Only when the brightness change is sufficiently significant and exhibits a specific concentrated distribution pattern in the azimuth angle is it determined to be a coating defect. This morphological feature-based analysis method can effectively distinguish between brightness changes with specific optical response patterns caused by real defects (such as peeling or cracks) and random or diffuse brightness changes caused by inherent mold texture, slight surface unevenness, or fluctuations in ambient light. Therefore, this solution significantly improves the accuracy and robustness of coating defect identification by performing more in-depth and multi-dimensional feature extraction and analysis on time-series image data acquired under controlled lighting, overcoming the limitation of easy misjudgment in simple time-series comparisons.

[0045] In some preferred embodiments, specifically, the brightness values ​​of the pixel to be detected can first be acquired at multiple preset azimuth angles (e.g., 36 azimuth angles from 0 to 350 degrees, spaced at 10-degree intervals), forming a brightness response sequence containing 36 values. Next, the variance of this brightness response sequence can be calculated as a first morphological feature parameter; the larger the variance, the more drastic and significant the fluctuation of the brightness value with changes in azimuth angle. Simultaneously, the brightness response sequence can be analyzed to identify azimuth angles where local peaks in brightness values ​​occur. For example, if the brightness value is significantly higher near a certain azimuth angle than its adjacent azimuth angles, then that azimuth angle is considered a peak azimuth angle. Then, the number of these peak azimuth angles can be counted, and their distribution over the entire 360-degree range can be analyzed, for example, by calculating the angular variance or angular standard deviation of these peak azimuth angles to characterize the degree of concentration of their distribution. Finally, a first preset threshold (e.g., variance greater than a certain value) and a second preset threshold (e.g., angular variance less than a certain value) are set. When the calculated variance exceeds the first preset threshold and the angular variance is less than the second preset threshold, the pixel is determined to be a coating defect.

[0046] The above technical solution enables more accurate identification of coating defects based on the morphological characteristics of pixel brightness response sequences, effectively distinguishing between real defects and non-defect areas, reducing the false judgment rate, and improving the reliability of defect detection.

[0047] In some embodiments of this application, a second morphological feature parameter for calculating the brightness response sequence is proposed to characterize the degree of concentration of brightness value changes among multiple preset azimuth angles. However, in its implementation, it is not enough to merely characterize the degree of concentration of brightness value changes among multiple preset azimuth angles. In reality, due to the complexity of the mold surface and the diversity of defects, the brightness response sequence may exhibit various different distribution patterns. For example, brightness value changes may be concentrated in a few azimuth angles, or they may be dispersed in multiple azimuth angles, or even multiple separate clustering areas may appear. Different distribution patterns may correspond to different types of defects or interference factors. If these distribution patterns cannot be carefully distinguished and judged, it is difficult to accurately identify coating defects, and it is easily affected by interference factors such as transparent residual films, leading to misjudgment.

[0048] In this regard, this application further proposes steps for calculating the second morphological feature parameters of the luminance response sequence, including:

[0049] The acquired luminance response sequence is analyzed to identify a set of peak azimuth angles in which the luminance value changes exhibit local peaks in the luminance response sequence;

[0050] Based on a set of identified peak azimuth angles, the number of peak azimuth angles is counted, and the distribution pattern of peak azimuth angles in multiple preset azimuth angles is analyzed.

[0051] When the number of peak azimuth angles is less than a first quantity threshold and the distribution pattern of the peak azimuth angles is characterized as a single cluster, the second morphological characteristic parameter is determined as a first reference value, and the first reference value represents the degree of high distribution concentration.

[0052] When the number of peak azimuth angles is greater than or equal to a first quantity threshold and less than a second quantity threshold, and the distribution pattern of the peak azimuth angles is characterized as multiple separate clustered regions, the second morphological feature parameter is determined as a second reference value. The distribution concentration represented by the second reference value is lower than the distribution concentration represented by the first reference value, and the second reference value is set to be higher than the expected range of the second morphological feature parameter corresponding to the brightness response sequence generated by the transparent residual film.

[0053] Among them, identifying a set of peak azimuth angles in the brightness response sequence that show local peak values ​​refers to determining those azimuth angles where the brightness value reaches an extreme value or the trend of change changes significantly with the azimuth angle by analyzing the brightness response sequence. Specifically, this can be done by calculating the difference or derivative of the brightness response sequence and identifying the azimuth angles corresponding to its zero point or extreme point. The purpose is to extract the most representative azimuth angle information in the brightness response sequence that is closely related to the changes in surface optical response.

[0054] Among them, analyzing the distribution pattern of peak azimuth angles in multiple preset azimuth angles refers to the quantitative description of the spatial arrangement characteristics of a set of identified peak azimuth angles. Specifically, this can be achieved by calculating the angular variance and angular standard deviation of the peak azimuth angle set, or by methods such as cluster analysis. Its purpose is to distinguish whether the brightness response sequence is caused by a single directional feature or by multiple directional features or complex structures.

[0055] Among them, the distribution pattern of peak azimuth angle is characterized as a single cluster, which means that a set of peak azimuth angles is concentrated in a narrow angular range among multiple preset azimuth angles. Specifically, it can be achieved by judging whether the dispersion index (such as angular variance or angular standard deviation) of the peak azimuth angle set is less than a preset threshold, or by judging whether there is a single main cluster through cluster analysis results. Its purpose is to characterize that the change in brightness value has a high degree of directional concentration.

[0056] Among them, the distribution pattern of peak azimuth angle is characterized by multiple separate clustering regions, which means that a set of peak azimuth angles are identified and distributed in two or more mutually spaced angular ranges among multiple preset azimuth angles. Specifically, it can be achieved by performing cluster analysis on the peak azimuth angles and judging whether the number of clusters is greater than one, and whether there is a significant interval between each cluster. Its purpose is to characterize that the change in brightness value is caused by factors in multiple different directions.

[0057] This application's solution, through in-depth analysis of the acquired luminance response sequence, more accurately characterizes the concentration of luminance value changes across multiple preset azimuth angles. Specifically, the luminance response sequence is first analyzed to identify a set of peak azimuth angles where luminance value changes exhibit local peaks. These peak azimuth angles represent the directions where the optical response changes of pixels are most significant under different illumination directions, and they are key information characterizing surface features. Based on the identified peak azimuth angles, the number of peak azimuth angles is further counted, and the spatial distribution pattern of these peak azimuth angles across multiple preset azimuth angles is analyzed. The number of peaks provides a preliminary measure of the complexity of luminance changes, while the distribution pattern (e.g., whether it is concentrated in one area or dispersed across multiple areas) reveals the geometric or physical properties of the surface features causing the luminance changes.

[0058] Because of the detailed classification and judgment of the number and distribution pattern of peak azimuth angles, this scheme can assign different values ​​to the second morphological feature parameter according to different response characteristics. When the number of peak azimuth angles is small (less than the first quantity threshold) and the distribution pattern shows a single cluster, this usually corresponds to surface features with clear directionality or strong locality, such as typical scratches or pits. In this case, the second morphological feature parameter is set to a higher first reference value to reflect its highly concentrated distribution characteristics. When the number of peak azimuth angles is moderate (greater than or equal to the first quantity threshold and less than the second quantity threshold) and the distribution pattern shows multiple separated clustered areas, this may correspond to more complex surface structures or the superposition effect of multiple factors. In this case, the second morphological feature parameter is set to a second reference value lower than the first reference value to reflect its relatively dispersed distribution characteristics.

[0059] Furthermore, to effectively distinguish between coating defects and interfering factors such as transparent residual films, this scheme sets the second reference value to be higher than the expected range of the second morphological characteristic parameters corresponding to the brightness response sequence generated by the transparent residual film. This is because although the transparent residual film may cause brightness changes, its optical response mode at different azimuth angles differs from that of physical coating defects. It typically does not produce significant and independent peak responses in multiple separate azimuth angle regions, or even if it does produce peaks, the number and distribution pattern of these peaks will result in second morphological characteristic parameter values ​​calculated that are lower than the second reference value set for physical defects. In this way, this scheme can effectively distinguish different types of surface responses using the second morphological characteristic parameters, particularly differentiating physical defects with specific distribution patterns from transparent residual films.

[0060] Therefore, by combining the first morphological feature parameters to measure the significance of brightness changes, this scheme can more accurately identify pixels caused by coating defects by comprehensively analyzing and classifying the amplitude and distribution pattern of the brightness response sequence, which significantly improves the accuracy and robustness of defect detection, especially on complex mold surfaces with multiple surface features and interference factors.

[0061] In some preferred embodiments, the step of calculating the second morphological characteristic parameters of the luminance response sequence described above can be specifically implemented as follows: First, analyze the acquired luminance response sequence and identify a set of peak azimuth angles where the luminance value changes exhibit local peaks. This can be achieved by calculating the discrete difference sequence of the luminance response sequence relative to the azimuth angles and identifying the azimuth angles corresponding to points in the difference sequence with large rates of change of value or points where the sign changes. These identified azimuth angles constitute a set of peak azimuth angles.

[0062] Furthermore, based on the identified set of peak azimuth angles, the number of peak azimuth angles is counted. Simultaneously, the distribution pattern of the peak azimuth angles across multiple preset azimuth angles is analyzed. For example, the angular variance or angular standard deviation of this set of peak azimuth angles can be calculated, or clustering algorithms (such as density-based clustering or K-means clustering) can be used to analyze these azimuth angles to determine whether they are centrally or dispersedly distributed.

[0063] Specifically, when the number of peak azimuth angles obtained from statistics is less than a preset first number threshold, and the analysis determines that the peak azimuth angles are concentrated in a narrow angular range (for example, the angular variance is less than a preset value, which is characterized as a single cluster), the second morphological feature parameter of the pixel is determined to be a higher first reference value.

[0064] As another specific implementation, when the number of peak azimuth angles obtained statistically is greater than or equal to a first quantity threshold but less than a preset second quantity threshold, and analysis determines that the peak azimuth angles are dispersed within multiple mutually separate angular ranges (e.g., cluster analysis identifies multiple separate cluster regions), the second morphological feature parameter of that pixel is determined to be a second reference value lower than the first reference value. This second reference value is set to be higher than the typical numerical range of the second morphological feature parameter obtained by analyzing the brightness response sequence of a known transparent residual film region. The first quantity threshold, the second quantity threshold, the first reference value, and the second reference value can be determined by analyzing and calibrating training data containing different types of surface features and interfering factors.

[0065] Through the above technical solution, this application can more precisely quantify and classify the distribution concentration of brightness value changes in a brightness response sequence. By identifying the peak azimuth angle in the brightness response sequence and analyzing its quantity and distribution pattern, response patterns caused by different types of surface features or defects can be distinguished. In particular, by setting different reference values ​​and combining quantity thresholds and distribution pattern judgments, it is possible to effectively distinguish defects with highly concentrated distribution characteristics, defects with multiple separated and clustered distribution characteristics, and responses caused by interference factors such as transparent residual films. Therefore, the accuracy and reliability of identifying micron-scale coating defects in complex mold surface environments are significantly improved, and misjudgments are reduced.

[0066] In some embodiments described above in this application, a first morphological feature parameter for calculating the brightness response sequence is proposed. Specifically, the calculation of the first morphological feature parameter can be achieved by directly calculating the variance or standard deviation of the brightness response sequence to characterize the significance of the brightness value change in the brightness response sequence. This can initially quantify the fluctuation of the brightness value. However, in its implementation, since the coating itself may have an inherent optical background response, this background response will affect the accuracy of the brightness value, thereby affecting the calculation result of the first morphological feature parameter, resulting in the inability to accurately identify coating defects.

[0067] In this regard, this application further proposes steps for calculating the first morphological feature parameters of the luminance response sequence, including:

[0068] Calculate the statistical reference value of the brightness response sequence. The statistical reference value is used to quantify the inherent optical background response intensity of the coating in the corresponding small region of the brightness response sequence.

[0069] Based on the preset functional relationship between each brightness value in the brightness response sequence and the calculated statistical reference quantity, the brightness values ​​in the brightness response sequence are normalized to generate a set of normalized brightness values. The normalized brightness values ​​are used to compensate for the local differences in the inherent optical background response intensity of the coating.

[0070] Based on a set of normalized brightness values, a statistical index is calculated to characterize the amplitude of numerical fluctuations within the sequence of normalized brightness values, and this statistical index is determined as the first morphological feature parameter.

[0071] To better understand the above technical solution, some of the technical features involved are explained below. The statistical reference quantity refers to the numerical value that quantifies the inherent optical background response intensity of a small region of the coating. It can be achieved using the mean, median, mode of the brightness response sequence, or a value obtained based on a specific algorithm (such as calculating the mean after iteratively removing outliers). The preset functional relationship describes the mathematical relationship between the original brightness value, the statistical reference quantity, and the normalized brightness value. It can be achieved using subtraction, division, logarithmic transformation, or a more complex nonlinear function model. The normalization operation is the process of converting the original brightness value into a normalized brightness value according to the preset functional relationship, with the purpose of eliminating or reducing the influence of the background response. The normalized brightness value is the brightness value sequence after normalization operation, used to compensate for local differences in the inherent optical background response intensity of the coating. The statistical index is a quantity that characterizes the amplitude of numerical fluctuations within the normalized brightness value sequence. It can be achieved using variance, standard deviation, range, mean absolute deviation, or energy or amplitude indices obtained based on frequency analysis (such as Fourier transform).

[0072] The solution presented in this application forms a complete processing flow through the aforementioned steps. First, the solution calculates a statistical reference quantity to quantify the inherent optical background response intensity of the coating in a small region. Because of the local differences in the optical properties of the coating surface, directly using the original brightness value to calculate the fluctuation amplitude would be affected by the background response. By calculating the statistical reference quantity, a benchmark value representing the background light intensity of that region can be obtained. Based on this, according to a preset functional relationship, the brightness values ​​in the brightness response sequence are normalized to generate a set of normalized brightness values. This step uses the statistical reference quantity to compensate for the local differences in the inherent optical background response intensity of the coating. By associating the original brightness value with the statistical reference quantity, the original value is transformed into a relative value, thereby reducing the influence of background light intensity differences on the brightness value, making the normalized brightness value more reflective of brightness changes caused by defects. Furthermore, based on the generated set of normalized brightness values, a statistical index characterizing the numerical fluctuation amplitude within the set of normalized brightness value sequences is calculated and determined as the first morphological characteristic parameter. Since the normalized brightness values ​​have already compensated for the differences in background light intensity, the statistical indicators calculated based on these values ​​can more accurately reflect the fluctuation range within the brightness response sequence, i.e., the significance of brightness value changes. The solution in this application compensates for the background response of the original brightness values ​​before calculating the first morphological feature parameters, enabling the calculated first morphological feature parameters to more realistically reflect the significance of brightness changes caused by defects in pixels. This improves the accuracy of the first morphological feature parameters, thereby enhancing the reliability of subsequent defect determination based on the first and second morphological feature parameters, and ultimately improving the accuracy of the entire method in identifying coating defects.

[0073] In some preferred embodiments, the above steps can be implemented as follows. For example, when calculating the statistical reference value of the brightness response sequence, the mean of the brightness response sequence can be calculated first as a preliminary reference. To improve robustness, the existence of extreme values ​​in the sequence can be further analyzed. For example, by calculating the deviation of each brightness value from the mean, if the deviation exceeds a certain threshold, the brightness value is considered an isolated brightness value. After removing these isolated brightness values, the mean or median of the remaining brightness values ​​is calculated and determined as the statistical reference value. When performing normalization, the preset functional relationship can be simply achieved using a subtraction model, that is, subtracting the statistical reference value from the original brightness value to obtain the normalized brightness value. Alternatively, a division model can be used, dividing the original brightness value by the statistical reference value. More complexly, a functional model, such as a linear or nonlinear model, can be constructed to describe the relationship between the original brightness value, the statistical reference value, and the surface state change, and the normalization process can be performed using this model. When calculating the statistical index characterizing the fluctuation amplitude, its variance or standard deviation can be calculated based on a set of generated normalized brightness values. Variance or standard deviation can effectively quantify the degree of dispersion of values ​​in a sequence relative to its mean, i.e., the amplitude of fluctuation. The calculated variance or standard deviation is determined as the first morphological characteristic parameter.

[0074] The above technical solution calculates statistical reference values ​​to quantify the inherent optical background response intensity of the coating in a small region before calculating the first morphological feature parameters. The original brightness values ​​are then normalized according to a preset functional relationship to generate a set of normalized brightness values ​​that compensate for local differences in the background response. The statistical indicators calculated based on these normalized brightness values ​​serve as the first morphological feature parameters, more accurately characterizing the significance of brightness value changes caused by defects in the brightness response sequence. This effectively avoids interference from the inherent optical background response of the coating on defect identification and improves the accuracy of defect identification.

[0075] In some embodiments described above, a statistical reference quantity for calculating the luminance response sequence is proposed. Based on this statistical reference quantity, the luminance values ​​of the luminance response sequence are normalized to generate a set of normalized luminance values ​​to compensate for local differences in the inherent optical background response intensity of the coating. However, during implementation, the luminance response sequence may contain isolated luminance values ​​due to noise or other interference factors. These isolated luminance values ​​can severely affect the calculation accuracy of the statistical reference quantity, thereby affecting the accuracy of the normalization operation and ultimately leading to errors in defect identification.

[0076] In this regard, this application further proposes steps for calculating the statistical reference value of the luminance response sequence, including:

[0077] For each luminance value in the luminance response sequence, calculate an index to characterize the degree of dispersion of that luminance value relative to other luminance values ​​in the luminance response sequence;

[0078] Based on the index of the dispersion of each calculated brightness value, it is possible to identify whether there are isolated brightness values ​​in the brightness response sequence;

[0079] If isolated brightness values ​​are identified, they are removed from the brightness response sequence to form a brightness sequence. A statistical reference value is then calculated based on the brightness sequence. The statistical reference value is used to quantify the inherent optical background response intensity of the coating in the corresponding micro-region of the brightness response sequence.

[0080] If no isolated luminance values ​​are identified, a statistical reference value is calculated based on the luminance response sequence. The statistical reference value is used to quantify the inherent optical background response intensity of the coating in the corresponding micro-region of the luminance response sequence.

[0081] Statistical reference measures are indices used to characterize the dispersion of a luminance value relative to other luminance values ​​in a luminance response sequence. They are quantitative representations of the deviation of a single luminance value from other values ​​in the sequence. This can be achieved by calculating the difference between the luminance value and the sequence mean or median, the ratio of this difference to the sequence standard deviation or interquartile range (e.g., Z-score, modified Z-score), or by calculating the deviation based on local neighborhood statistics (e.g., local mean, local median). Isolated luminance values ​​are anomalous values ​​in a luminance response sequence that differ significantly from most other luminance values ​​in the sequence. These are typically abnormally high or low values ​​caused by transient noise or interference. Identifying the existence of isolated luminance values ​​in a luminance response sequence involves comparing the calculated dispersion index of each luminance value with a preset threshold to determine if there are any isolated points with abnormal values ​​in the sequence. Removing isolated luminance values ​​to form a luminance sequence involves removing the luminance values ​​identified as isolated points from the original luminance response sequence; the remaining valid luminance values ​​constitute a new sequence for subsequent calculations. Statistical reference quantities are statistical quantities used to represent the overall or partial brightness levels of a brightness response sequence. Their purpose is to quantify the inherent optical background response intensity of the coating in a corresponding small area. They can be achieved by using the arithmetic mean, median, or weighted average of the brightness sequence after removing isolated values.

[0082] The proposed solution quantifies the anomaly of each brightness value within its sequence by calculating its dispersion index relative to other brightness values ​​in the sequence. Based on these dispersion indices, isolated brightness values ​​can be identified within the brightness response sequence. Different processing strategies are employed based on the identification results: if isolated brightness values ​​exist, they are removed from the sequence, and a statistical reference value is calculated based on the brightness sequence after removing isolated values; if no isolated brightness values ​​exist, the statistical reference value is directly calculated based on the original brightness response sequence. This approach effectively avoids interference from isolated brightness values ​​in the calculation of the statistical reference value, allowing the calculated statistical reference value to more accurately reflect the inherent optical background response intensity of the coating in the corresponding micro-region. The more accurate statistical reference value serves as input for subsequent normalization operations, enabling the normalization process to more effectively compensate for local differences in the inherent optical background response intensity of the coating, thereby generating more accurate normalized brightness values. The first morphological feature parameters calculated based on these more accurate normalized brightness values ​​can more reliably characterize the significance of brightness value changes, thus improving the accuracy and reliability of defect identification.

[0083] In some preferred embodiments, specifically, for each luminance value in the luminance response sequence, its Z-score can be calculated as an indicator of dispersion. The Z-score is calculated by subtracting the mean of the sequence from the luminance value and then dividing by the standard deviation of the sequence. A preset Z-score threshold, such as 2.5, is then set. If the absolute value of the Z-score for a luminance value exceeds 2.5, the luminance value is determined to be an isolated luminance value. If one or more isolated luminance values ​​are identified, these isolated luminance values ​​are removed from the original luminance response sequence to form a new luminance sequence. Next, the arithmetic mean of this new luminance sequence is calculated, and this mean is determined as a statistical reference. If no isolated luminance values ​​are identified, the arithmetic mean of the original luminance response sequence is directly calculated and determined as a statistical reference.

[0084] By identifying and eliminating isolated brightness values ​​in the brightness response sequence, the interference of abnormal data on the calculation of statistical reference values ​​is avoided, thus improving the accuracy of the calculation. More accurate statistical reference values ​​enable subsequent normalization operations to more effectively compensate for local differences in the inherent optical background response intensity of the coating, thereby improving the accuracy and reliability of defect identification based on normalized brightness values.

[0085] In some embodiments described above in this application, a normalization operation is proposed to be performed on each brightness value in the brightness response sequence based on a preset functional relationship between each brightness value in the brightness response sequence and a calculated statistical reference quantity, so as to generate a set of normalized brightness values ​​to compensate for local differences in the inherent optical background response intensity of the coating. Specifically, the normalization operation based on the preset functional relationship between each brightness value in the brightness response sequence and the calculated statistical reference quantity can be achieved by setting a fixed linear functional relationship, such as subtracting or dividing each brightness value by a statistical reference quantity (such as the average brightness value). This can reduce the influence of background brightness to a certain extent. However, in its implementation, how to determine this preset functional relationship and how to use the statistical reference quantity for normalization operation to more effectively reduce the influence of the inherent optical background response intensity of the coating and ensure that the normalized brightness values ​​can accurately characterize surface state changes is a problem that needs to be solved.

[0086] In response, this application further proposes a step for normalizing each luminance value in the luminance response sequence based on a preset functional relationship between each luminance value in the luminance response sequence and the calculated statistical reference quantity. This step includes:

[0087] The preset functional relationship is determined to be a function model, which represents the correlation between each brightness value in the brightness response sequence, the calculated statistical reference quantity, and the surface state change.

[0088] Based on the determined function model and using the calculated statistical reference, the brightness values ​​in the brightness response sequence are processed to obtain a set of normalized brightness values. The normalized brightness values ​​reduce the influence of the inherent optical background response intensity of the coating, and the normalized brightness values ​​characterize the surface state changes.

[0089] The pre-defined functional relationship, defined as a function model, is a mathematical model that describes the quantitative relationship between input variables (brightness values ​​and statistical reference values ​​in the brightness response sequence) and output variables (surface state changes or related normalized brightness values). This model can be implemented using multinomial, exponential, logarithmic, or machine learning-based nonlinear models, aiming to provide a precise mathematical basis for subsequent normalization. The function model characterizes the correlation between brightness values ​​in the brightness response sequence, calculated statistical reference values, and surface state changes. This means the model can capture how the original brightness value is jointly affected by the coating's inherent optical background response intensity (quantified by the statistical reference value) and actual surface state changes (such as defects). It can also inversely deduce or separate the part more directly related to surface state changes, aiming to establish a mathematical framework that distinguishes between background influences and actual surface changes. Based on the determined function model and using the calculated statistical reference value, the brightness... Processing the brightness values ​​in the brightness response sequence means taking each original brightness value in the brightness response sequence as input, combining it with the corresponding statistical reference quantity, and calculating or transforming it by applying the function model to obtain a new value. This can be achieved by substituting the original brightness value into the function model for calculation, or by using model parameters to correct the original brightness value. The purpose is to compensate for or remove the background influence contained in the original brightness value. Among them, a set of normalized brightness values ​​is obtained. The normalized brightness values ​​reduce the influence of the inherent optical background response intensity of the coating, and the normalized brightness values ​​represent the surface state change. This means that the series of new brightness values ​​obtained after processing by the function model, compared with the original brightness values, mainly reflect the changes in surface state (such as the presence of defects and the degree of defects), while the background brightness difference caused by the uneven optical properties of the coating itself or uneven illumination is significantly reduced. The purpose is to enable subsequent analysis based on these normalized brightness values ​​(such as calculating the first morphological feature parameters) to more accurately identify the real surface defects.

[0090] This application's solution overcomes the problem that simple linear normalization cannot effectively handle complex background interference by defining a function model to accurately characterize the complex relationship between the original brightness value, statistical reference (quantifying background intensity), and surface state changes. Because this function model can capture the nonlinear response of brightness values ​​to surface state changes under different background conditions, subsequent normalization processing based on this model can more effectively separate background influences from the original brightness value. By inputting the original brightness value and statistical reference into this function model, a new set of normalized brightness values ​​is obtained. Compared to the original values, these normalized brightness values ​​more directly and accurately reflect the surface state of the pixel location, such as the presence of minor defects. This processing method effectively reduces background brightness differences caused by factors such as uneven optical properties of the coating itself or uneven illumination, allowing subsequent morphological feature parameters (such as the first morphological feature parameter) calculated based on the normalized brightness values ​​to more accurately quantify the significance of brightness fluctuations caused by surface state changes. Therefore, this scheme improves the accuracy and robustness of brightness response sequence analysis by introducing a normalization step based on a function model, on the basis of calculating the first morphological feature parameters. Thus, under the overall framework of using morphological feature parameters to identify defects, it enhances the detection capability of micron-level coating defects, especially under complex curved surfaces and non-uniform background conditions.

[0091] In some preferred embodiments, the preset functional relationship can be determined as a quadratic polynomial function model. This model can be expressed as N = f(L, S), where N is the normalized luminance value, L is the original luminance value in the luminance response sequence, and S is a calculated statistical reference. For example, the model can be specifically N = a*L^2 + b*L*S + c*S^2 + d*L + e*S + g, where a, b, c, d, e, and g are coefficients obtained through regression analysis of luminance response data from known background and defect areas. The statistical reference can be a robust statistic of the luminance response sequence, such as the median or truncated mean. Based on the determined quadratic polynomial function model and using the calculated statistical reference (such as the median), each original luminance value in the luminance response sequence is processed. Specifically, each original luminance value L_i in the luminance response sequence and the statistical reference value S of the sequence are substituted into the function model N_i = a*L_i^2 + b*L_i*S + c*S^2 + d*L_i + e*S + g for calculation, thereby obtaining a set of corresponding normalized luminance values ​​N_i. Compared with the original luminance value L_i, the numerical changes of this set of normalized luminance values ​​N_i can more accurately reflect the surface state changes at the pixel location, while the influence of the inherent optical background response intensity of the coating is significantly reduced.

[0092] The above technical solution establishes a specific method for defining the pre-defined functional relationship between each brightness value in the brightness response sequence and the calculated statistical reference value. Specifically, it defines this relationship as a functional model that characterizes the correlation between each brightness value in the brightness response sequence, the calculated statistical reference value, and surface state changes. Based on this functional model, and by processing each brightness value in the brightness response sequence using the calculated statistical reference value, a set of normalized brightness values ​​can be obtained that effectively reduces the influence of the coating's inherent optical background response intensity. These normalized brightness values ​​can more accurately characterize the surface state changes at pixel locations, thus providing a more reliable data foundation for subsequent calculation of morphological feature parameters and defect identification based on normalized brightness values, improving the accuracy and robustness of defect detection.

[0093] In some embodiments described above, a statistical index is proposed to calculate a set of normalized brightness values ​​to characterize the amplitude of numerical fluctuations within the sequence of normalized brightness values. This statistical index is then defined as a first morphological feature parameter. Specifically, the calculated statistical index can quantify the fluctuation amplitude by calculating the mean absolute deviation of the normalized brightness value sequence. This can initially characterize the significance of brightness value changes in the brightness response sequence. However, in its implementation, relying solely on the significance of brightness value changes may not accurately distinguish between defects and noise. For example, inherent textures on the mold surface or uneven lighting may also cause significant changes in brightness values, even though these changes are not caused by coating defects. Therefore, how to more accurately quantify the fluctuation amplitude of the brightness response sequence to distinguish between brightness changes caused by defects and those caused by other factors is a problem that needs to be solved.

[0094] In response, this application further proposes a step of calculating the variance of a normalized brightness value sequence based on a generated set of normalized brightness values; using the calculated variance as a statistical index, and determining the statistical index as a first morphological feature parameter.

[0095] The variance of the normalized luminance value sequence refers to the average of the squares of the differences between a set of normalized luminance values ​​and their mean, which can be calculated using standard statistical methods. Statistical indicators are numerical values ​​used to quantify a certain characteristic of a set of data; here, they specifically characterize the fluctuation range of values ​​within the normalized luminance value sequence, and can be implemented using various statistical measures such as variance, standard deviation, and mean absolute deviation. The primary morphological characteristic parameter is a parameter used to characterize the significance of changes in luminance values ​​in the luminance response sequence; it can be determined by the variance, standard deviation, or other statistical indicators that reflect the fluctuation range of the normalized luminance value sequence.

[0096] The proposed solution calculates the variance of a normalized brightness value sequence based on a generated set of normalized brightness values, and uses this variance as a statistical indicator to determine a first morphological feature parameter. First, the variance of the normalized brightness value sequence is calculated based on the generated set of normalized brightness values. Variance effectively reflects the dispersion of a set of data, i.e., the degree to which the data deviates from its average value. Here, a larger variance in the normalized brightness value sequence indicates a greater fluctuation in the numerical values ​​within the sequence, which may indicate the presence of coating defects in that area. Defects can cause abnormal light reflection, leading to drastic changes in brightness values. By using normalized brightness values, the influence of local differences in the inherent optical background response intensity of the coating can be eliminated or reduced, making the variance calculation result more reflective of brightness changes caused by defects. Then, the calculated variance is used as a statistical indicator, and this statistical indicator is determined as the first morphological feature parameter. By using variance as the first morphological feature parameter, the fluctuation range of the brightness response sequence can be quantified more accurately. Compared to other statistical indicators, such as the mean or median, variance is more sensitive to capturing local changes in brightness values, thereby improving the accuracy of defect identification. This method of determining the first morphological feature parameter by calculating the variance of the normalized brightness value sequence, combined with calculating the second morphological feature parameter of the brightness response sequence, enables a more comprehensive analysis of the characteristics of the brightness response sequence. High variance indicates drastic brightness fluctuations, while high distribution concentration indicates that these drastic fluctuations are concentrated in a few azimuth angles. This combined feature pattern, such as high variance accompanied by high distribution concentration, can more effectively distinguish specific optical response patterns caused by coating defects from random or diffuse brightness variations caused by inherent textures on the mold surface, processing marks, or uneven ambient lighting. Therefore, by accurately quantifying the fluctuation amplitude and distribution pattern of brightness, this scheme can significantly improve the accuracy and robustness of coating defect identification, effectively solving the problem that it is difficult to distinguish between defects and noise by relying solely on the significance of brightness value changes.

[0097] In some preferred embodiments, for a specific pixel, after normalization, a sequence of normalized brightness values ​​can be obtained, such as [0.1, 0.8, 0.2, 0.9, 0.1, 0.7, 0.3, 0.8]. First, the average value of this set of normalized brightness values ​​is calculated, for example, 0.4875. Then, the square of the difference between each normalized brightness value and the average value is calculated, for example, (0.1-0.4875)^2, (0.8-0.4875)^2, ..., (0.8-0.4875)^2. Finally, the average of these squared differences is calculated, i.e., the variance. The calculated variance value, for example, 0.1198, is used as the first morphological feature parameter of the pixel.

[0098] By employing the aforementioned technical solution, the variance of a generated set of normalized brightness values ​​is calculated and used as the first morphological feature parameter, enabling more precise quantification of the fluctuation amplitude of the brightness response sequence. Combined with normalization processing, the influence of local differences in the inherent optical background response intensity of the coating is effectively reduced. This allows the solution to more accurately distinguish between brightness changes caused by coating defects and those caused by other factors such as inherent textures on the mold surface or uneven illumination, thereby improving the accuracy and reliability of coating defect identification.

[0099] In some embodiments described above in this application, a method is proposed to determine whether a pixel is a coating defect by calculating a first morphological feature parameter and a second morphological feature parameter of the brightness response sequence of a pixel under illumination at different azimuth angles, and comparing these parameters with a first preset threshold and a second preset threshold. Specifically, this method can quantify the optical response characteristics of a pixel by analyzing the fluctuation amplitude and peak distribution of the brightness response sequence, and then setting a fixed threshold. When both parameters exceed the threshold, the region corresponding to the pixel is considered to have a defect. This allows for the identification of coating defects based on the optical response characteristics of the pixel.

[0100] In this regard, this application further proposes a step for determining a pixel as a coating defect when the first morphological feature parameter exceeds a first preset threshold and the second morphological feature parameter exceeds a second preset threshold, including:

[0101] Obtain the first and second morphological feature parameters of multiple pixels within a tiny region where the pixel is located;

[0102] Based on the first morphological feature parameters of multiple acquired pixels, a first preset threshold corresponding to the micro-region is determined.

[0103] Based on the second morphological feature parameters of multiple acquired pixels, a second preset threshold corresponding to the micro-region is determined.

[0104] When the first morphological feature parameter of a pixel exceeds the first preset threshold and the second morphological feature parameter of a pixel exceeds the second preset threshold, the pixel is identified as a coating defect.

[0105] The term "micro-region" refers to a local neighborhood surrounding the pixel to be judged. This can be represented by a rectangular or circular region of a preset size, and its purpose is to acquire feature information about the local area surrounding the pixel. The first morphological feature parameter is a statistical measure used to characterize the significance of brightness value changes in the pixel's brightness response sequence. This can be represented by the variance, standard deviation, range, or normalized fluctuation amplitude of the brightness response sequence, and its purpose is to quantify the intensity of the pixel's response to illumination from different azimuth angles. The second morphological feature parameter is a statistical measure used to characterize the concentration of brightness value changes across multiple preset azimuth angles in the pixel's brightness response sequence. This can be represented by the number of peak azimuth angles or the angular variance of the set of peak azimuth angles. This can be achieved using angular standard deviation or other statistical measures characterizing its distribution in azimuth angle, with the aim of distinguishing the differences in azimuth angle response between different types of surface conditions (such as defects, normal coatings, and residues). The first preset threshold is a critical value used to determine whether the first morphological feature parameter of a pixel is abnormal. Specifically, it is a value adaptively determined based on the first morphological feature parameters of multiple pixels within the small region where the pixel is located, with the aim of adjusting the judgment standard according to the characteristics of the local region. The second preset threshold is a critical value used to determine whether the second morphological feature parameter of a pixel is abnormal. Specifically, it is a value adaptively determined based on the second morphological feature parameters of multiple pixels within the small region where the pixel is located, with the aim of adjusting the judgment standard according to the characteristics of the local region.

[0106] The solution in this application obtains the first and second morphological feature parameters of multiple pixels within a tiny region where the pixel to be judged is located. Based on statistical data within these local regions, it adaptively determines the first and second preset thresholds corresponding to that tiny region. Because the thresholds are determined based on the overall feature parameter distribution of the specific tiny region where the pixel is located, rather than using a globally fixed value, the judgment criteria can better adapt to the inherent optical response differences that may exist between different regions of the mold surface. For example, if the first morphological feature parameters of normal pixels in a certain tiny region are generally high due to minor changes in material or surface condition, the first preset threshold for that region can be increased accordingly by determining the threshold based on the parameters of multiple pixels in that region, thereby avoiding misjudging normal pixels in that region as defects. Conversely, if the parameters of normal pixels in a certain region are generally low, the adaptive threshold will also be reduced accordingly, helping to identify defective pixels with relatively abnormal parameters in that region. This locally adaptive threshold determination mechanism, combined with the previous method of calculating the first and second morphological feature parameters of each pixel, forms a more robust defect judgment logic. In this way, the present application can effectively compensate for the optical differences in local areas of the mold surface, making the defect judgment more accurate and reducing the occurrence of misjudgment and omission.

[0107] In some preferred embodiments, the specific implementation is as follows. Assume the pixel to be judged is located at image coordinates (x, y). First, determine a small region where the pixel is located; for example, a 5x5 pixel rectangular region centered at (x, y) can be selected. Then, obtain the pre-calculated first and second morphological feature parameters for each of the 25 pixels within this 5x5 region (including the central pixel itself). Next, based on the first morphological feature parameters of these 25 pixels, calculate their average or median, and multiply this statistical value by a preset coefficient or add a preset offset to determine the first preset threshold corresponding to the small region. Similarly, based on the second morphological feature parameters of these 25 pixels, calculate their average or median, and make similar adjustments to determine the second preset threshold corresponding to the small region. Finally, compare the first morphological feature parameter of the central pixel (x, y) itself with the first preset threshold of the region just determined, and simultaneously compare its second morphological feature parameter with the second preset threshold of the region. A pixel is identified as a coating defect only when both parameters of the center pixel exceed the adaptive threshold corresponding to its small region.

[0108] By using the above technical solution, the defect judgment threshold is adaptively determined based on the feature parameters of multiple pixels within the tiny region where the pixel is located. This effectively compensates for the inherent optical differences between different tiny regions on the mold surface, avoids the misjudgment and missed judgment problems caused by using a globally unified threshold, and thus improves the accuracy and reliability of coating defect detection.

[0109] In some embodiments described above in this application, an analysis of the distribution pattern of peak azimuth angles in multiple preset azimuth angles is proposed. Specifically, this analysis can be achieved by observing the distribution of the number of peak azimuth angles in different azimuth angle intervals. For example, it can be determined whether the number of peak azimuth angles in one or more azimuth angle intervals is much higher than in other intervals, thereby qualitatively determining whether the distribution is concentrated or dispersed. This can characterize the degree of concentration of the distribution of brightness value changes in the brightness response sequence among multiple preset azimuth angles. However, in its implementation, how to quantify the distribution pattern of peak azimuth angles in multiple preset azimuth angles so that coating defects can be identified based on the quantification results is a problem that needs to be solved.

[0110] In response, this application further proposes steps for analyzing the distribution pattern of the peak azimuth angle among multiple preset azimuth angles, including:

[0111] Based on the identified set of peak azimuth angles, calculate the angular variance or angular standard deviation of the peak azimuth angle set;

[0112] The calculated angular variance or angular standard deviation is used to determine the distribution pattern of the peak azimuth angle among multiple preset azimuth angles.

[0113] Among them, angular variance or angular standard deviation refers to the index used in statistics to measure the dispersion of a set of angular data. It can be achieved by converting the angle into a two-dimensional vector and then calculating the average length of the vector or the directional dispersion. Its purpose is to transform the concentration or dispersion of the peak azimuth angle on a circular distribution into a numerical value, thereby realizing the quantification of the distribution pattern.

[0114] The proposed solution calculates the angular variance or standard deviation of a set of identified peak azimuth angles. This calculated angular variance or standard deviation is then used to define the distribution pattern of the peak azimuth angles across multiple preset azimuth angles. Since the angular variance or standard deviation reflects the dispersion of the peak azimuth angles within their distributed angular domain—higher dispersion results in larger angular variance or standard deviation, and vice versa—it becomes possible to quantify the distribution pattern of the peak azimuth angles, thus providing a quantitative basis for subsequent defect identification. This quantification result, combined with the number of peak azimuth angles, can more accurately characterize the distribution concentration of brightness value changes across multiple preset azimuth angles in the brightness response sequence. This is then used to determine the second morphological characteristic parameters, ultimately achieving the identification of coating defects.

[0115] In some preferred embodiments, specifically, when a set of peak azimuth angles is obtained for a pixel, such as angle values ​​θ1, θ2, ..., θn, these angles can first be converted into unit vectors (cos θi, sin θi), and then the average vector length or directional dispersion of these vectors can be calculated to obtain the angular variance or angular standard deviation. For example, the length R of the average vector can be calculated, and then the angular variance can be calculated based on 1-R, and the angular standard deviation can be calculated based on the angular variance. This calculated value, such as the angular variance or angular standard deviation, is used as a quantified representation of the distribution pattern of the peak azimuth angle corresponding to that pixel among multiple preset azimuth angles.

[0116] The above technical solution quantifies the distribution pattern of peak azimuth angle in multiple preset azimuth angles, transforming the abstract distribution pattern into specific values. This provides a reliable numerical basis for subsequent identification of coating defects based on the quantification results, improving the accuracy and reliability of defect identification.

[0117] Secondly, referring to Figure 2 The diagram shows a structural block diagram of an embodiment of an automotive mold data acquisition system, which may specifically include the following modules:

[0118] The normal information acquisition module 201 is used to acquire the normal direction information of each micro-region on the cavity surface of the automotive part mold to be inspected;

[0119] The lighting control module 202 is used to control a narrowband light source of a specific wavelength to illuminate any tiny area on the surface of the cavity at multiple preset azimuth angles based on the acquired normal direction information. During the illumination period of each azimuth angle, the beam of the narrowband light source is incident at a preset grazing angle relative to the surface tangent plane of the tiny area.

[0120] The image acquisition module 203 is used to synchronously acquire one frame of image during each time-sequential illumination period, thereby obtaining an image sequence corresponding to a small area under multiple preset azimuth angles;

[0121] The defect identification module 204 is used to perform time-series comparison analysis on the brightness information of pixels corresponding to the same physical location in a small area in the obtained image sequence, so as to identify pixels whose brightness values ​​change by a preset angle with multiple preset azimuth angles, and to determine the identified pixels as coating defects.

[0122] Preferably, the defect identification module includes:

[0123] The brightness response sequence submodule is used to obtain the brightness values ​​of the pixel at multiple preset azimuth angles to form a brightness response sequence.

[0124] The first calculation submodule is used to calculate a first morphological feature parameter of the brightness response sequence based on the brightness response sequence. The first morphological feature parameter is used to characterize the significance of the brightness value change in the brightness response sequence.

[0125] The second calculation submodule is used to calculate the second morphological feature parameter of the brightness response sequence based on the brightness response sequence. The second morphological feature parameter is used to characterize the degree of distribution concentration of brightness value changes in the brightness response sequence among the multiple preset azimuth angles.

[0126] The determination submodule is used to determine the pixel as a coating defect when the first morphological feature parameter exceeds a first preset threshold and the second morphological feature parameter exceeds a second preset threshold, thereby identifying the pixel whose brightness value changes with the preset azimuth angle.

[0127] Preferably, the second calculation submodule includes:

[0128] The first analysis unit is used to analyze the acquired brightness response sequence to identify a set of peak azimuth angles in which the brightness value changes show local peaks in the brightness response sequence.

[0129] The statistical unit is used to count the number of peak azimuth angles based on the identified set of peak azimuth angles, and to analyze the distribution pattern of the peak azimuth angles among the multiple preset azimuth angles;

[0130] The first determining unit is used to determine the second morphological feature parameter as a first reference value when the number of peak azimuth angles is less than a first quantity threshold and the distribution pattern of the peak azimuth angles is characterized as a single cluster. The first reference value represents a high degree of distribution concentration.

[0131] The second determining unit is configured to determine the second morphological feature parameter as a second reference value when the number of peak azimuth angles is greater than or equal to the first quantity threshold and less than a second quantity threshold, and the distribution pattern of the peak azimuth angles is characterized as multiple separate clustered regions. The distribution concentration represented by the second reference value is lower than the distribution concentration represented by the first reference value, and the second reference value is set to be higher than the expected range of the second morphological feature parameter corresponding to the brightness response sequence generated by the transparent residual film.

[0132] Preferably, the first calculation submodule includes:

[0133] A statistical reference unit is used to calculate a statistical reference value for the brightness response sequence, wherein the statistical reference value is used to quantify the inherent optical background response intensity of the coating in the corresponding micro-region of the brightness response sequence;

[0134] The normalization operation unit is used to perform normalization operation on each brightness value in the brightness response sequence according to the preset functional relationship between each brightness value in the brightness response sequence and the calculated statistical reference quantity, so as to generate a set of normalized brightness values. The normalized brightness values ​​are used to compensate for the local differences in the inherent optical background response intensity of the coating.

[0135] The third determining unit is used to calculate a statistical index characterizing the numerical fluctuation range within the generated set of normalized brightness values, and to determine the statistical index as the first morphological feature parameter.

[0136] Preferably, the third determining unit includes:

[0137] Based on the generated set of normalized brightness values, the variance of the normalized brightness value sequence is calculated;

[0138] The calculated variance is used as the statistical index, and the statistical index is determined as the first morphological feature parameter.

[0139] Preferably, the determining submodule includes:

[0140] The acquisition unit is used to acquire the first morphological feature parameters and the second morphological feature parameters of multiple pixels within the tiny region where the pixel is located;

[0141] The fourth determining unit is used to determine a first preset threshold corresponding to the micro-region based on the first morphological feature parameters of the acquired multiple pixels.

[0142] The fifth determining unit is used to determine a second preset threshold corresponding to the micro-region based on the second morphological feature parameters of the acquired multiple pixels.

[0143] The sixth determining unit is used to determine the pixel as a coating defect when the first morphological feature parameter of the pixel exceeds the first preset threshold and the second morphological feature parameter of the pixel exceeds the second preset threshold.

[0144] The automotive mold-based data acquisition system provided above can be used to execute the automotive mold-based data acquisition method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0145] In one embodiment, a computer device is provided, the internal structure of which can be shown as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. When the computer program is executed by the processor, it implements a method for acquiring data from an automotive mold.

[0146] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above embodiments.

[0147] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above embodiments.

[0148] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for acquiring data from automotive molds, characterized in that, include: Obtain the normal direction information of each tiny region on the cavity surface of the automotive part mold to be inspected; Based on the acquired normal direction information, a narrowband light source of a specific wavelength is controlled to illuminate any of the tiny regions on the surface of the cavity in a time-sequential manner at multiple preset azimuth angles. During the illumination period of each azimuth angle, the beam of the narrowband light source is incident at a preset grazing angle relative to the surface tangent plane of the tiny region. During each time-sequential illumination period, one frame of image is acquired synchronously to obtain an image sequence corresponding to the micro-region at the multiple preset azimuth angles; A time-series comparison analysis is performed on the brightness values ​​of pixels corresponding to the same physical location within the obtained image sequence to identify pixels whose brightness values ​​change with the multiple preset azimuth angles by a preset value, and the identified pixels are determined to be coating defects. The step of performing a time-series comparison analysis on the brightness values ​​of pixels corresponding to the same physical location within the obtained image sequence to identify pixels whose brightness values ​​change with the multiple preset azimuth angles includes: The brightness values ​​of the pixel at multiple preset azimuth angles are obtained to form a brightness response sequence; Based on the brightness response sequence, a first morphological feature parameter of the brightness response sequence is calculated, and the first morphological feature parameter is used to characterize the significance of the brightness value change in the brightness response sequence. Based on the brightness response sequence, a second morphological feature parameter of the brightness response sequence is calculated. The second morphological feature parameter is used to characterize the degree of concentration of the distribution of brightness value changes among the multiple preset azimuth angles in the brightness response sequence. When the first morphological feature parameter exceeds a first preset threshold and the second morphological feature parameter exceeds a second preset threshold, the pixel is identified as a coating defect, thereby identifying the pixel whose brightness value changes with the preset azimuth angles. The step of calculating the second morphological feature parameters of the brightness response sequence includes: The acquired luminance response sequence is analyzed to identify a set of peak azimuth angles in which the luminance value changes exhibit local peaks in the luminance response sequence; Based on a set of identified peak azimuth angles, the number of peak azimuth angles is counted, and the distribution pattern of the peak azimuth angles among the multiple preset azimuth angles is analyzed. When the number of peak azimuth angles is less than a first quantity threshold and the distribution pattern of the peak azimuth angles is characterized as a single cluster, the second morphological feature parameter is determined as a first reference value, and the first reference value represents a high degree of distribution concentration. When the number of peak azimuth angles is greater than or equal to the first quantity threshold and less than a second quantity threshold, and the distribution pattern of the peak azimuth angles is characterized as multiple separate clustered regions, the second morphological feature parameter is determined as a second reference value. The distribution concentration represented by the second reference value is lower than the distribution concentration represented by the first reference value, and the second reference value is set to be higher than the expected range of the second morphological feature parameter corresponding to the brightness response sequence generated by the transparent residual film. The step of calculating the first morphological feature parameter of the luminance response sequence based on the luminance response sequence includes: Calculate a statistical reference value for the brightness response sequence, which is used to quantify the inherent optical background response intensity of the coating in the corresponding micro-region of the brightness response sequence; Based on the preset functional relationship between each brightness value in the brightness response sequence and the calculated statistical reference quantity, a normalization operation is performed on each brightness value in the brightness response sequence to generate a set of normalized brightness values. The normalized brightness values ​​are used to compensate for the local differences in the inherent optical background response intensity of the coating. Based on a set of normalized brightness values ​​generated, a statistical index is calculated to characterize the amplitude of numerical fluctuations within the sequence of normalized brightness values, and this statistical index is determined as the first morphological feature parameter. The step of calculating a statistical index characterizing the numerical fluctuation range within the generated set of normalized brightness values, and determining the statistical index as the first morphological feature parameter, includes: Based on the generated set of normalized brightness values, the variance of the normalized brightness value sequence is calculated; The calculated variance is used as the statistical index, and the statistical index is determined as the first morphological feature parameter.

2. The method for acquiring automotive mold data according to claim 1, characterized in that, The step of calculating the statistical reference value of the luminance response sequence includes: For each brightness value in the brightness response sequence, calculate an index to characterize the degree of dispersion of that brightness value relative to other brightness values ​​in the brightness response sequence; Based on the index of the dispersion of each calculated brightness value, it is identified whether there are isolated brightness values ​​in the brightness response sequence; If the isolated brightness value is identified, the isolated brightness value is removed from the brightness response sequence to form a brightness sequence, and a statistical reference value is calculated based on the brightness sequence. The statistical reference value is used to quantify the inherent optical background response intensity of the coating in the micro-region corresponding to the brightness response sequence. If no isolated brightness value is identified, the statistical reference value is calculated based on the brightness response sequence. The statistical reference value is used to quantify the inherent optical background response intensity of the coating in the micro-region corresponding to the brightness response sequence.

3. The method for acquiring automotive mold data according to claim 1, characterized in that, The step of normalizing each brightness value in the brightness response sequence based on a preset functional relationship between each brightness value in the brightness response sequence and the calculated statistical reference quantity includes: The preset functional relationship is determined to be a functional model, which characterizes the correlation between each brightness value in the brightness response sequence, the calculated statistical reference quantity, and the surface state change. Based on the determined function model and using the calculated statistical reference, each brightness value in the brightness response sequence is processed to obtain a set of normalized brightness values. The normalized brightness values ​​reduce the influence of the inherent optical background response intensity of the coating, and the normalized brightness values ​​characterize the surface state change.

4. The method for acquiring automotive mold data according to claim 1, characterized in that, The step of determining the pixel as a coating defect when the first morphological feature parameter exceeds a first preset threshold and the second morphological feature parameter exceeds a second preset threshold includes: Obtain the first morphological feature parameters and the second morphological feature parameters of multiple pixels within the tiny region where the pixel is located; Based on the first morphological feature parameters of the acquired multiple pixels, a first preset threshold corresponding to the micro-region is determined; Based on the second morphological feature parameters of the acquired multiple pixels, a second preset threshold corresponding to the micro-region is determined; When the first morphological feature parameter of the pixel exceeds the first preset threshold and the second morphological feature parameter of the pixel exceeds the second preset threshold, the pixel is identified as a coating defect.

5. The method for acquiring automotive mold data according to claim 3, characterized in that, The step of analyzing the distribution pattern of the peak azimuth angle among the multiple preset azimuth angles includes: Based on the identified set of peak azimuth angles, calculate the angular variance or angular standard deviation of the set of peak azimuth angles; The calculated angular variance or the angular standard deviation is determined as the distribution pattern of the peak azimuth angle among the multiple preset azimuth angles.

6. A data acquisition system, used solely for implementing the automotive mold data acquisition method according to any one of claims 1-5, characterized in that, The system includes: The normal information acquisition module is used to acquire the normal direction information of each tiny area on the cavity surface of the automotive part mold to be inspected; The lighting control module is used to control a narrowband light source of a specific wavelength to illuminate any of the tiny regions on the surface of the cavity at multiple preset azimuth angles based on the acquired normal direction information. During the illumination period of each azimuth angle, the beam of the narrowband light source is incident at a preset grazing angle relative to the surface tangent plane of the tiny region. The image acquisition module is used to synchronously acquire one frame of image during each time-sequential illumination period, thereby obtaining an image sequence corresponding to the micro-region under the multiple preset azimuth angles; The defect identification module is used to perform time-series comparison analysis on the brightness information of pixels corresponding to the same physical location within the obtained image sequence, so as to identify pixels whose brightness values ​​change by a preset azimuth angle, and to determine the identified pixels as coating defects.

Citation Information

Patent Citations

  • Intelligent mobile phone defect detection method and system

    CN120558973A

  • Surface defect inspecting device

    JP1998010052A