Method and system for identifying surface defects of environmentally friendly coating of a plate based on machine vision

By constructing a structural tensor matrix and inversely modulating the flow field, combined with the phase entropy index, the problems of missed detection and false alarms in the detection of micro-bubbles on the surface of the board were solved, and high-precision bubble recognition was achieved.

CN122115328APending Publication Date: 2026-05-29QIXING HOME (SUQIAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QIXING HOME (SUQIAN) CO LTD
Filing Date
2026-01-13
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies struggle to distinguish between complex wood grain backgrounds and bubble features when detecting tiny bubbles on board surfaces, leading to high rates of missed detections and false alarms. Furthermore, they are difficult to remove interference from stains and dirt.

Method used

By constructing a structural tensor matrix, calculating the local linearity factor to inversely modulate the flow field, generating a divergence potential energy map, and using the phase entropy exponent to screen for bubble defects, and combining the refracted light field characteristics of the bubble to eliminate interference.

Benefits of technology

It achieves high-precision and robust recognition of tiny bubbles against a complex wood grain background, reducing the false alarm rate and reducing the false negative rate, while improving the signal-to-noise ratio.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115328A_ABST
    Figure CN122115328A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of image recognition, and particularly relates to a plate environmental protection coating surface defect identification method and system based on machine vision, which comprises the following steps: constructing a structure tensor matrix and calculating a local linearity factor; inversely modulating an original gradient vector by using the local linearity factor to construct an inverse modulation flow field; calculating the divergence of the inverse modulation flow field to generate a divergence potential energy diagram, and extracting a suspected defect center according to the local extreme value of the divergence potential energy diagram; and constructing a phase entropy index of the suspected defect center, and comparing the phase entropy index with a bubble determination threshold to determine a bubble defect. The present application can effectively suppress the interference of a high linearity wood grain background, distinguish bubble defects from surface stains and dirt, and improve the accuracy and robustness of plate coating surface defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology. More specifically, this invention relates to a method and system for identifying surface defects in environmentally friendly coatings for sheet materials based on machine vision. Background Technology

[0002] In the fields of high-end panel furniture and intelligent manufacturing, the coating process on the surface of the panels is a key factor determining the final appearance quality and weather resistance of the product. To balance environmental protection and aesthetics, a high-viscosity transparent or semi-transparent biomass resin coating is usually applied after lamination in the production process. However, due to the rheological properties of the resin material, tiny air bubbles are easily trapped inside the coating during high-speed curing and leveling. These air bubbles not only severely damage the smoothness and visual appeal of the panel surface, but may also induce coating peeling during long-term use. Therefore, achieving high-precision online detection of such minute appearance defects has become a core requirement for improving yield and automation levels.

[0003] Currently, the detection of tiny bubbles on the surface of boards mainly relies on industrial vision technology. Most of the existing mainstream solutions use image recognition algorithms based on spatial frequency domain analysis. The core logic is usually to first filter out the background texture and then extract the abnormal target. Specifically, traditional technologies often attempt to use filtering, wavelet transform or frequency domain masking to construct a background model, treat the complex wood texture as noise and remove it differentially, and then perform threshold segmentation on the difference image to locate the defect.

[0004] While the above methods are effective against simple backgrounds, they have significant technical limitations when faced with highly realistic complex wood grain backgrounds. On the one hand, the wood grain on the surface of the board often covers a wide frequency band, which overlaps significantly with the edge gradient signal of the tiny bubbles. Existing subtraction strategies, while forcibly suppressing the texture background, inevitably smooth out or even erase the weak edge features of the bubbles, resulting in a large number of missed detections. On the other hand, interference items such as printing spots or surface dirt commonly found in the production environment are also difficult to effectively remove under the traditional industrial vision framework, resulting in a high false alarm rate for the system. Summary of the Invention

[0005] To address the technical problems of existing technologies, such as the overlap of texture and bubble spectra, the loss of bubble features due to filtering, and the difficulty in removing false alarm interference such as color spots and dirt, this invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides a method for identifying surface defects in environmentally friendly coatings on sheet metal based on machine vision, including: A grayscale image of the plate surface is acquired, and a structure tensor matrix is ​​constructed for each pixel. The local linearity factor of the pixel is calculated based on the principal and secondary eigenvalues ​​of the structure tensor matrix. The original gradient vector of the pixel is inversely modulated using the local linearity factor to construct an inversely modulated flow field. The divergence of the inversely modulated flow field is calculated to generate a divergence potential energy map. Suspected defect centers are extracted based on the local extrema of the divergence potential energy map. A local observation neighborhood is established using the suspected defect center as an anchor point. The phase entropy index of the suspected defect center is constructed based on the angle relationship between the original gradient vector of the pixel in the local observation neighborhood and the relevant position vector pointing from the suspected defect center to the pixel. The phase entropy index is compared with the bubble determination threshold to screen the suspected defect centers to determine bubble defects, and the physical coordinates and size information of the bubble defects are output.

[0007] This invention measures the anisotropy of the surface texture of a board material from a geometric perspective by constructing a structural tensor matrix and calculating a local linearity factor. It then uses the local linearity factor as a weight to inversely modulate the original gradient vector, constructing an inversely modulated flow field. This achieves adaptive suppression of wood grain backgrounds with high linearity while fully preserving the energy of isotropic bubble defects, thus improving the signal-to-noise ratio. Furthermore, this invention generates a divergence potential energy map by calculating the divergence of the inversely modulated flow field, transforming defect localization into an energy extremum search. This allows for rapid identification of suspected defect centers. Based on this, a phase entropy index is constructed using the unique refractive light field characteristics of bubbles. By measuring the deviation of the gradient direction relative to the radial direction, non-refractive features such as surface spots and dirt are eliminated, thereby achieving high-precision and robust identification of micro-bubble defects against complex wood grain backgrounds.

[0008] Preferably, constructing the structure tensor matrix for each pixel includes: In the formula, The structure tensor matrix representing the pixel; The Gaussian smoothing kernel represents the integral scale; This represents the gradient component of a pixel in the horizontal direction. This represents the gradient component of a pixel in the vertical direction. This represents the convolution operation.

[0009] Preferably, the local linearity factor satisfies the expression: In the formula, This represents the local linearity factor of a pixel. Represents the principal eigenvalues ​​of the structure tensor; Represents the secondary eigenvalues ​​of the structure tensor; It represents a tiny positive number that prevents the denominator from being zero.

[0010] This invention constructs a difference ratio model based on the eigenvalues ​​of the structural tensor, which can measure the geometric structural properties of texture in local image regions. Linear texture regions exhibit high linearity due to significant differences in eigenvalues, while point defects such as bubbles exhibit low linearity due to similar eigenvalues. This provides a foundation for effectively separating target features in complex interference backgrounds.

[0011] Preferably, the reverse-modulated flow field satisfies the expression: In the formula, This indicates a reverse-modulated flow field; This represents the local linearity factor of a pixel. This represents the original gradient vector of a pixel.

[0012] This invention utilizes a local linearity factor to construct inverse weighting coefficients to modulate the original gradient vector point by point. This can adaptively suppress background texture energy with high linearity characteristics while preserving the original gradient direction information, and completely retain defect energy with isotropic characteristics, effectively solving the problem of extracting weak defect signals in strong texture backgrounds.

[0013] Preferably, the step of calculating the divergence of the reverse-modulated flow field to generate a divergence potential energy map includes: calculating the divergence potential energy value of the reverse-modulated flow field using a divergence operator to construct a divergence potential energy map, wherein the divergence potential energy value satisfies the expression: In the formula, This represents the divergence potential energy value; Represents the divergence operator; Represents the reverse modulation flow field The horizontal component; Represents the reverse modulation flow field The vertical component; Represents the horizontal coordinate variable; Represents the vertical coordinate variable.

[0014] This invention transforms the local convergence or divergence characteristics implicit in the vector field into an intuitive scalar potential energy distribution by performing divergence calculations on the inversely modulated flow field. It can map the modulated defect center into a high potential energy response region, while the smooth background region remains at a low potential energy level. This transforms the complex defect location problem into a simple energy extremum search problem, making it easier to quickly and accurately locate potential abnormal regions.

[0015] Preferably, the step of extracting suspected defect centers based on local extrema of the divergence potential map includes: calculating the mean of the divergence potential values ​​of all pixels in the background region of the divergence potential map. and standard deviation The noise response threshold is set based on the mean and standard deviation. : Local extrema detection is performed on the divergence potential energy map to obtain all local maxima and local minima, and points whose absolute values ​​are greater than the noise response threshold are selected. The local maxima and local minima are used as suspected defect centers.

[0016] This invention adaptively calculates the noise response threshold based on the statistical characteristics of the background region and combines it with a local extremum detection strategy. It can dynamically adapt to the texture changes and fluctuations of different board surfaces. While filtering out random noise interference, it can capture those abnormal points that are significantly different from the background noise in terms of energy, ensuring the stability and robustness of the extraction of suspected defect centers under different production batches, and effectively reducing the false alarm rate and the missed detection rate.

[0017] Preferably, the phase entropy exponent satisfies the expression: In the formula, Indicates a suspected defect center The phase entropy index; Indicates the local observation neighborhood; This represents the total number of pixels within the local observation neighborhood; Represents any pixel within the local observation neighborhood; Represents pixels The original gradient vector at that location; Indicates from suspected defect center Pointing to pixel Position vector; Represents pixels The original gradient vector at the location The modulus length; Represents position vector The modulus length; This represents the theoretical maximum value of the image gradient; This represents the vector dot product operation; It represents a tiny positive number that prevents the denominator from being zero.

[0018] This invention analyzes the angular relationship between the original gradient vector direction and the radial position vector direction within the local observation neighborhood, thereby constructing a phase entropy index that reflects the physical properties of the target. It utilizes the complex gradient reversal and non-radial distribution characteristics of refractory defects under illumination, which contrasts sharply with the unidirectional gradient characteristics of ordinary surface spots. This allows for effective identification of defect types from a physical mechanism perspective, eliminating false alarms caused by defects in planar printed textures or dirt, and improving the confidence of the detection results.

[0019] Preferably, the step of comparing the phase entropy index with the bubble determination threshold to screen suspected defect centers and determine bubble defects includes: in response to the phase entropy index of a suspected defect center being greater than the bubble determination threshold, determining the suspected defect center as a candidate bubble center; performing local nonmaximum suppression on all candidate bubble centers: calculating the Euclidean distance between any two candidate bubble centers, and in response to the Euclidean distance being less than the radius of the local observation neighborhood, eliminating the candidate bubble center with the smallest phase entropy index among the two candidate bubble centers, and retaining the candidate bubble center with the largest phase entropy index among the two candidate bubble centers as the determined defect center.

[0020] Preferably, the output of the physical coordinates and size information of the bubble defect includes: searching for the location points near the determined defect center in the divergence potential energy map where the numerical sign is flipped or the value returns to zero, forming a zero-crossing profile; fitting the zero-crossing profile using the least squares method to obtain the equivalent diameter of the bubble; and mapping the pixel coordinates of the determined defect center and the equivalent diameter to the physical coordinates and physical size of the plate surface according to the camera calibration parameters.

[0021] Secondly, the present invention provides a machine vision-based system for identifying surface defects in environmentally friendly coatings of sheet materials, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned machine vision-based method for identifying surface defects in environmentally friendly coatings of sheet materials is implemented.

[0022] By adopting the above technical solution, the above-mentioned machine vision-based method for identifying surface defects in environmentally friendly coatings of sheet materials is generated into a computer program and stored in a memory for loading and execution by a processor. This allows for the creation of a terminal device based on the memory and processor, making it convenient to use.

[0023] The beneficial effects of this invention are as follows: By constructing a structural tensor matrix and calculating a local linearity factor, this invention measures the geometric structural properties of the surface texture of the board. This local linearity factor is then used to inversely modulate the original gradient vector, constructing an inversely modulated flow field. This adaptively suppresses the interference from the wood grain background with high linearity while preserving weak defect signals, effectively improving the signal-to-noise ratio. Furthermore, this invention generates a divergence potential energy map by calculating the divergence of the inversely modulated flow field, transforming complex defect localization into energy extremum search. It further combines the unique refractive light field characteristics of bubbles to construct a phase entropy index to measure the degree of deviation between the gradient direction and the radial direction. This enables the identification of real bubbles with refractive properties, effectively eliminating non-refractive feature interference such as surface spots and dirt. This achieves high-precision and robust intelligent identification of bubble defects on the surface of the environmentally friendly coating of the board under complex wood grain backgrounds. Attached Figure Description

[0024] Figure 1 This is a flowchart illustrating the machine vision-based method for identifying surface defects in environmentally friendly coatings of sheet metal in this invention. Figure 2 This is a grayscale image of the board surface in an embodiment of the present invention; Figure 3 This is a schematic diagram of the heatmap of the phase entropy index in an embodiment of the present invention; Figure 4 This is a schematic diagram of the bubble defect detection results in an embodiment of the present invention. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0027] This invention discloses a machine vision-based method for identifying surface defects in environmentally friendly coatings on sheet materials, with reference to... Figure 1 This includes steps S1-S4: S1. Obtain the grayscale image of the board surface, construct the structure tensor matrix of each pixel, and calculate the local linearity factor of the pixel based on the principal and secondary eigenvalues ​​of the structure tensor matrix.

[0028] It should be noted that in the production process of environmentally friendly coatings for boards, the wood grain background is not simply random noise, but a carrier background with high structural consistency. If traditional background subtraction or filtering methods are used to remove the background directly, it is very easy to lose the weak bubble signal superimposed on the background. In order to effectively distinguish between wood grain background and bubble defects while preserving bubble signals, this invention uses the structural tensor matrix to resolve the local region of the image into an elliptical model. By analyzing the major and minor axes of the ellipse, the fluidity and anisotropy of the local texture are measured, thus providing a solid mathematical foundation for the subsequent differentiation between wood grain with high linearity and bubbles with isotropic structure.

[0029] Specifically, a linear industrial camera is used in conjunction with a high-angle coaxial light source to acquire grayscale images of the board surface. These grayscale images are then Gaussian smoothed to suppress sensor thermal noise, resulting in the image to be processed. For example, Figure 2 This is a grayscale image of the board surface in an embodiment of the present invention.

[0030] Calculate the original gradient vector for each pixel in the image to be processed. The original gradient vector contains horizontal and vertical gradient components. Construct the structure tensor matrix for each pixel in the image to be processed based on the horizontal and vertical gradient components.

[0031] In the formula, The structure tensor matrix representing the pixel; A Gaussian smoothing kernel representing the integration scale is used to integrate structural information within the neighborhood; This represents the gradient component of a pixel in the horizontal direction. This represents the gradient component of a pixel in the vertical direction. This represents the convolution operation. Gaussian smoothing kernel. The scale parameter needs to be greater than the average line width of the background wood grain to ensure that a stable main direction can be statistically determined. In this embodiment, a Gaussian smoothing kernel is used. The scale parameter is set to 6 pixels. In other embodiments, the implementer can set the Gaussian smoothing kernel according to the actual thickness of the wood grain. The scale parameter.

[0032] Furthermore, eigenvalues ​​are obtained by performing eigenvalue decomposition on the structure tensor matrix. and secondary eigenvalues And satisfy Based on the principal eigenvalues and secondary eigenvalues Calculate the local linearity factor:

[0033] In the formula, The local linearity factor of a pixel, with a value ranging from 0 to 1; The principal eigenvalues ​​of the structure tensor represent the energy intensity of the principal direction of the local texture; The secondary eigenvalues ​​of the structure tensor represent the energy intensity perpendicular to the principal direction of the local texture. This represents a tiny positive number to prevent the denominator from being zero. In this embodiment, it is set to 0.001. In other embodiments, the implementer can set it according to the actual implementation situation. In order to avoid The sensitivity to the local linearity factor has an unintended smoothing effect, requiring... It cannot exceed 0.001.

[0034] It should be further noted that when the image region where the pixel is located is a significant linear wood grain, the principal feature value... Much larger than the secondary eigenvalue The numerator approaches the denominator, making the local linearity factor... When the image region containing the pixel is an isotropic structure such as a bubble, the two principal eigenvalues ​​and the secondary eigenvalues ​​are approximately equal, and the numerator approaches 0, making the local linearity factor close to 1. Approaching 0.

[0035] S2. The original gradient vector of the pixel is inversely modulated using the local linearity factor to construct the inversely modulated flow field. The divergence of the inversely modulated flow field is calculated to generate a divergence potential energy map. The suspected defect center is extracted based on the local extrema of the divergence potential energy map.

[0036] It should be noted that existing technologies often directly calculate the divergence of the gradient field to find circular targets, but this is severely affected by strong wood grain gradients, leading to a large number of false alarms. Since wood grain has high linearity and bubbles have low linearity, this invention adopts a reverse modulation strategy. Based on the local linearity factor, the original gradient vector is vector-modulated point by point to construct a reverse modulation flow field. In the reverse modulation flow field, energy that conforms to the linear flow law is automatically suppressed, while abnormal disturbance energy is retained, thereby enhancing the signal-to-noise ratio of the signal.

[0037] Specifically, based on the local linearity factor and the original gradient vector, the inverse modulation flow field is defined as follows:

[0038] In the formula, This indicates a reverse-modulated flow field; This represents the local linearity factor of a pixel. This represents the original gradient vector of the pixel. When the pixel is located in the wood grain region, the local linearity factor... Larger, gain coefficient The local linearity factor tends towards 0, which strongly suppresses the gradient energy at that location; when the pixel is located in the bubble region, the local linearity factor... Smaller, gain coefficient The gradient tends to 1, so that the original gradient energy at that point is completely preserved.

[0039] Furthermore, the divergence of the reverse-modulated flow field is calculated to obtain the divergence potential energy value, which forms a divergence potential energy map. The divergence potential energy value satisfies the expression:

[0040] In the formula, It represents the divergence potential energy value, used to characterize the degree of convergence or divergence of the reverse-modulated flow field; Represents the divergence operator; Represents the reverse modulation flow field The horizontal component; Represents the reverse modulation flow field The vertical component; Represents the horizontal coordinate variable; Represents the vertical coordinate variable.

[0041] To adaptively determine the noise floor, a local linearity factor is used to segment the divergence potential map into background regions. Specifically, regions in the image to be processed with a local linearity factor greater than a preset background threshold are defined as background regions. The mean and standard deviation of the divergence potential values ​​of all pixels in the background region are calculated, and a noise response threshold is set based on the mean and standard deviation.

[0042] In the formula, Indicates the noise response threshold; This represents the mean of the divergence potential values ​​of all pixels in the background region of the divergence potential map. It represents the standard deviation of the divergence potential values ​​of all pixels in the background region of the divergence potential map.

[0043] Local extrema detection is performed on the divergence potential energy map to obtain all local maxima and local minima, and points whose absolute values ​​are greater than the noise response threshold are selected. Local maxima and local minima are used as suspected defect centers. All suspected defect centers are combined into a suspected defect center set. At this point, the linear wood grain interference has been eliminated, and the suspected defect center set only contains defect pixels that are suspected to be bubbles.

[0044] S3. Establish a local observation neighborhood with the suspected defect center as the anchor point. Based on the angle relationship between the original gradient vector of the pixel in the local observation neighborhood and the relevant position vector pointing from the suspected defect center to the pixel, construct the phase entropy index of the suspected defect center.

[0045] It should be noted that although the wood grain interference has been eliminated, bubbles exhibit a high response in the divergence potential energy diagram. Further confirmation of their physical properties is needed to rule out false alarms caused by non-bubble-like point interference such as printing spots or surface dirt. Surface spots or dirt typically exhibit simple reflection or absorption characteristics, with gradient directions tending to be unidirectional, pointing towards or away from the center, and locally exhibiting a high degree of phase consistency. Bubbles, however, are transparent refractive bodies. Due to refraction effects and spherical reflection, bubble edges exhibit significant tangential gradient components or complex inverted gradients. The gradient vector is not parallel to the radial vector, exhibiting bipolar or multipolar characteristics, resulting in high local phase entropy. Therefore, this invention constructs a phase entropy index by combining the original gradient vector and the set of suspected defect centers to measure the degree of non-radial phase deviation in bubble defect identification.

[0046] Specifically, for any suspected defect center in the set of suspected defect centers, its local observation neighborhood is defined. The radius of the local observation neighborhood is set to 1.2 times the radius of the minimum bubble to be detected. The minimum bubble radius is determined by the implementer based on the ratio of the minimum physical size of the defect specified in the production line quality inspection standard to the object-space resolution of the visual imaging system. For example, if the sheet coating quality inspection standard requires that the minimum physical diameter of the bubble to be detected be... For example, 0.1mm, while the actual physical width represented by a single pixel in an industrial camera imaging system is... For example, if the value is 0.01 mm / pixel, then the minimum bubble radius to be detected corresponds to the following in the image coordinate system: 5 pixels, that is, 5 pixels. The symbol indicates rounding up.

[0047] By traversing all pixels within the local observation neighborhood, the phase entropy index of the suspected defect center is constructed:

[0048] In the formula, Indicates a suspected defect center The phase entropy index; Indicates the local observation neighborhood; This represents the total number of pixels within the local observation neighborhood; Represents any pixel within the local observation neighborhood; Represents pixels The original gradient vector at that location; Indicates from suspected defect center Pointing to pixel Position vector; Represents pixels The original gradient vector at the location The modulus length; Represents position vector The modulus length; This represents the theoretical maximum value of the image gradient, used to normalize the gradient strength and ensure that the range of the logarithmic input terms is controllable. This represents the vector dot product operation; This represents a tiny positive number to prevent the denominator from being zero. In this embodiment, it is set to 0.001. In other embodiments, the implementer can set it according to the actual implementation situation. In order to avoid The sensitivity to the phase entropy exponent has an unintended smoothing effect, requiring... It cannot exceed 0.001.

[0049] In the formula, This represents the square of the cosine of the angle between the gradient direction and the radial direction, quantifying the degree of deviation between the gradient direction and the radial direction within a local region. For ordinary stains or dirt spots, the gradient direction tends to be radially distributed, and the square of the cosine of the angle approaches 1, leading to... The term approaches 0, ultimately causing the phase entropy exponent to... Extremely low; when the target is a bubble, due to the tangential component generated by refraction and reflection, there is a significant angle between the gradient direction and the radial direction, the square of the cosine of the angle is significantly less than 1, and coupled with a large gradient amplitude, the phase entropy exponent is extremely low. Accumulated high values.

[0050] For example, Figure 3 This is a schematic diagram of the phase entropy index in an embodiment of the present invention. It can be seen that the background texture is effectively suppressed, and only the bubble area shows a high response value.

[0051] S4. Compare the phase entropy index with the bubble detection threshold, screen suspected defect centers to identify bubble defects, and output the physical coordinates and size information of the bubble defects.

[0052] Specifically, a bubble detection threshold is set. If the phase entropy index of a suspected defect center is greater than the bubble detection threshold, then a bubble defect is considered to exist at the suspected defect center location, and the suspected defect center is determined to be a candidate bubble center. In this embodiment, the bubble detection threshold is set to the maximum value of the phase entropy index of defect-free samples. Multiple images of board samples with smooth surfaces and no bubbles, confirmed by manual visual verification, are pre-collected by the implementer as a negative sample set. The phase entropy index of all pixels in the negative sample set is calculated iteratively, and the statistically obtained global maximum value is directly determined as the bubble detection threshold. In other embodiments, the implementer can adjust the bubble detection threshold according to the actual detection sensitivity requirements.

[0053] To avoid repeatedly marking the same bubble defect, local nonmaximum suppression is performed on all candidate bubble centers. Specifically, the Euclidean distance between any two candidate bubble centers is calculated. If the Euclidean distance is less than the radius of the local observation neighborhood, the phase entropy exponents of the two candidate bubble centers are compared. Only the candidate bubble center with the larger phase entropy exponent is retained as the determined defect center, and the candidate bubble center with the smaller phase entropy exponent is eliminated.

[0054] Based on the divergence potential energy map, the zero-crossing boundary near the determined defect center is obtained. It should be noted that the bubble, as a refractive body, acts as a significant source or sink in the reverse-modulated flow field. The absolute value of the divergence potential energy in its central region is relatively large, while the divergence potential energy in the edge region rapidly decays from a high value and transitions to the zero-value region of the background. Therefore, the zero-crossing contour is constructed by searching for points in the divergence potential energy map where the numerical sign flips or the value returns to zero. The zero-crossing contour is then fitted with a circle using the least squares method to obtain the equivalent diameter of the bubble. According to the calibration parameters of the image acquisition equipment, the pixel coordinates of the determined defect center and the equivalent diameter are mapped to the physical coordinates and physical dimensions of the plate surface, generating the final detection result.

[0055] For example, Figure 4 This is a schematic diagram of the bubble defect detection results in an embodiment of the present invention.

[0056] This invention also discloses a machine vision-based system for identifying surface defects in environmentally friendly coatings on sheet materials, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the machine vision-based method for identifying surface defects in environmentally friendly coatings on sheet materials according to this invention.

[0057] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

Claims

1. A method for identifying surface defects in environmentally friendly coatings for sheet metal based on machine vision, characterized in that, include: Acquire a grayscale image of the board surface, construct a structure tensor matrix for each pixel, and calculate the local linearity factor of the pixel based on the principal and secondary eigenvalues ​​of the structure tensor matrix. The original gradient vector of the pixel is inversely modulated using the local linearity factor to construct the inversely modulated flow field. The divergence of the inversely modulated flow field is calculated to generate a divergence potential energy map. Suspected defect centers are extracted based on the local extrema of the divergence potential energy map. A local observation neighborhood is established with the suspected defect center as the anchor point. The phase entropy index of the suspected defect center is constructed based on the angle relationship between the original gradient vector of the pixel in the local observation neighborhood and the relevant position vector pointing from the suspected defect center to the pixel. The phase entropy index is compared with the bubble detection threshold to screen suspected defect centers to identify bubble defects, and the physical coordinates and size information of the bubble defects are output.

2. The method for identifying surface defects of environmentally friendly coatings on sheet metal based on machine vision according to claim 1, characterized in that, The construction of the structure tensor matrix for each pixel includes: ; In the formula, The structure tensor matrix representing the pixel; The Gaussian smoothing kernel represents the integral scale; This represents the gradient component of a pixel in the horizontal direction. This represents the gradient component of a pixel in the vertical direction. This represents the convolution operation.

3. The method for identifying surface defects of environmentally friendly coatings on sheet metal based on machine vision according to claim 1, characterized in that, The local linearity factor satisfies the expression: ; In the formula, This represents the local linearity factor of a pixel. Represents the principal eigenvalues ​​of the structure tensor; Represents the secondary eigenvalues ​​of the structure tensor; It represents a tiny positive number that prevents the denominator from being zero.

4. The method for identifying surface defects of environmentally friendly coatings on sheet metal based on machine vision according to claim 1, characterized in that, The reverse-modulated flow field satisfies the expression: ; In the formula, This indicates a reverse-modulated flow field; This represents the local linearity factor of a pixel. This represents the original gradient vector of a pixel.

5. The method for identifying surface defects of environmentally friendly coatings on sheet metal based on machine vision according to claim 1, characterized in that, The calculation of the divergence of the inversely modulated flow field to generate a divergence potential energy map includes: The divergence potential energy value of the reverse-modulated flow field is calculated using the divergence operator, and a divergence potential energy map is constructed. The divergence potential energy value satisfies the expression: ; In the formula, This represents the divergence potential energy value; Represents the divergence operator; Represents the reverse modulation flow field The horizontal component; Represents the reverse modulation flow field The vertical component; Represents the horizontal coordinate variable; Represents the vertical coordinate variable.

6. The method for identifying surface defects of environmentally friendly coatings on sheet metal based on machine vision according to claim 1, characterized in that, The step of extracting suspected defect centers based on local extrema of the divergence potential energy map includes: Calculate the mean of the divergence potential values ​​of all pixels in the background region of the divergence potential map. and standard deviation The noise response threshold is set based on the mean and standard deviation. : ; Local extrema detection is performed on the divergence potential energy map to obtain all local maxima and local minima, and points whose absolute values ​​are greater than the noise response threshold are selected. The local maxima and local minima are used as suspected defect centers.

7. The method for identifying surface defects of environmentally friendly coatings on sheet metal based on machine vision according to claim 1, characterized in that, The phase entropy exponent satisfies the expression: ; In the formula, Indicates a suspected defect center The phase entropy index; Indicates the local observation neighborhood; This represents the total number of pixels within the local observation neighborhood; Represents any pixel within the local observation neighborhood; Represents pixels The original gradient vector at that location; Indicates from suspected defect center Pointing to pixel Position vector; Represents pixels The original gradient vector at the location The modulus length; Represents position vector The modulus length; This represents the theoretical maximum value of the image gradient; This represents the vector dot product operation; It represents a tiny positive number that prevents the denominator from being zero.

8. The method for identifying surface defects of environmentally friendly coatings on sheet metal based on machine vision according to claim 1, characterized in that, The step of comparing the phase entropy index with the bubble detection threshold to screen suspected defect centers and determine bubble defects includes: If the phase entropy index of a suspected defect center is greater than the bubble determination threshold, the suspected defect center is determined as a candidate bubble center. Local nonmaximum suppression is performed on all candidate bubble centers: the Euclidean distance between any two candidate bubble centers is calculated. If the Euclidean distance is less than the radius of the local observation neighborhood, the candidate bubble center with the smallest phase entropy index among the two candidate bubble centers is removed, and the candidate bubble center with the largest phase entropy index among the two candidate bubble centers is retained as the determined defect center.

9. The method for identifying surface defects of environmentally friendly coatings on sheet metal based on machine vision according to claim 1, characterized in that, The physical coordinates and size information of the output bubble defects include: The zero-crossing profile is formed by searching for the location points near the determined defect center in the divergence potential energy map where the numerical sign flips or the value returns to zero. The equivalent diameter of the bubble is obtained by fitting the zero-crossing profile using the least squares method. According to the camera calibration parameters, the pixel coordinates of the determined defect center and the equivalent diameter are mapped to the physical coordinates and physical dimensions of the plate surface.

10. A machine vision-based system for identifying surface defects in environmentally friendly coatings for sheet metal, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement the machine vision-based method for identifying surface defects in environmentally friendly coatings of sheet materials according to any one of claims 1-9.