Machine vision-based intelligent detection method for galvanized steel surface defects

By constructing a multi-scale adaptive phase kernel function and an improved phase stretching transformation algorithm, the problem of misjudgment in the detection of defects on galvanized steel surfaces under complex lighting conditions was solved, achieving high-precision defect identification and boundary localization, and improving the robustness and stability of the detection.

CN121481965AInactive Publication Date: 2026-02-06SHANDONG CHUANGMEITE NEW MATERIALS CO LTD
View PDF 0 Cites 7 Cited by

Patent Information

Application Number
CN202511628482.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing methods for detecting defects on galvanized steel surfaces are prone to misjudgment under complex lighting conditions, making it difficult to achieve high-precision identification and boundary positioning. Traditional methods also lack robustness in cases of specular reflection and complex textures.

Method used

A multi-scale adaptive phase kernel function that integrates the specular reflection probability map and the orientation feature matrix is ​​constructed. Phase modulation is performed in the frequency domain through an improved phase stretching transform algorithm. Reflection suppression weight and orientation consistency weight are introduced to improve detection stability and robustness.

Benefits of technology

It achieves high-precision identification and boundary positioning of defects on galvanized steel surfaces under complex lighting conditions, significantly improving the stability and accuracy of detection, and is suitable for real-time deployment in continuous production lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121481965A_ABST
    Figure CN121481965A_ABST
Patent Text Reader

Abstract

The invention discloses a machine vision-based intelligent detection method for steel galvanized surface defects, which comprises the following steps: S1, acquiring and preprocessing a steel galvanized surface image to obtain a standardized image; s2, constructing a specular reflection probability graph according to the brightness distribution and the gradient magnitude, and calculating a reflection intensity value; s3, calculating a structure tensor matrix, determining a main direction angle and an anisotropic consistency coefficient, and generating a direction feature matrix; s4, establishing a multi-scale direction adaptive phase kernel function, and performing phase modulation in a frequency domain by adopting an improved phase stretching transformation algorithm; s5, inverse Fourier transform is executed, and a phase response matrix is extracted; s6, performing weighted fusion to obtain a comprehensive phase response diagram; and S7, setting a threshold value according to the noise variance and the statistical characteristics, executing binarization and morphological processing, and outputting a defect region and boundary coordinates. According to the invention, high-precision identification and boundary positioning of steel galvanized surface defects are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision and image data processing technology, and in particular to an intelligent detection method for defects on galvanized steel surfaces based on machine vision. Background Technology

[0002] With the continuous improvement of automation and intelligence in industrial production, the surface quality inspection of steel materials is gradually shifting from manual visual inspection to automated inspection based on machine vision. Due to the complex optical reflection characteristics, random surface textures, and various types of defects, the image features of galvanized steel surfaces exhibit significant nonlinearity and high reflectivity, thus placing higher demands on the robustness and accuracy of detection algorithms. Currently, commonly used surface defect detection methods mainly include traditional image processing methods based on grayscale thresholding, frequency domain analysis methods based on wavelets, and deep learning methods based on convolutional neural networks that have emerged in recent years. However, these methods still have many shortcomings in industrial production.

[0003] Traditional image detection methods based on grayscale and texture features rely on global thresholding or simple edge operators, which are prone to misjudgment when the galvanized surface has uneven illumination or specular reflection. Especially when the steel strip moves at high speed, brightness saturation or reflective spots appear in the imaging area, causing the grayscale distribution of defect areas to highly overlap with that of normal texture areas, making accurate segmentation difficult with a single threshold. In addition, these algorithms usually assume that the surface texture is uniform, while the heterogeneous reflective properties of the galvanized layer cause drastic changes in local contrast, thereby reducing the stability of defect detection.

[0004] Frequency domain analysis methods based on wavelet transform have certain advantages in texture orientation detection, but their kernel function parameters are fixed and cannot be adaptively adjusted according to local image features. In the presence of multi-scale surface structures and specular reflection interference, the fixed-parameter frequency domain kernel function is prone to energy leakage or response distortion, resulting in blurred defect edges and location misalignment. Furthermore, traditional frequency domain algorithms generally ignore imaging noise and orientation consistency factors, exhibiting weak response to low-contrast defects, especially against bright backgrounds, easily misidentifying reflective spots as defects.

[0005] In recent years, surface feature detection methods based on phase stretch transform have been proposed and applied to metal surface inspection. This method achieves edge enhancement through nonlinear phase modulation of the image spectrum. However, existing phase stretch transform algorithms use a single-scale, fixed-parameter phase kernel function, lacking an adaptive control mechanism for complex lighting conditions and anisotropic textures. In the scenario of inspecting galvanized steel surfaces, strong specular reflection areas can cause local phase distortion, reducing the sensitivity of the phase response to the true defect boundaries. Furthermore, phase stretch transform algorithms do not consider the combined effects of directional consistency and multi-scale features, leading to problems such as edge blurring, discontinuous response, and the omission of defects in multiple directions in the detection results.

[0006] Therefore, how to provide a machine vision-based intelligent detection method for defects on galvanized steel surfaces is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0007] One objective of this invention is to propose an intelligent detection method for defects on galvanized steel surfaces based on machine vision. This invention constructs a multi-scale adaptive phase kernel function that integrates a specular reflection probability map and a directional feature matrix. An improved phase stretching transform algorithm is employed in the frequency domain to suppress reflection interference and enhance defect boundaries. By introducing reflection suppression weights, directional consistency weights, and noise variance control mechanisms, the stability and robustness of the detection are improved, enabling high-precision identification and boundary localization of defects on galvanized steel surfaces under complex lighting conditions.

[0008] A machine vision-based intelligent detection method for defects on galvanized steel surfaces, according to an embodiment of the present invention, includes the following steps: S1. Acquire an image of the galvanized steel surface, and perform brightness normalization and noise variance estimation on the image of the galvanized steel surface to obtain a standardized image; S2. Construct a specular reflection probability map based on the brightness distribution and gradient magnitude of the standardized image, and calculate the reflection intensity value through high quantile statistics and local gradient normalization. S3. Calculate the structure tensor matrix based on the standardized image, determine the principal direction angle and anisotropy consistency coefficient according to the eigenvalues ​​of the structure tensor matrix, and generate the direction feature matrix. S4. Establish a multi-scale orientation adaptive phase kernel function that integrates the specular reflection probability map and the orientation feature matrix, and use an improved phase stretching transform algorithm in the frequency domain to perform phase modulation on the spectrum of the standardized image. S5. Perform inverse Fourier transform on the processed spectrum image, extract the phase response matrix, and obtain the phase response results at different scales and directions; S6. Based on the weights corresponding to the specular reflection probability map and the direction feature matrix, the phase response results are weighted and fused to obtain a comprehensive phase response map; S7. Based on the statistical characteristics of noise variance and integrated phase response map, set a threshold, perform binarization and morphological processing on the integrated phase response map, and output the regional information and boundary coordinates of defects on the galvanized steel surface.

[0009] Optionally, step S1 includes: S11. Construct an imaging unit, which includes an industrial camera and a fixed-focus lens. The industrial camera is a camera device with an external trigger interface, and the fixed-focus lens is fixed to the camera interface by a mechanical locking ring. S12. Arrange lighting units, wherein the lighting units are adjustable ring light sources, the adjustable ring light sources are composed of discrete LED arrays and are installed coaxially around the lens, and the brightness levels and zone lighting angles are set. S13. Establish a linear speed synchronization relationship by electrically connecting the external trigger terminal of the industrial camera to the output terminal of the production line encoder, setting the correspondence between exposure time, trigger frequency and steel strip linear speed, and setting the frame interval and field of view coverage. S14. Perform geometric and lighting calibration, place a flat field correction plate with uniform surface reflection, acquire flat field and dark field images, and record lens optical axis, incident angle and working distance parameters. S15. After calibration, continuously acquire image sequences of galvanized steel surfaces to form the original image dataset of the target area. S16. The original image dataset is subjected to brightness correction and grayscale normalization using the flat field image and dark field image to eliminate uneven illumination distribution and camera response differences, and a standardized image is obtained. S17. Select a textureless uniform region in the standardized image and calculate the temporal variance of the pixel grayscale in that region as the noise estimation result.

[0010] Optionally, step S2 includes: S21. Perform grayscale statistical analysis on the standardized image, calculate the global mean, standard deviation and high quantile of the image pixel grayscale, and determine the brightness threshold range; S22. Perform gradient calculation on the standardized image, calculate the horizontal and vertical gradients using the central difference method, and generate a gradient magnitude map and a gradient direction map. S23. Select a pixel region in the gradient magnitude map whose brightness is higher than the upper limit of the brightness threshold range as the initial reflection region, and record the corresponding pixel coordinates. S24. Within the initial reflection area, calculate the average gradient magnitude and local brightness contrast in the local neighborhood for each pixel, and use the brightness normalization ratio to suppress low contrast areas. S25. Calculate the reflection intensity value of each pixel based on the local brightness contrast and average gradient magnitude, and generate a reflection intensity distribution map composed of the reflection intensity values ​​of each pixel; the reflection intensity value is directly proportional to the brightness high quantile difference and inversely proportional to the local gradient change rate. S26. Perform spatial smoothing on the reflection intensity distribution map, use bilateral filtering to preserve the edge structure, and generate a specular reflection probability map; S27. Normalize the pixel values ​​of the specular reflection probability map, limiting the distribution range to between 0 and 1, to form specular reflection probability data.

[0011] Optionally, step S3 includes: S31. On the standardized image, a local neighborhood window is established with a preset pixel size. The horizontal and vertical gradients of each pixel are calculated using the center difference method to generate a gradient magnitude map and a gradient direction map. S32. Construct a structure tensor matrix graph based on the gradient information in the local neighborhood window. The structure tensor matrix is ​​a second-order symmetric matrix formed based on the local gradient relationship of the image and is aligned pixel by pixel with the normalized image. S33. Perform feature extraction processing on the structure tensor matrix graph to obtain the main direction angle map and the secondary direction angle map, wherein the main direction angle is the angle data representing the main direction of local gradient change; S34. Calculate the anisotropy consistency coefficient map based on the relationship between the magnitudes and the degree of difference of the characteristic quantities of the structural tensor matrix graph. The anisotropy consistency coefficient is a dimensionless coefficient with a value range of zero to one. S35. Perform angle continuity processing on the main direction angle map, and correct the angle jumps that cross zero degrees or 180 degrees according to the row and column traversal order to generate a continuous main direction angle map. S36. Combine the running direction of the steel strip to set a strip statistical window, and perform a robust estimation of direction consistency on the continuous main direction angle diagram and the anisotropy consistency coefficient diagram to obtain the median filtering result and the dispersion measure diagram along the running direction. S37. Align and rasterize the continuous principal direction angle map, anisotropic consistency coefficient map, and direction consistency robust estimation results according to pixel coordinates to form a direction feature matrix.

[0012] Optionally, step S4 includes: S41. Read the standardized image, specular reflection probability map and orientation feature matrix, perform a fast Fourier transform on the standardized image to obtain spectral data, and perform spectral centering and amplitude normalization. S42. Define a scale set and a direction set, wherein the scale set is a multi-level scale sequence discrete according to pixel space, and the direction set is a direction angle sequence uniformly discrete according to angle; S43. Generate a weight map based on the specular reflection probability map and the orientation feature matrix. The weight map includes reflection suppression weights and orientation consistency weights, and is aligned pixel-by-pixel with the standardized image. S44. Establish a phase kernel template for the improved phase stretching transformation algorithm, and set kernel strength, direction selection bandwidth and scale control parameters for each scale and each direction according to the scale set and direction set. The kernel strength is calculated based on the reflection suppression weight and noise variance estimation results in the weighted graph. It is determined by a linear weighting relationship. The reflection suppression weight and noise variance are normalized and then weighted by a proportional coefficient. The reciprocal of the weighted result is used as the kernel strength adjustment coefficient. The direction selection bandwidth is calculated based on the direction consistency weight in the weight graph and determined by normalized inverse proportional mapping. The direction consistency weight is normalized and mapped to the set direction bandwidth range, and the direction response range is adjusted according to the mapping result. The scale control parameters are calculated jointly based on the noise variance estimation results and the orientation consistency weights, and are determined by a dual-weighting method. The normalized results of the noise variance and the normalized results of the orientation consistency weights are summed according to a set proportional coefficient and then a linear transformation is performed. S45. Map the phase kernel template to the spectral coordinate system to generate a corresponding phase kernel matrix group, so that each phase kernel matrix is ​​aligned with the direction set and consistent with the spectral size; S46. In the frequency domain, the spectrum data is phase modulated, and the phase kernel matrix group is applied to the spectrum data element by element according to the scale set and direction set to obtain the modulated spectrum channel diagram of each scale and direction respectively. S47. The modulated spectrum channel diagram is numbered and cached, and a retrieval relationship is established according to the scale index and the direction index.

[0013] Optionally, step S5 includes: S51. Read the multi-scale, multi-directional spectrum dataset from the modulated spectrum channel diagram, and establish a spectrum processing sequence according to the scale index and direction index. S52. Perform an inverse fast Fourier transform on each channel of the spectrum dataset to obtain a complex image result, wherein the complex image result contains an amplitude component and a phase component; S53. Extract the phase components of the complex image result into a phase response map, and perform phase unrolling processing on the phase transitions spanning the interval from zero to two π to form a continuous phase response map. S54. The phase response map is indexed and classified according to the scale set and the direction set to generate the corresponding phase response channel group; S55. Spatial registration is performed on the phase response channel group in the pixel coordinate system to align the response results at different scales and orientations in the coordinate space. S56. Store the spatially registered phase response channel groups according to the channel number to form a phase response matrix set.

[0014] Optionally, step S6 includes: S61. Based on the phase response matrix set and the corresponding specular reflection probability map and direction feature matrix, establish a phase response fusion sequence and assign a unified pixel coordinate system. S62. Determine the reflection suppression weight based on the reflection intensity value of each pixel in the specular reflection probability map, and determine the orientation consistency weight based on the anisotropy consistency coefficient in the orientation feature matrix, and generate a weighted coefficient matrix. S63. Perform pixel-by-pixel weighted calculation on each channel image in the phase response matrix set according to the weighting coefficient matrix to obtain multi-scale and multi-directional weighted phase response results; S64. Perform scale normalization and direction merging processing on the weighted phase response results to keep the response amplitudes of different scales and directions consistent. S65. The normalized weighted phase response results are superimposed and fused at the pixel level to generate a comprehensive phase response map containing global and local features.

[0015] Optionally, step S7 includes: S71. Based on the comprehensive phase response map and noise variance estimation results, generate an effective detection area mask according to the camera field of view and the position of the steel strip edge. S72. Calculate the global mean, local variance, and median absolute deviation statistics of pixel grayscale on the integrated phase response map, and generate a threshold parameter set by combining the noise variance estimation results. S73. Apply the threshold parameter group to the comprehensive phase response map, perform hierarchical binarization processing on the pixel grayscale value, and generate a defect response binary map. S74. Perform pixel connectivity operation on the defect response binary image to establish a connected region based on the grayscale continuity of adjacent pixels, forming a preliminary defect connectivity domain. S75. Perform morphological opening and closing operations on the preliminary defect connected domain. The size of the structural element is determined based on the imaging resolution and the surface texture size of the steel strip, in order to remove isolated noise points and correct boundary gaps. S76. Calculate the area, perimeter, aspect ratio, and orientation consistency index of the connected domain after morphological processing, and filter the effective defect areas based on the preset area threshold and shape threshold. S77. Perform contour tracking on the effective defect area, extract the bounding rectangle and boundary coordinate parameters, and output the mask map and boundary information dataset of the steel galvanized surface defect.

[0016] The beneficial effects of this invention are: This invention addresses the issues of high reflectivity, strong noise, and complex texture orientation on galvanized steel surfaces by establishing a multi-scale adaptive phase kernel function that integrates a specular reflection probability map and a directional feature matrix. An improved phase stretching transform algorithm is introduced in the frequency domain to achieve multi-scale phase modulation and orientation-sensitive enhancement of standardized images. By introducing reflection suppression weights and orientation consistency weights during the construction of the phase kernel function, the kernel strength, orientation selection bandwidth, and scale control parameters are adaptively adjusted. This allows the phase response of different regions to dynamically change according to local brightness distribution and texture orientation, effectively suppressing specular reflection interference and maintaining the phase continuity of the real defects. After spectral modulation, the invention uses inverse Fourier transform to obtain the phase response matrix and performs weighted fusion and normalization of the multi-scale, multi-directional phase results at the pixel level to generate a comprehensive phase response map, achieving global enhancement of defect features and maintenance of orientation consistency. To address the response distortion and energy leakage problems caused by fixed parameters in traditional phase stretching transform algorithms, this invention significantly improves the robustness and anti-reflection capability of the algorithm by introducing noise variance estimation and an adaptive weight allocation mechanism. Finally, by combining the statistical characteristics of the comprehensive phase response map to establish a threshold parameter set, binarization and morphological screening are performed to accurately extract the boundary and geometric features of the defect region, achieving high-precision identification and boundary localization of defects on galvanized steel surfaces. This method significantly improves detection stability and defect identification accuracy under conditions of strong reflection, complex textures, and high-brightness backgrounds, demonstrating engineering applicability and promotional value for real-time deployment on continuous production lines. Attached Figure Description

[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0018] Figure 1 This is a schematic diagram of the overall process of an intelligent detection method for defects on galvanized steel surfaces based on machine vision, as proposed in this invention. Figure 2This is a schematic diagram of the phase modulation processing in the frequency domain of the improved phase stretching transform algorithm in this invention; Figure 3 This is a schematic diagram of the defect identification and boundary extraction of galvanized steel surface in this invention. Detailed Implementation

[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0020] refer to Figure 1-3 A machine vision-based intelligent detection method for defects on galvanized steel surfaces includes the following steps: S1. Acquire an image of the galvanized steel surface, and perform brightness normalization and noise variance estimation on the image of the galvanized steel surface to obtain a standardized image; S2. Construct a specular reflection probability map based on the brightness distribution and gradient magnitude of the standardized image, and calculate the reflection intensity value through high quantile statistics and local gradient normalization. S3. Calculate the structure tensor matrix based on the standardized image, determine the principal direction angle and anisotropy consistency coefficient according to the eigenvalues ​​of the structure tensor matrix, and generate the direction feature matrix. S4. Establish a multi-scale orientation adaptive phase kernel function that integrates the specular reflection probability map and the orientation feature matrix, and use an improved phase stretching transform algorithm in the frequency domain to perform phase modulation on the spectrum of the standardized image. S5. Perform inverse Fourier transform on the processed spectrum image, extract the phase response matrix, and obtain the phase response results at different scales and directions; S6. Based on the weights corresponding to the specular reflection probability map and the direction feature matrix, the phase response results are weighted and fused to obtain a comprehensive phase response map; S7. Based on the statistical characteristics of noise variance and integrated phase response map, set a threshold, perform binarization and morphological processing on the integrated phase response map, and output the regional information and boundary coordinates of defects on the galvanized steel surface.

[0021] In this embodiment, step S1 includes: S11. Construct an imaging unit, which includes an industrial camera and a fixed-focus lens. The industrial camera is a camera device with an external trigger interface, and the fixed-focus lens is fixed to the camera interface by a mechanical locking ring. S12. Arrange lighting units, wherein the lighting units are adjustable ring light sources, the adjustable ring light sources are composed of discrete LED arrays and are installed coaxially around the lens, and the brightness levels and zone lighting angles are set. S13. Establish a linear speed synchronization relationship by electrically connecting the external trigger terminal of the industrial camera to the output terminal of the production line encoder, setting the correspondence between exposure time, trigger frequency and steel strip linear speed, and setting the frame interval and field of view coverage. S14. Perform geometric and lighting calibration, place a flat field correction plate with uniform surface reflection, acquire flat field and dark field images, and record lens optical axis, incident angle and working distance parameters. S15. After calibration, continuously acquire image sequences of galvanized steel surfaces to form the original image dataset of the target area. S16. The original image dataset is subjected to brightness correction and grayscale normalization using the flat field image and dark field image to eliminate uneven illumination distribution and camera response differences, and a standardized image is obtained. S17. Select a textureless uniform region in the standardized image and calculate the temporal variance of the pixel grayscale in that region as the noise estimation result.

[0022] In this embodiment, step S2 includes: S21. Perform grayscale statistical analysis on the standardized image, calculate the global mean, standard deviation and high quantile of the image pixel grayscale, and determine the brightness threshold range; The high quantile value is the grayscale value whose cumulative probability in the brightness histogram reaches 95%, used to identify the upper limit of brightness in bright areas of the image. A brightness threshold range is determined based on the statistical results, defined as the grayscale range between the mean minus the standard deviation multiplied by a coefficient and the high quantile value.

[0023] S22. Perform gradient calculation on the standardized image, calculate the horizontal and vertical gradients using the central difference method, and generate a gradient magnitude map and a gradient direction map. S23. Select a pixel region in the gradient magnitude map whose brightness is higher than the upper limit of the brightness threshold range as the initial reflection region, and record the corresponding pixel coordinates. S24. Within the initial reflection area, calculate the average gradient magnitude and local brightness contrast in the local neighborhood for each pixel, and use the brightness normalization ratio to suppress low contrast areas. S25. Calculate the reflection intensity value of each pixel based on the local brightness contrast and average gradient magnitude, and generate a reflection intensity distribution map composed of the reflection intensity values ​​of each pixel; the reflection intensity value is directly proportional to the brightness high quantile difference and inversely proportional to the local gradient change rate. The reflection intensity value increases with the increase of the brightness quantile difference and decreases with the increase of the local gradient change rate. The local gradient change rate is defined as the ratio of the standard deviation of the gradient magnitude to the average gradient magnitude within the neighborhood window. The reflection intensity value of each pixel is determined by the weighted relationship between the brightness quantile difference and the local gradient change rate. The reflection intensity values ​​of all pixels constitute a reflection intensity distribution map, which is used to describe the degree of reflection in each region of the standardized image. S26. Perform spatial smoothing on the reflection intensity distribution map, use bilateral filtering to preserve the edge structure, and generate a specular reflection probability map; The bilateral filtering uses a joint weighting function of spatial distance and gray level difference, with the spatial radius set to five to fifteen pixels and the gray level variance set to between 80% and 120% of the standard deviation of the gray level of the standardized image; after smoothing, the specular reflection probability map is generated. S27. Normalize the pixel values ​​of the specular reflection probability map, limiting the distribution range to between 0 and 1, to form specular reflection probability data.

[0024] This invention constructs a neighborhood window of 3×3 or 5×5 pixels for each pixel within the initial reflective region, and calculates the average gradient magnitude and local brightness contrast within this window. Local brightness contrast is defined as the ratio of the difference between the maximum and minimum brightness values ​​in the neighborhood to the average brightness. By using a brightness normalization ratio, regions with low local contrast are suppressed to reduce interference from non-reflective regions.

[0025] In this embodiment, step S3 includes: S31. On the standardized image, a local neighborhood window is established with a preset pixel size. The horizontal and vertical gradients of each pixel are calculated using the center difference method to generate a gradient magnitude map and a gradient direction map. S32. Construct a structure tensor matrix graph based on the gradient information in the local neighborhood window. The structure tensor matrix is ​​a second-order symmetric matrix formed based on the local gradient relationship of the image and is aligned pixel by pixel with the normalized image. The structure tensor matrix reflects the directional intensity of local regions in the image. By performing feature analysis on the matrix, the principal and secondary directional angles of each pixel can be obtained. The principal directional angle characterizes the main direction of texture or defect extension, while the secondary directional angle describes the changing trend of local details. This extraction process realizes the mapping from gradient space to orientation space, providing a reliable basis for orientation consistency calculation and subsequent phase adaptive transformation.

[0026] S33. Perform feature extraction processing on the structure tensor matrix graph to obtain the main direction angle map and the secondary direction angle map, wherein the main direction angle is the angle data representing the main direction of local gradient change; S34. Calculate the anisotropy consistency coefficient map based on the relationship between the magnitudes and the degree of difference of the characteristic quantities of the structural tensor matrix graph. The anisotropy consistency coefficient is a dimensionless coefficient with a value range of zero to one. S35. Perform angle continuity processing on the main direction angle map, and correct the angle jumps that cross zero degrees or 180 degrees according to the row and column traversal order to generate a continuous main direction angle map. S36. Combine the running direction of the steel strip to set a strip statistical window, and perform a robust estimation of direction consistency on the continuous main direction angle diagram and the anisotropy consistency coefficient diagram to obtain the median filtering result and the dispersion measure diagram along the running direction. S37. Align and rasterize the continuous principal direction angle map, anisotropic consistency coefficient map, and direction consistency robust estimation results according to pixel coordinates to form a direction feature matrix.

[0027] The directional feature matrix contains both directional angle and directional confidence information, providing a basis for directional adaptive modulation for the improved phase stretching transform algorithm, thereby improving the accuracy and stability of defect detection. In directional feature analysis, local directions may be unstable due to surface noise or reflection interference. To quantify the confidence level of the direction, this invention calculates anisotropy consistency coefficients based on the magnitude relationship and variability of structural tensor features. This coefficient reflects the consistency of directions within a local region, ranging from zero to one. The closer the value is to one, the more obvious the directional feature, suitable for subsequent direction weighting; a value close to zero indicates a chaotic directional distribution, possibly indicating a defect or noise area. Since the principal direction angle exhibits a periodic jump between zero and 180 degrees, direct use would lead to discontinuities in the direction field. To ensure spatial consistency of the direction information, angle continuity processing is performed on the principal direction angle map. This processing involves traversing the image rows and columns, detecting angle differences between adjacent pixels, and performing angle compensation correction on regions exceeding a threshold, thereby generating a continuous principal direction angle map and ensuring a smooth spatial transition of the direction feature matrix. To eliminate noise interference and local angle anomalies, this invention combines the steel strip running direction with a strip statistical window to robustly estimate the continuous principal direction angle map and consistency coefficient map. Median filtering is used to smooth local direction fluctuations, obtaining the directional trend results along the running direction. Simultaneously, the dispersion of the orientation angle is calculated to form a dispersion metric map, which reflects the stability of local orientation features and provides a confidence index for subsequent weighted fusion.

[0028] In this embodiment, step S4 includes: S41. Read the standardized image, specular reflection probability map and orientation feature matrix, perform a fast Fourier transform on the standardized image to obtain spectral data, and perform spectral centering and amplitude normalization. S42. Define a scale set and a direction set, wherein the scale set is a multi-level scale sequence discrete according to pixel space, and the direction set is a direction angle sequence uniformly discrete according to angle; The proposed scale set is to cover typical size ranges from minute defects to wider defects, and the orientation set is to be equally spaced within the range of 0° to 180°. The density of the set can be configured based on camera resolution, steel strip speed, and the minimum detectable size of the target defect to achieve a balance between computational load and orientation resolution.

[0029] S43. Generate a weight map based on the specular reflection probability map and the orientation feature matrix. The weight map includes reflection suppression weights and orientation consistency weights, and is aligned pixel-by-pixel with the standardized image. The reflection suppression weight is used to reduce the interference of the highlight area on the phase modulation, and the orientation consistency weight is used to highlight the contribution of the orientation-stable region. The two types of weights are normalized and fused into a single coefficient matrix, which corresponds one-to-one with the image pixel grid, so as to adaptively adjust the kernel function parameters in different regions;

[0030] S44. Establish a phase kernel template for the improved phase stretching transformation algorithm, and set kernel strength, direction selection bandwidth and scale control parameters for each scale and each direction according to the scale set and direction set. The kernel strength is calculated based on the reflection suppression weight and noise variance estimation results in the weighted graph. It is determined by a linear weighting relationship. The reflection suppression weight and noise variance are normalized and then weighted by a proportional coefficient. The reciprocal of the weighted result is used as the kernel strength adjustment coefficient. The direction selection bandwidth is calculated based on the direction consistency weight in the weight graph and determined by normalized inverse proportional mapping. The direction consistency weight is normalized and mapped to the set direction bandwidth range, and the direction response range is adjusted according to the mapping result. The scale control parameters are calculated jointly based on the noise variance estimation results and the orientation consistency weights, and are determined by a dual-weighting method. The normalized results of the noise variance and the normalized results of the orientation consistency weights are summed according to a set proportional coefficient and then a linear transformation is performed. The phase kernel template defines the morphology and range of frequency-domain phase modulation. Kernel strength controls the phase shift amplitude, direction selection bandwidth controls directional sensitivity, and scale control parameters control the response width between high and low frequencies. The weighted graph determines the spatial parameter distribution, and noise estimation is used to suppress over-modulation in high-noise regions, ensuring robustness.

[0031] S45. Map the phase kernel template to the spectral coordinate system to generate a corresponding phase kernel matrix group, so that each phase kernel matrix is ​​aligned with the direction set and consistent with the spectral size; The mapping process instantiates each scale-direction configuration as a two-dimensional matrix of the same size as the spectrum and aligns it with the center of the spectrum. The phase kernel matrix group is organized with a three-dimensional index of scale × direction × spectral position, which facilitates batch parallel processing and fast retrieval, and avoids mutual interference between different directions;

[0032] S46. In the frequency domain, the spectrum data is phase modulated, and the phase kernel matrix group is applied to the spectrum data element by element according to the scale set and direction set to obtain the modulated spectrum channel diagram of each scale and direction respectively. Element-wise phase modulation is performed on the spectral grid, with each position corresponding to a specific phase kernel matrix position. This operation adjusts the phase distribution while maintaining reasonable amplitude, thereby enhancing the frequency-direction components associated with the defect edges. The output is a multi-channel spectral response, with each channel corresponding to a specific scale and direction.

[0033] S47. The modulated spectrum channel diagram is numbered and cached, and a retrieval relationship is established according to the scale index and the direction index.

[0034] This invention improves the kernel function construction and weight control mechanism. Traditional PST algorithms use a single-scale phase kernel function with fixed parameters, uniformly modulating the image phase based solely on spectral amplitude, which is ill-suited to the complex scenarios of high reflectivity and high noise on galvanized steel surfaces. The improved phase stretching transform algorithm proposed in this invention introduces an adaptive control mechanism of the specular reflection probability map and directional feature matrix in the frequency domain. By jointly adjusting the kernel strength, directional selection bandwidth, and scale control parameters of the phase kernel function through reflection suppression weights and directional consistency weights, the phase modulation can be dynamically adjusted in different regions according to reflection intensity and texture direction, enhancing the algorithm's ability to suppress specular reflection interference. Simultaneously, a multi-scale, multi-directional kernel template group replaces the single-scale kernel function, achieving layered phase response modulation of the spectrum at different scales and directions, thus taking into account both subtle surface defects and macroscopic structural changes. The phase response matrix generated after inverse Fourier transform has higher directional sensitivity and structural preservation, accurately reflecting defect boundaries and morphological features in subsequent weighted fusion. This improved mechanism effectively enhances the robustness and defect identification accuracy of the PST algorithm under complex lighting conditions on metal surfaces.

[0035] In this embodiment, step S5 includes: S51. Read the multi-scale, multi-directional spectrum dataset from the modulated spectrum channel diagram, and establish a spectrum processing sequence according to the scale index and direction index. S52. Perform an inverse fast Fourier transform on each channel of the spectrum dataset to obtain a complex image result, wherein the complex image result contains an amplitude component and a phase component; S53. Extract the phase components of the complex image result into a phase response map, and perform phase unrolling processing on the phase transitions spanning the interval from zero to two π to form a continuous phase response map. S54. The phase response map is indexed and classified according to the scale set and the direction set to generate the corresponding phase response channel group; S55. Spatial registration is performed on the phase response channel group in the pixel coordinate system to align the response results at different scales and orientations in the coordinate space. S56. Store the spatially registered phase response channel groups according to the channel number to form a phase response matrix set.

[0036] In this invention, spectral data of all scales and directions are read from the modulated spectral channel map. A spectral processing sequence is established according to a preset scale index and direction index order to ensure that the inverse transformation order is consistent with the data structure. For each spectral channel data, an inverse fast Fourier transform is used to restore the frequency domain signal to a spatial domain complex image. The complex image contains amplitude and phase components, where the amplitude component reflects the brightness energy distribution and the phase component characterizes structural details and texture features. To eliminate the phase periodic jumps caused by the frequency domain transformation, the phase component extracted from the complex image is subjected to phase expansion processing, so that the phase value transitions continuously in the interval from zero to two π, thereby generating a continuous phase response map. Subsequently, the continuous phase response map is indexed and classified according to the scale set and direction set to establish a multi-channel phase response channel group, so that each channel corresponds to a unique scale and direction parameter. To ensure the consistency of the spatial position of each channel, a spatial registration operation is performed on the phase response channel group. Coordinate transformation and interpolation methods are used to correct the position of the response maps at different scales and directions, so that they are strictly aligned in the pixel coordinate system. Finally, the registered phase response channels are stored in numerical order to form a phase response matrix set containing multi-scale and multi-directional information. This matrix set completely records the phase structure characteristics of the galvanized steel surface, providing stable and comparable phase input data for subsequent weighted fusion and defect localization.

[0037] In this embodiment, step S6 includes: S61. Based on the phase response matrix set and the corresponding specular reflection probability map and direction feature matrix, establish a phase response fusion sequence and assign a unified pixel coordinate system. S62. Determine the reflection suppression weight based on the reflection intensity value of each pixel in the specular reflection probability map, and determine the orientation consistency weight based on the anisotropy consistency coefficient in the orientation feature matrix, and generate a weighted coefficient matrix. S63. Perform pixel-by-pixel weighted calculation on each channel image in the phase response matrix set according to the weighting coefficient matrix to obtain multi-scale and multi-directional weighted phase response results; S64. Perform scale normalization and direction merging processing on the weighted phase response results to keep the response amplitudes of different scales and directions consistent. S65. The normalized weighted phase response results are superimposed and fused at the pixel level to generate a comprehensive phase response map containing global and local features.

[0038] In this invention, phase response data at various scales and directions are read from the phase response matrix set and pixel-aligned with the specular reflection probability map and directional feature matrix to establish a unified fusion coordinate system. Reflection suppression weights are generated based on the reflection intensity values ​​of pixels in the specular reflection probability map, and directional consistency weights are generated based on the anisotropy consistency coefficients in the directional feature matrix. These are then fused to form a weighted coefficient matrix. Subsequently, the phase data of each channel in the phase response matrix set are calculated pixel-by-pixel according to the weighted coefficient matrix to obtain multi-scale, multi-directional weighted phase response results. To ensure the numerical comparability of responses at different scales and directions, scale normalization and directional merging processing are performed on the weighted results, and the results are superimposed and fused at the pixel level to form a comprehensive phase response map, providing an input basis for defect threshold segmentation.

[0039] In this embodiment, step S7 includes: S71. Based on the comprehensive phase response map and noise variance estimation results, generate an effective detection area mask according to the camera field of view and the position of the steel strip edge. S72. Calculate the global mean, local variance, and median absolute deviation statistics of pixel grayscale on the integrated phase response map, and generate a threshold parameter set by combining the noise variance estimation results. S73. Apply the threshold parameter group to the comprehensive phase response map, perform hierarchical binarization processing on the pixel grayscale value, and generate a defect response binary map. S74. Perform pixel connectivity operation on the defect response binary image to establish a connected region based on the grayscale continuity of adjacent pixels, forming a preliminary defect connectivity domain. S75. Perform morphological opening and closing operations on the preliminary defect connected domain. The size of the structural element is determined based on the imaging resolution and the surface texture size of the steel strip, in order to remove isolated noise points and correct boundary gaps. S76. Calculate the area, perimeter, aspect ratio, and orientation consistency index of the connected domain after morphological processing, and filter the effective defect areas based on the preset area threshold and shape threshold. S77. Perform contour tracking on the effective defect area, extract the bounding rectangle and boundary coordinate parameters, and output the mask map and boundary information dataset of the steel galvanized surface defect.

[0040] In this invention, the comprehensive phase response map and noise variance estimation results are read, and the effective detection area is determined based on the camera's field of view and the position of the steel strip edge. A threshold parameter set for binarization is generated by calculating the global mean, local variance, and median absolute deviation of the comprehensive phase response map, combined with the noise variance results. This threshold parameter set is used to perform hierarchical binarization processing on the comprehensive phase response map to obtain a defect response binary map. Connected regions are established in the binary map based on the grayscale continuity of adjacent pixels, forming a preliminary defect connected domain. Morphological opening and closing operations are performed on the connected domain to smooth the boundaries. Subsequently, the area, perimeter, aspect ratio, and orientation consistency index of the connected domain are calculated, and effective defect areas are selected based on set thresholds. Finally, contour tracking is performed on the effective areas to extract the bounding rectangle and boundary coordinates, outputting the mask map and boundary information of the defects on the galvanized steel surface.

[0041] Example 1: To verify the feasibility and superiority of this invention in a real industrial environment, it was applied to an online surface quality inspection system for a galvanizing production line in a steel company. This production line is a continuous annealing galvanizing line with a steel strip width of 1250mm, an operating speed of 120m / min, and employs a spangle-free pure zinc plating process. The production site presents complex background factors such as strong reflection, uneven brightness, localized oil contamination, and vibration interference. Traditional algorithms based on grayscale thresholds and edge detection have low differentiation between bright areas and defect areas, easily leading to false positives and false negatives. This invention, by introducing an improved phase stretching transform algorithm and fusing specular reflection probability maps and directional feature matrices, achieves high-precision defect identification under complex lighting conditions.

[0042] In this embodiment, an industrial camera is used to perform high-frequency imaging of a continuously running galvanized steel strip. The camera resolution is 2448×2048 pixels, the exposure time is 0.3ms, and the frame rate is set to 200fps. Continuous image acquisition and inter-frame overlap control are achieved by establishing a synchronization relationship between linear velocity and trigger signal. Flat-field correction and dark-field compensation methods are used to equalize the brightness of the image, resulting in a standardized image. To address the strong reflectivity of the galvanized surface, a specular reflection probability map is constructed to distinguish between real defects and specular reflection areas. This invention utilizes an improved phase stretching transform algorithm for image phase modulation in the frequency domain. By introducing an adaptive direction kernel function, the phase response of small defect boundaries is enhanced. In the experiment, a multi-scale direction set is used, with a scale range of 3 to 15 pixels and a direction resolution of 15°. The direction feature matrix is ​​calculated by combining the anisotropic consistency coefficient, and adaptive weighted phase fusion is achieved by fusing reflection suppression weights and direction consistency weights. After binarization and morphological operations, the system can accurately output the mask and boundary coordinates of the defect area.

[0043] To verify the beneficial effects of this invention, comparative tests were conducted with traditional algorithms based on gray-level difference and algorithms based on Gabor filtering. The experiments were performed on 400 randomly selected images of galvanized steel sheets, including defects such as pinholes, scratches, uneven coating, and oxide spots. The experimental results are shown in Table 1.

[0044] Table 1. Performance Comparison of Different Methods in Detecting Defects on Galvanized Steel Surfaces

[0045] As shown in Table 1, the method of this invention significantly outperforms existing methods in both accuracy and recall, with accuracy improved by approximately 6.5 percentage points and recall by 7.3 percentage points. The false detection rate is also reduced by approximately 4.5 percentage points compared to the traditional gray-level difference algorithm. Particularly under strong reflective conditions, this invention, through its improved phase stretching transform algorithm and directional adaptive phase kernel design, effectively separates the phase distortion in the specular reflection region, achieving a specular reflection suppression index of 0.92, significantly higher than the comparative algorithm. Further analysis of the method's recognition performance under different defect types revealed that for pinhole defects, the detection rate reached 98.6%; for scratches and oxide spots, the detection rates were 96.8% and 97.2%, respectively; and for coating unevenness defects, where the traditional algorithm has a false detection rate as high as 8.1% due to weak gray-level gradients, this invention, relying on a directional feature constraint mechanism, reduces the false detection rate to 1.5%. Furthermore, in a continuous production environment, the system's average detection frame rate reaches 150fps, meeting the real-time requirements of the production line. After 24 hours of stability testing, the algorithm's results remained within ±2% under conditions of fluctuating lighting and slight camera shake, demonstrating strong robustness.

[0046] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A machine vision-based intelligent detection method for defects on galvanized steel surfaces, characterized in that, Includes the following steps: S1. Acquire an image of the galvanized steel surface, and perform brightness normalization and noise variance estimation on the image of the galvanized steel surface to obtain a standardized image; S2. Construct a specular reflection probability map based on the brightness distribution and gradient magnitude of the standardized image, and calculate the reflection intensity value through high quantile statistics and local gradient normalization. S3. Calculate the structure tensor matrix based on the standardized image, determine the principal direction angle and anisotropy consistency coefficient according to the eigenvalues ​​of the structure tensor matrix, and generate the direction feature matrix. S4. Establish a multi-scale orientation adaptive phase kernel function that integrates the specular reflection probability map and the orientation feature matrix, and use an improved phase stretching transform algorithm in the frequency domain to perform phase modulation on the spectrum of the standardized image. S5. Perform inverse Fourier transform on the processed spectrum image, extract the phase response matrix, and obtain the phase response results at different scales and directions; S6. Based on the weights corresponding to the specular reflection probability map and the direction feature matrix, the phase response results are weighted and fused to obtain a comprehensive phase response map; S7. Based on the statistical characteristics of noise variance and integrated phase response map, set a threshold, perform binarization and morphological processing on the integrated phase response map, and output the regional information and boundary coordinates of defects on the galvanized steel surface.

2. The intelligent detection method for surface defects in galvanized steel based on machine vision according to claim 1, characterized in that, Step S1 includes: S11. Construct an imaging unit, which includes an industrial camera and a fixed-focus lens. The industrial camera is a camera device with an external trigger interface, and the fixed-focus lens is fixed to the camera interface by a mechanical locking ring. S12. Arrange lighting units, wherein the lighting units are adjustable ring light sources, the adjustable ring light sources are composed of discrete LED arrays and are installed coaxially around the lens, and the brightness levels and zone lighting angles are set. S13. Establish a linear speed synchronization relationship by electrically connecting the external trigger terminal of the industrial camera to the output terminal of the production line encoder, setting the correspondence between exposure time, trigger frequency and steel strip linear speed, and setting the frame interval and field of view coverage. S14. Perform geometric and lighting calibration, place a flat field correction plate with uniform surface reflection, acquire flat field and dark field images, and record lens optical axis, incident angle and working distance parameters. S15. After calibration, continuously acquire image sequences of galvanized steel surfaces to form the original image dataset of the target area. S16. The original image dataset is subjected to brightness correction and grayscale normalization using the flat field image and dark field image to eliminate uneven illumination distribution and camera response differences, and a standardized image is obtained. S17. Select a textureless uniform region in the standardized image and calculate the temporal variance of the pixel grayscale in that region as the noise estimation result.

3. The intelligent detection method for surface defects in galvanized steel based on machine vision according to claim 1, characterized in that, Step S2 includes: S21. Perform grayscale statistical analysis on the standardized image, calculate the global mean, standard deviation and high quantile of the image pixel grayscale, and determine the brightness threshold range; S22. Perform gradient calculation on the standardized image, calculate the horizontal and vertical gradients using the central difference method, and generate a gradient magnitude map and a gradient direction map. S23. Select a pixel region in the gradient magnitude map whose brightness is higher than the upper limit of the brightness threshold range as the initial reflection region, and record the corresponding pixel coordinates. S24. Within the initial reflection area, calculate the average gradient magnitude and local brightness contrast in the local neighborhood for each pixel, and use the brightness normalization ratio to suppress low contrast areas. S25. Calculate the reflection intensity value of each pixel based on the local brightness contrast and average gradient magnitude, and generate a reflection intensity distribution map composed of the reflection intensity values ​​of each pixel; the reflection intensity value is directly proportional to the brightness high quantile difference and inversely proportional to the local gradient change rate. S26. Perform spatial smoothing on the reflection intensity distribution map, use bilateral filtering to preserve the edge structure, and generate a specular reflection probability map; S27. Normalize the pixel values ​​of the specular reflection probability map, limiting the distribution range to between 0 and 1, to form specular reflection probability data.

4. The intelligent detection method for surface defects in galvanized steel based on machine vision according to claim 1, characterized in that, Step S3 includes: S31. On the standardized image, a local neighborhood window is established with a preset pixel size. The horizontal and vertical gradients of each pixel are calculated using the center difference method to generate a gradient magnitude map and a gradient direction map. S32. Construct a structure tensor matrix graph based on the gradient information in the local neighborhood window. The structure tensor matrix is ​​a second-order symmetric matrix formed based on the local gradient relationship of the image and is aligned pixel by pixel with the normalized image. S33. Perform feature extraction processing on the structure tensor matrix graph to obtain the main direction angle map and the secondary direction angle map, wherein the main direction angle is the angle data representing the main direction of local gradient change; S34. Calculate the anisotropy consistency coefficient map based on the relationship between the magnitudes and the degree of difference of the characteristic quantities of the structural tensor matrix graph. The anisotropy consistency coefficient is a dimensionless coefficient with a value range of zero to one. S35. Perform angle continuity processing on the main direction angle map, and correct the angle jumps that cross zero degrees or 180 degrees according to the row and column traversal order to generate a continuous main direction angle map. S36. Combine the running direction of the steel strip to set a strip statistical window, and perform a robust estimation of direction consistency on the continuous main direction angle diagram and the anisotropy consistency coefficient diagram to obtain the median filtering result and the dispersion measure diagram along the running direction. S37. Align and rasterize the continuous principal direction angle map, anisotropic consistency coefficient map, and direction consistency robust estimation results according to pixel coordinates to form a direction feature matrix.

5. The intelligent detection method for surface defects in galvanized steel based on machine vision according to claim 1, characterized in that, Step S4 includes: S41. Read the standardized image, specular reflection probability map and orientation feature matrix, perform a fast Fourier transform on the standardized image to obtain spectral data, and perform spectral centering and amplitude normalization. S42. Define a scale set and a direction set, wherein the scale set is a multi-level scale sequence discrete according to pixel space, and the direction set is a direction angle sequence uniformly discrete according to angle; S43. Generate a weight map based on the specular reflection probability map and the orientation feature matrix. The weight map includes reflection suppression weights and orientation consistency weights, and is aligned pixel-by-pixel with the standardized image. S44. Establish a phase kernel template for the improved phase stretching transformation algorithm, and set kernel strength, direction selection bandwidth and scale control parameters for each scale and each direction according to the scale set and direction set. The kernel strength is calculated based on the reflection suppression weight and noise variance estimation results in the weighted graph. It is determined by a linear weighting relationship. The reflection suppression weight and noise variance are normalized and then weighted by a proportional coefficient. The reciprocal of the weighted result is used as the kernel strength adjustment coefficient. The direction selection bandwidth is calculated based on the direction consistency weight in the weight graph and determined by normalized inverse proportional mapping. The direction consistency weight is normalized and mapped to the set direction bandwidth range, and the direction response range is adjusted according to the mapping result. The scale control parameters are calculated jointly based on the noise variance estimation results and the orientation consistency weights, and are determined by a dual-weighting method. The normalized results of the noise variance and the normalized results of the orientation consistency weights are summed according to a set proportional coefficient and then a linear transformation is performed. S45. Map the phase kernel template to the spectral coordinate system to generate a corresponding phase kernel matrix group, so that each phase kernel matrix is ​​aligned with the direction set and consistent with the spectral size; S46. In the frequency domain, the spectrum data is phase modulated, and the phase kernel matrix group is applied to the spectrum data element by element according to the scale set and direction set to obtain the modulated spectrum channel diagram of each scale and direction respectively. S47. The modulated spectrum channel diagram is numbered and cached, and a retrieval relationship is established according to the scale index and the direction index.

6. The intelligent detection method for surface defects in galvanized steel based on machine vision according to claim 5, characterized in that, Step S5 includes: S51. Read the multi-scale, multi-directional spectrum dataset from the modulated spectrum channel diagram, and establish a spectrum processing sequence according to the scale index and direction index. S52. Perform an inverse fast Fourier transform on each channel of the spectrum dataset to obtain a complex image result, wherein the complex image result contains an amplitude component and a phase component; S53. Extract the phase components of the complex image result into a phase response map, and perform phase unrolling processing on the phase transitions spanning the interval from zero to two π to form a continuous phase response map. S54. The phase response map is indexed and classified according to the scale set and the direction set to generate the corresponding phase response channel group; S55. Spatial registration is performed on the phase response channel group in the pixel coordinate system to align the response results at different scales and orientations in the coordinate space. S56. Store the spatially registered phase response channel groups according to the channel number to form a phase response matrix set.

7. The intelligent detection method for surface defects in galvanized steel based on machine vision according to claim 6, characterized in that, Step S6 includes: S61. Based on the phase response matrix set and the corresponding specular reflection probability map and direction feature matrix, establish a phase response fusion sequence and assign a unified pixel coordinate system. S62. Determine the reflection suppression weight based on the reflection intensity value of each pixel in the specular reflection probability map, and determine the orientation consistency weight based on the anisotropy consistency coefficient in the orientation feature matrix, and generate a weighted coefficient matrix. S63. Perform pixel-by-pixel weighted calculation on each channel image in the phase response matrix set according to the weighting coefficient matrix to obtain multi-scale and multi-directional weighted phase response results; S64. Perform scale normalization and direction merging processing on the weighted phase response results to keep the response amplitudes of different scales and directions consistent. S65. The normalized weighted phase response results are superimposed and fused at the pixel level to generate a comprehensive phase response map containing global and local features.

8. The intelligent detection method for surface defects in galvanized steel based on machine vision according to claim 1, characterized in that, Step S7 includes: S71. Based on the comprehensive phase response map and noise variance estimation results, generate an effective detection area mask according to the camera field of view and the position of the steel strip edge. S72. Calculate the global mean, local variance, and median absolute deviation statistics of pixel grayscale on the integrated phase response map, and generate a threshold parameter set by combining the noise variance estimation results. S73. Apply the threshold parameter group to the comprehensive phase response map, perform hierarchical binarization processing on the pixel grayscale value, and generate a defect response binary map. S74. Perform pixel connectivity operation on the defect response binary image to establish a connected region based on the grayscale continuity of adjacent pixels, forming a preliminary defect connectivity domain. S75. Perform morphological opening and closing operations on the preliminary defect connected domain. The size of the structural element is determined based on the imaging resolution and the surface texture size of the steel strip, in order to remove isolated noise points and correct boundary gaps. S76. Calculate the area, perimeter, aspect ratio, and orientation consistency index of the connected domain after morphological processing, and filter the effective defect areas based on the preset area threshold and shape threshold. S77. Perform contour tracking on the effective defect area, extract the bounding rectangle and boundary coordinate parameters, and output the mask map and boundary information dataset of the steel galvanized surface defect.

Citation Information

Cited By

  • Architectural coating detection method based on infrared polarization imaging

    CN121861042A

  • Visual image enhancement processing method for workpiece defect feature points

    CN121903902A

  • Automobile steel wire defect real-time detection system based on edge calculation

    CN121904038A

  • Bagging machine conveying detection system based on industrial vision

    CN122066697A

  • Image processing algorithm based on texture fusion analysis

    CN122134812A