Welded pipe surface defect detection system

Through the fusion analysis of multi-angle light source and reflection feature, combined with distortion compensation and gradient-grayscale coupling, the detection difficulties caused by plating and oxidation layers in the surface defect detection of welded pipes are solved, and high-precision and robust defect recognition are achieved.

CN120294018APending Publication Date: 2025-07-11TIANJIN YOUFA STEEL PIPE GRP CO LTD
View PDF 0 Cites 40 Cited by

Patent Information

Application Number
CN202510475470.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the detection of defects on the surface of welded pipes, the non-uniform optical characteristics caused by the plating and oxidation layer are difficult to accurately distinguish defects from mixed reflections, resulting in insufficient defect recognition accuracy and robustness.

Method used

Multi-angle light sources are used to illuminate the surface of the welded pipe, collect reflected light images, extract the diffuse reflection intensity ratio and specular reflection angle distribution matrix, combine the curvature radius of the welded pipe and the movement speed of the station, and determine the surface defect type through distortion compensation and gradient-grayscale space coupling analysis.

Benefits of technology

The accuracy of surface defect recognition of welded pipes is improved, false alarm phenomenon caused by background interference is suppressed, the system's detection robustness under complex operating conditions is enhanced, and the accurate judgment of multiple types of defects is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120294018A_ABST
    Figure CN120294018A_ABST
Patent Text Reader

Abstract

The invention discloses a welded pipe surface defect detection system, particularly relates to the technical field of metal pipe surface quality detection, and is used for solving the problem of defect misjudgment and missing detection caused by mixed reflection interference under single light source irradiation in the existing visual detection technology. An annular light source is adopted for time-sharing pulse triggering through a light source control module, reflected light images at different angles are synchronously collected, a feature extraction module constructs a diffuse reflection intensity ratio and mirror reflection angle distribution matrix to generate a three-dimensional reflection feature spectrum, and reflection anomaly characterization of a defect area is enhanced; the area positioning module screens candidate areas and inhibits interference by combining strength ratio circumferential deviation degree and reflection angle gradient change, and the distortion correction module compensates geometric distortion errors based on curvature radius and station movement parameters, filters pseudo defects of abnormal time sequence fluctuation, and improves the accuracy of the distortion correction. And the defect judgment module utilizes a gradient-gray scale space coupling classification model to distinguish the types of cracks, scratches and corrosion, and finally judges the defect authenticity in combination with reflection characteristic deviation vector superposition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of surface quality detection of metal pipes, and more specifically, the present invention relates to a surface defect detection system for welded pipes. Background Art

[0002] In the production process of welded pipes, the surface quality of welded pipes directly affects the pipeline sealing performance and structural strength. Currently, industrial vision detection systems mostly rely on gray-scale or morphological analysis under a single light source configuration to segment abnormal regions in images through preset thresholds; however, due to the non-uniform optical characteristics formed on the surface of welded pipes by plating, oxidation, or rolling treatment, the detection target regions often present a mixed effect of specular reflection and diffuse reflection, resulting in poor stability of imaging features.

[0003] In the prior art, vision detection methods based on the assumption of uniform illumination are difficult to accurately distinguish surface defects from mixed reflection interference. Especially in the scenarios of multi-layer coated welded pipes or those with oxide layers, the defect regions and normal regions may present the same apparent features due to similar reflection characteristics, causing misjudgment and missed detection by traditional gray-scale threshold or edge detection algorithms, seriously restricting the defect recognition accuracy and system robustness. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a surface defect detection system for welded pipes to solve the problems proposed in the above background art.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A surface defect detection system for welded pipes, comprising the following modules:

[0007] A light source control module, which is used to irradiate the surface of the welded pipe with multi-angle light sources and collect the reflected light images corresponding to each light source;

[0008] A feature extraction module, which is used to extract the diffuse reflection intensity ratio and specular reflection angle distribution matrix of each reflected light image, and generate a basic reflection feature map of the surface of the welded pipe;

[0009] A region positioning module, which locates candidate defect regions according to the circumferential distribution deviation of the diffuse reflection and specular reflection intensity ratios in the basic reflection feature map, and outputs an updated candidate defect region set by screening out interference regions;

[0010] A distortion correction module, which calculates a geometric distortion compensation coefficient based on the curvature radius of the welded pipe and the moving speed of the detection station, and filters out pseudo-defect regions in combination with the time-series fluctuation characteristics of the reflection direction angle with the movement of the station in the updated candidate defect region set;

[0011] A defect determination module, configured to extract the morphological gradient amplitude and the standard deviation of the grayscale histogram of the filtered region, and determine the type of surface defect according to the gradient-grayscale space coupling relationship;

[0012] A result output module, configured to generate a final defect determination based on the superposition result of the deviation vector between the type of surface defect and the basic reflection feature map.

[0013] In a preferred embodiment, the surface of the welded pipe is irradiated with multi-angle light sources and the reflected light images corresponding to the respective light sources are collected, including:

[0014] A plurality of linearly distributed irradiation light sources are configured into an annular light source array, which is uniformly arranged outside the circumferential detection surface of the welded pipe at a preset circumferential interval angle;

[0015] According to the reflectivity range of the metal material on the surface layer of the welded pipe, the emission wavelength and projection angle of each light source are set to generate a composite incident light field for the axial region of the pipe body of the welded pipe;

[0016] The light sources in the annular light source array are triggered by time-division pulses according to a preset time sequence, and each pulse trigger signal corresponds to the instantaneous turn-on of a single light source;

[0017] In the rising edge stage of each light source trigger pulse, the industrial camera is synchronously controlled to collect the reflected light image under the current light source irradiation in the global shutter shooting mode;

[0018] The acquisition frame rate is adjusted according to the lens focal length of the industrial camera so that the resolution of the reflected light image meets the pixel pitch threshold corresponding to the minimum detectable defect size.

[0019] In a preferred embodiment, the diffuse reflection intensity ratio and the specular reflection angle distribution matrix of each reflected light image are extracted to generate a basic reflection feature map of the surface of the welded pipe, including:

[0020] The grayscale value distribution of the pixel regions of each reflected light image is analyzed to separate the corresponding diffuse reflection intensity component and specular reflection intensity component, and the diffuse reflection intensity ratio under different light source irradiations is calculated based on the peak interval distribution of the diffuse reflection intensity components in the reflected light images of each light source at the same axial position;

[0021] According to the circumferential interval angle parameter and the projection angle distribution of the annular light source array, a light source spatial angle index table is constructed. Taking the mutation position of the specular reflection intensity component at the same pixel point in the reflected light images of different light sources as the feature point, the specular reflection angle value corresponding to each feature point is calculated in combination with the geometric projection relationship of the light source spatial angle index table, and the specular reflection angle distribution matrix is generated according to the pixel coordinate mapping;

[0022] Fuse and superimpose the diffuse reflection intensity ratio and the specular reflection angle distribution matrix according to a preset weight ratio to form a basic reflection feature map containing three-dimensional reflection characteristic parameters.

[0023] In a preferred embodiment, locate the candidate defect areas according to the circumferential distribution deviation of the diffuse reflection to specular reflection intensity ratio in the basic reflection feature map, and output an updated set of candidate defect areas by screening out the interference areas, including:

[0024] Divide the surface of the welded pipe circumferentially into angular intervals corresponding to a preset number of circumferential segments, calculate the deviation of the mean value of the diffuse reflection intensity ratio in each angular interval from the corresponding mean value of the defect-free area in the standard sample surface feature map, and select the angular intervals with deviations exceeding the dynamically set threshold as the circumferential position range of the candidate defect areas;

[0025] Extract the circumferential gradient change rate corresponding to the specular reflection angle value in the specular reflection angle distribution matrix of the candidate defect areas, combine the ratio relationship between the diffuse reflection intensity component and the specular reflection intensity component in the surface three-dimensional reflection characteristic parameters, set the tolerance threshold of the reflection angle gradient change rate and the fluctuation range of the proportion of the diffuse reflection intensity component, and exclude abnormal reflection data in the discontinuous gradient change areas;

[0026] According to the continuous distribution characteristics of the candidate defect areas in the basic reflection feature map, use the region growing method to merge adjacent candidate defect areas, and eliminate discrete noise points according to the preset minimum defect area threshold and edge smoothness parameter to generate an updated set of candidate defect areas.

[0027] In a preferred embodiment, calculate the geometric distortion compensation coefficient based on the curvature radius of the welded pipe and the moving speed of the detection station, and filter out the pseudo-defect areas in combination with the time-series fluctuation characteristics of the reflection direction angle with respect to the station displacement in the updated set of candidate defect areas, including:

[0028] According to the circumferential position and axial coordinates of each area in the updated set of candidate defect areas, obtain the curvature radius of the welded pipe at the corresponding position through the welded pipe surface geometric feature database;

[0029] Based on the moving speed of the detection station and the time interval of the corresponding reflection direction angle acquisition, calculate the geometric distortion correction relationship between the axial displacement of the detection station and the circumferential angle increment of the welded pipe;

[0030] According to the proportional coefficient between the axial displacement and the circumferential angle increment in the geometric distortion correction relationship and the local change amount of the curvature radius of the welded pipe, generate the geometric distortion compensation coefficient;

[0031] Synchronously extract the time-series fluctuation amplitude of the reflection direction angle of each area in the updated set of candidate defect areas under the continuous change of the detection station displacement, and correct the cumulative deviation of the time-series fluctuation amplitude through the geometric distortion compensation coefficient after the welded pipe curvature compensation;

[0032] Combine the corrected timing fluctuation amplitude with the preset fluctuation tolerance threshold, exclude the candidate regions whose timing distributions do not conform to the continuous defect reflection characteristics, and output the final defect region set.

[0033] In a preferred embodiment, extract the morphological gradient amplitude and the standard deviation of the gray histogram of the filtered region, and determine the surface defect type according to the gradient-gray space coupling relationship, including:

[0034] Based on the geometric distortion correction result of the filtered region, calculate the corresponding morphological gradient amplitude and obtain the corresponding standard deviation of the gray histogram, and input the morphological gradient amplitude and the standard deviation of the gray histogram into the pre-established gradient-gray coupling classification model;

[0035] Based on the distribution difference of the morphological gradient amplitude and the standard deviation of the gray histogram in the gradient-gray space, determine the corresponding surface defect type.

[0036] In a preferred embodiment, the gradient-gray coupling classification model includes the boundary values of the mapping intervals calibrated through experiments for three surface defect types, namely surface cracks, rust, and scratches, in the gradient-gray space.

[0037] In a preferred embodiment, generate the final defect determination based on the superposition result of the deviation vector of the surface defect type and the basic reflection feature map, including:

[0038] Obtain the basic reflection feature map corresponding to the surface defect type;

[0039] Extract the actual reflectance of the current candidate region under the same lighting conditions, and calculate the absolute value of the difference between the actual reflectance and the calibration parameter of the corresponding surface defect type as the deviation amplitude;

[0040] Generate the deviation vector direction and modulus according to the proportional relationship between the deviation amplitude and the preset deviation threshold;

[0041] Normalize and superimpose the coordinate displacement vector of the current candidate region in the gradient-gray space and the deviation vector. When the modulus of the superimposed vector exceeds the tolerance radius defined in the reflection feature map of the corresponding surface defect type, trigger the correction of the final defect determination result.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] 1. Through the collaborative imaging of multi-angle light sources and the fusion analysis of multi-dimensional reflection features, the defect recognition accuracy of non-uniform optical surfaces is effectively improved. In the system, the annular light source array combined with time-sharing trigger control generates a composite feature map containing the ratio of diffuse reflection intensity and the distribution of specular reflection angles for the mixed reflection characteristics of different coatings and oxidation states on the surface of the welded pipe. Compared with the defects where the gray-scale features are easily interfered under the traditional single illumination mode, by extracting the intensity ratio relationship and spatial angle distribution parameters of diffuse reflection and specular reflection, the difference representation ability of the reflection characteristics in the defect area is significantly enhanced, so as to stably extract the defect features in complex surface scenarios such as coating and oxidation, and suppress the false alarm phenomenon caused by background interference.

[0044] 2. Through the compensation of time-series fluctuation features and the coupling classification of gradient-gray space, the robustness of the system to geometric distortion in the dynamic detection of welded pipes is enhanced. Aiming at the pseudo-defect problem caused by curvature deformation during high-speed moving detection, the compensation coefficient is calculated based on the radius of curvature and the dynamic movement of the working station, and the pseudo-region drift error is corrected by combining the time-series fluctuation law of the reflection direction angle. Further, by fusing the joint analysis of the morphological gradient amplitude and the gray-scale statistical characteristics, a differential criterion for defect types in the spatial coupling relationship is established, making the distinction of multiple types of defects such as cracks and scratches more credible and achieving accurate determination under complex working conditions. Brief Description of the Drawings

[0045] Figure 1 It is a schematic structural diagram of a surface defect detection system for welded pipes according to the present invention. Detailed Embodiments

[0046] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0047] Embodiment: Figure 1 A schematic structural diagram of a surface defect detection system for welded pipes according to the present invention is given. A surface defect detection system for welded pipes includes the following modules:

[0048] A light source control module for irradiating the surface of the welded pipe with multi-angle light sources and collecting the reflected light images corresponding to each light source;

[0049] A feature extraction module for extracting the ratio of diffuse reflection intensity and the specular reflection angle distribution matrix of each reflected light image to generate a basic reflection feature map of the surface of the welded pipe;

[0050] The area positioning module locates the candidate defect areas according to the circumferential distribution deviation of the diffuse reflection to specular reflection intensity ratio in the basic reflection feature map, and outputs and updates the candidate defect area set by screening out the interference areas;

[0051] The distortion correction module calculates the geometric distortion compensation coefficient based on the curvature radius of the welded pipe and the moving speed of the detection station, and filters out the pseudo-defect areas in combination with the temporal fluctuation characteristics of the reflection direction angle with the work position movement in the updated candidate defect area set;

[0052] The defect determination module is used to extract the morphological gradient amplitude and the standard deviation of the gray histogram of the area after filtering, and determine the surface defect type according to the gradient-gray space coupling relationship;

[0053] The result output module generates the final defect determination based on the superposition result of the deviation vector between the surface defect type and the basic reflection feature map.

[0054] Irradiate the surface of the welded pipe with multi-angle light sources and collect the reflected light images corresponding to each light source. The specific implementation is as follows:

[0055] When constructing an annular light source array outside the circumferential detection surface of the welded pipe, first arrange multiple linear light sources using high-brightness LEDs evenly along the circumferential direction of the welded pipe. Specifically, in the detection areas formed on both sides of the advancing direction of the welded pipe, the circumferential interval angle is determined according to the rule that the center distance between adjacent light sources is associated with the curvature radius of the welded pipe. For example, on a pipe with a curvature radius of 150 mm, the adjacent light source interval angle is set within the range of 6 degrees to 10 degrees, so that the projection angle of each light source covers the angular change span between the tangent direction and the normal direction of the welded pipe surface.

[0056] The linear light source uses the visible light spectral band, such as the spectral range corresponding to positive white light. The emission angle of a single LED is adjusted to a divergence angle through a lens assembly, such as within the range of 45 degrees to 60 degrees, and the overlap rate of the focused light spots on the welded pipe surface is controlled to be, for example, not more than 30%, so as to reduce the brightness fluctuation caused by the interference of adjacent light sources.

[0057] After completing the physical arrangement, use an adjustable mechanical fixture to fix the position of the light source, and calibrate the relative angle between the light source axis and the welded pipe axis through an optical positioning device. For example, use a laser projector to compare the offset of the projection shadows between the two until the incident plane of all light sources is orthogonally aligned with the cross-section of the welded pipe.

[0058] When setting the emission wavelength and projection angle of each light source according to the reflectivity range of the metal material on the surface layer of the welded pipe, parameter optimization is carried out based on the spectral reflection characteristics corresponding to different metal materials. For example, for the galvanized layer surface, a short-wavelength light source is preferably used, and its wavelength range is, for example, within the interval of 400 - 500 nm, and the band corresponding to the maximum reflection peak is selected as the irradiation light source through the material reflectivity test data.

[0059] The projection angle of the light source is calculated through a geometric model. For example, under the condition that the pipe diameter is proportional to the light source distance, the installation position of a single light source is adjusted so that the central incident angle of the composite incident light field formed in the axial region of the pipe body is within the range of 55 degrees to 75 degrees and is distributed according to the reflection characteristic curve within the axial boundary angle range. For example, for the requirement that the reflection angle covers 50° to 130°, the change gradient of the incident angle is controlled to adapt to the light field uniformity index. During the parameter setting process, it is optimized and verified through actual measurement. For example, a spectrocolorimeter is used to perform multi-point sampling on the reflected light on the surface of the specimen, and the light source wavelength and angle are iteratively adjusted according to the light intensity distribution data until it meets the detection sensitivity threshold.

[0060] When the light sources in the annular light source array are triggered by time-sharing pulses according to a preset time series, the trigger period is designed based on the matching relationship between the number of light sources and the response speed of the imaging system. For example, for an annular array of 36 light sources, the duration of a single trigger pulse is set to be synchronized with the exposure time of the camera, and the interval time between the two is determined comprehensively considering the signal transmission delay and the afterglow attenuation factor of the light source. The trigger interval between adjacent light sources is greater than the system reset period. For example, a blanking period of 2 milliseconds to 5 milliseconds is added after the camera exposure ends to avoid signal crosstalk. During the trigger timing design, dynamic adjustment is performed for the light intensity accumulation effect. For example, the current pulse width is corrected in real time according to the average gray value of the image in the previous cycle to ensure that the image brightness remains within the set dynamic range.

[0061] When synchronously controlling an industrial camera to collect reflected light images at the rising edge stage of each light source trigger pulse, the precise synchronization of the trigger action is achieved through an optoelectronic signal interlocking mechanism. For example, a pulse edge detection circuit is used to convert the rising edge of the electrical signal driving the light source into a trigger signal for the camera exposure, and the synchronization accuracy is controlled within the microsecond magnitude error range.

[0062] The exposure parameters of the industrial camera are set according to the pulse characteristics of the light source. For example, the exposure time is set to be slightly shorter than the duration of the light source pulse, and a redundant time of 5% to 10% is reserved to avoid capturing the residual light signal after the light source is turned off. During the synchronous control process, noise suppression means are adopted. For example, an electromagnetic shielding layer is added to the signal transmission path, and the trigger cable is physically isolated from the power supply cable to ensure the stability of the timing signal.

[0063] When adjusting the acquisition frame rate according to the focal length of the industrial camera lens, a parameter mapping relationship is established based on the optical imaging principle and the moving target detection requirements. For example, for a longitudinally moving welded pipe, the upper limit of the frame rate is related to the moving speed of the pipe body and the detection resolution, and the matching relationship between the two is determined by means of formula derivation or experimental calibration.

[0064] The pixel pitch threshold is set according to the defect detection standard. For example, it is required that the imaging area of a single defect in the image covers at least 3×3 pixels, and the corresponding actual physical size is obtained by converting through the lens focal length and the field of view ratio. When adjusting the lens parameters, multi-dimensional collaborative optimization is adopted. For example, under the condition of a fixed object distance, the change trend of image sharpness is tested by replacing lenses with different focal lengths, and the lens with the smallest magnification that meets the resolution requirements is selected to expand the detection field of view. At the same time, a dynamic frame rate adjustment mechanism is combined to compensate for the imaging delay caused by the change of the field of view.

[0065] Extract the diffuse reflection intensity ratio and the specular reflection angle distribution matrix of each reflected light image to generate the basic reflection feature map of the welded pipe surface. The specific implementation is as follows:

[0066] Based on the acquisition of the reflected light images of each light source on the surface of the welded pipe, the specific implementation process of generating the basic reflection feature map by the method of separating the image gray distribution characteristics and reconstructing the spatial angle projection is as follows: For the reflected light images corresponding to different light source trigger pulses, first extract the pixel area at the same axial position on the surface of the welded pipe, and traverse the pixel points in the image by setting a gray distribution analysis window, where the window size is set to cover the pixel rows corresponding to the unit length of the axial direction of the welded pipe.

[0067] Decompose the gray value distribution curve of each pixel point within the window. Based on the change trend of the gray value of the pixel point with the light source trigger sequence, use the curve fitting algorithm to distinguish the superimposed area of the diffuse reflection intensity component and the specular reflection intensity component; specifically, the component with a gentle attenuation trend with the change of the light source angle in the curve is determined as the diffuse reflection intensity component, and the interval with a single peak mutation is determined as the specular reflection intensity component. The threshold of the demarcation point is set according to the gray change characteristics in the reflected image data of the known standard surface.

[0068] For all the reflected light images of the light sources at a specific axial position of the welded pipe, take the peak value of the diffuse reflection intensity component in the corresponding area of each image as the input quantity, take the peak value under the initial light source irradiation condition as the reference value, and calculate the ratio of the remaining peak values to the reference value one by one according to the light source arrangement order to form a set of diffuse reflection intensity ratios. The determination of the reference value adopts the peak value of the diffuse reflection component of the reflected light image corresponding to the light source in the normal direction of the welded pipe in the image sequence, and the position of this light source is determined by the spatial angle setting parameters of the previous light source array.

[0069] Establish a mapping model of the light source space coverage relationship according to the installation parameters of the annular light source array. First, retrieve the circumferential interval angle parameter of the annular light source array, which comes from the included angle degree between the center lines of adjacent light sources and the axis of the welded pipe recorded during the installation of the light source array; at the same time, load the projection angle distribution data of each light source, including the actual light projection area after adjusting the light source divergence angle, which is obtained through optical calibration devices during the light source debugging stage.

[0070] Integrate the installation angle parameters of the light source and the projection angle data at the corresponding positions to establish a light source spatial angle index table, where the index fields include the light source number, the circumferential angle, the projection angle range, and the spatial coordinate projections of the coverage areas of each light source on the surface of the welded pipe. For the specular reflection intensity components of the same pixel point in multiple reflected light images, retrieve the position of the triggering light source where the specular reflection intensity component mutates in the image sequence. Through the projection angle data of the triggering light source in the light source spatial angle index table, combined with the projection position of the pixel point on the surface of the welded pipe, construct a three-dimensional space model of the light source incident vector and the surface normal vector.

[0071] According to the principle in the law of specular reflection that the angle of incidence is equal to the angle of reflection, use the angle between the light incident direction of the triggering light source and the specular reflection direction as the calculation basis for the specular reflection angle. Calculate the specular reflection angle values corresponding to each pixel point one by one through the vector angle calculation method, and map the calculation results to the matrix structure according to the pixel coordinates to form a specular reflection angle distribution matrix covering the entire surface. During this process, the specular reflection direction is determined by the connection direction between the lens position coordinates of the industrial camera and the spatial coordinates of the pixel point, and this coordinate data comes from the alignment calibration result of the industrial camera installation parameters and the welded pipe positioning coordinate system.

[0072] When performing channel fusion, preset various weight parameters and channel association rules for fusion. Determine the contribution weights of the diffuse reflection intensity ratio and the specular reflection angle distribution in defect recognition according to the surface inspection requirements of the welded pipe. These weight parameters are optimized through experimental data. The specific method includes conducting multiple groups of weight ratio tests on samples of different material defects and selecting the ratio scheme that maximizes the reflection characteristic differences between the defect area and the background area.

[0073] Convert the diffuse reflection intensity ratio into the first-channel data according to the weight coefficient, and assign the ratio corresponding to the axial position to each pixel point through pixel coordinate matching. Convert the specular reflection angle distribution matrix into the second-channel data according to the pixel coordinates, and assign the calculated normalized specular reflection angle value to each pixel point. Perform pixel-level weighted fusion on the first-channel and second-channel data through the channel superposition algorithm. During the weighting process, adjust the numerical influence degree of each channel on the final map according to the preset superposition ratio to form a composite data matrix containing the three-dimensional characteristics of diffuse reflection and specular reflection. The normalization process uses a linear conversion method to map the specular reflection angle values to a preset standard numerical range. For example, convert the 0 - 90 degree reflection angle to the 0 - 255 gray level. The fused basic reflection feature map corresponds to the combination of reflection characteristic parameters of each pixel point on the surface of the welded pipe at the data level, providing a feature input containing multi-dimensional reflection attributes for subsequent defect detection algorithms.

[0074] Locate the candidate defect area according to the circumferential distribution deviation of the ratio of diffuse reflection to specular reflection intensity in the basic reflection feature map, and output and update the candidate defect area set by screening out the interference area. The specific implementation is as follows:

[0075] Equally divide the surface of the welded pipe into angular intervals corresponding to the preset number of circumferential segments along the circumferential direction, where the preset number of circumferential segments is set to a fixed value according to actual detection requirements. For example, divide the angular interval by a 1° interval of the circumferential length of the welded pipe; calculate the mean value of the diffuse reflection intensity ratio within each angular interval. The diffuse reflection intensity ratio is the ratio of the diffuse reflection component to the total reflection component, and the total reflection component is calculated by the detection device through collecting the multi-angle reflectivity data of the reflected light on the surface of the welded pipe; compare the mean value of each angular interval with the corresponding mean value of the defect-free area in the standard sample surface feature map. The standard sample feature map is generated by averaging the multiple reflection data of known defect-free welded pipe samples in advance and is used to establish a benchmark model for the reflection intensity distribution; calculate the deviation of each angular interval according to the comparison result. The calculation method of the deviation is the percentage of the absolute difference between the mean value of the current angular interval and the mean value of the standard sample divided by the mean value of the standard sample; when setting the dynamic threshold, based on the statistical distribution of the deviation values of all angular intervals, for example, determine the value corresponding to the top 5% of the deviation through the distribution histogram of the deviation as the dynamically set threshold, and select the angular intervals with a deviation exceeding the dynamically set threshold as the circumferential position range of the candidate defect area.

[0076] Extract the circumferential gradient change rate corresponding to the specular reflection angle value in the specular reflection angle distribution matrix of the candidate defect area. The specular reflection angle distribution matrix collects the specular reflection angle data by the detection device with a preset angular resolution and forms a matrix according to the circumferential angular interval and the detection position coordinates; when calculating the gradient change rate, perform a first-order difference calculation on the specular reflection angle value of each candidate defect area along the circumferential direction of the welded pipe, and use the median of the absolute value of the gradient as the local change rate characterization value; combine the ratio relationship between the diffuse reflection intensity component and the specular reflection intensity component in the surface three-dimensional reflection characteristic parameters. The ratio relationship determines the distinguishable range of the two under different surface defect types through pre-test experiments. For example, for scratch-type defects, the proportion of the specular reflection component is significantly higher than that of the defect-free area; when setting the tolerance threshold of the specular reflection angle gradient change rate, it is generated by multiplying the median value of the gradient change rate within the candidate area by a correction factor. The correction factor is adjusted to an empirical value between 0.8 and 1.2 according to the noise level of the actual detection device; in addition, screen out abnormal reflection data by combining the fluctuation range of the proportion of the diffuse reflection intensity component. The fluctuation range is set to an interval that fluctuates up and down by 10% of the mean value corresponding to the defect-free sample, and exclude the candidate areas where the gradient change rate exceeds the tolerance threshold or the proportion of the diffuse reflection exceeds the fluctuation range. For example, the gradient change rate exceeding the change amount within 10% of the circumferential length is regarded as abnormal reflection data in the non-continuous gradient change area.

[0077] When using the region growing method to merge adjacent candidate defect regions according to the continuous distribution characteristics of candidate defect regions in the basic reflection feature map, first, during the growth process, the deviation difference between adjacent angular intervals does not exceed the preset growth tolerance, and the growth tolerance is set to 50% of the dynamically set threshold; second, the merged candidate region needs to meet the condition that the circumferential coverage angle span is greater than the preset angle tolerance, and the angle tolerance is set to 3° to 5° according to the circumferential dimension requirements of the smallest detectable defect; when eliminating discrete noise points according to the preset minimum defect area threshold, the coverage areas of the candidate region in the circumferential and axial directions are mapped to the curved surface coordinate system of the welded pipe through multi-angle reflection data, and discrete regions with an area less than 0.5 square millimeters are removed; at the same time, the boundary of the final candidate defect region is adjusted according to the edge smoothness parameter, and the smoothness parameter analyzes the edge curvature radius of the candidate region, and retains the region where the curvature radius matches the preset curvature tolerance, and finally generates an updated set of candidate defect regions.

[0078] The preset circumferential segmentation number is determined by equally dividing the circumferential length of the welded pipe, and the establishment of the standard sample feature map includes averaging the data obtained from multiple repeated detections to eliminate the influence of random noise; the statistical distribution method of the dynamic threshold combines the global characteristics of the detection scene to avoid the problem of insufficient adaptability of the fixed threshold to different welded pipes.

[0079] The tolerance threshold of the gradient change rate is associated with the equipment noise level through a correction coefficient, directly solving the misjudgment caused by measurement errors in actual data; the setting of the fluctuation range comprehensively considers the influence of different defects on the proportion of reflection components. For example, the proportion of diffuse reflection in the oxidation region may increase significantly due to the increase in surface roughness.

[0080] The growth tolerance of the region growing method is associated with the dynamic threshold to ensure the consistency of the merging logic and the initial screening conditions; the curvature smoothing process is based on the geometric characteristics of the actual defect edge. For example, the edge curvature of a real crack is usually lower than that of a pseudo-defect formed by detection noise.

[0081] Based on the curvature radius of the welded pipe and the moving speed of the detection station, calculate the geometric distortion compensation coefficient, and filter out the pseudo-defect region by combining the time-series fluctuation characteristics of the reflection direction angle with the displacement of the work position in the updated set of candidate defect regions. The specific implementation is as follows:

[0082] When obtaining the surface curvature radius of the welded pipe, the position parameters of the candidate defect area are extracted through the geometric feature database of the welded pipe surface. The construction process of the geometric feature database of the welded pipe surface is to use a three-dimensional laser scanner to perform a full-circumference scan and axial segmented sampling on the outer contour of the welded pipe. The scan interval at each axial position is determined by one-tenth of the moving speed of the detection station. For example, when the axial moving speed of the detection station is set to 2 millimeters per second, the scan interval is the result of multiplying the moving speed by the time unit (such as 0.1 second), that is, the displacement amount every 0.1 second when moving 2 millimeters per second is 0.2 millimeters. The circumferential angle division accuracy is 1 degree, and the corresponding curvature radius data is stored at the position numbered for each circumferential angle interval. For example, when it is detected that the candidate defect area is located at the position where the axial index is equal to 5 and the circumferential angle interval number is equal to 12, the corresponding table in the database is directly called to obtain the curvature radius at this position. If this position is actually a weld area, the change trend of the curvature can be identified by comparing the curvature radius data of adjacent axial positions.

[0083] Based on the moving speed of the detection station (such as 2 millimeters per second) and the acquisition time interval of the reflection direction angle (such as 0.1 second), calculate the axial displacement amount of the detection station per unit time. The specific method is to multiply the moving speed by the time interval to obtain the displacement amount. For example, when the speed is 2 millimeters per second and the time interval is 0.1 second, the axial displacement amount is 0.2 millimeters. At the same time, if the circumferential rotation angular velocity of the welded pipe is 1.5 degrees per second, the circumferential angle increment within the same time period can be obtained by multiplying the angular velocity by the time interval, which is 0.15 degrees. The geometric distortion correction proportionality coefficient is determined by the ratio of the axial displacement amount to the circumferential angle increment. For example, when the axial displacement amount is 0.2 millimeters and the circumferential angle increment is 0.15 degrees, this coefficient is the value after 0.2 millimeters is divided by 0.15 degrees, approximately 1.33 millimeters per degree. This coefficient is used for the quantitative mapping of data distortion in the subsequent compensation process.

[0084] When generating the geometric distortion compensation coefficient, first calculate the difference in the curvature radius between the current detection station and the previous station in the same circumferential angle interval. For example, when the current curvature radius is 35.6 millimeters and the curvature radius of the previous station is 34.8 millimeters, the difference is 0.8 millimeters. The geometric distortion compensation coefficient is generated based on the correction proportionality coefficient, the current curvature radius, and the absolute value of the curvature radius difference. Specifically, this coefficient is the product of the correction proportionality coefficient and the current curvature radius divided by the absolute value of the curvature radius difference. Substituting the example values, the compensation coefficient is approximately 59.2 (that is, 1.33 millimeters per degree multiplied by 35.6 millimeters and then divided by the absolute value of 0.8 millimeters), and this coefficient is used to correct the fluctuation amplitude of the reflection direction angle.

[0085] When correcting the temporal fluctuation amplitude of the reflection direction angle, the original data of the reflection direction angle of the candidate region at three consecutive detection stations is extracted (for example, 5.2 degrees, 5.8 degrees, and 6.1 degrees respectively). The original fluctuation amplitude is calculated by the standard deviation. The specific steps include: calculating the average value of the three data (for example, the result of (5.2 + 5.8 + 6.1) divided by 3 is 5.7 degrees), and successively finding the squared deviation of each data from the average value (for example, the square of (5.2 - 5.7) is 0.25, the square of (5.8 - 5.7) is 0.01, and the square of (6.1 - 5.7) is 0.16). After summing, divide by the degrees of freedom (the number of data minus 1) and then take the square root to obtain the standard deviation (for example, the square root of the sum of the three data 0.42 divided by 2 is approximately 0.458 degrees). The corrected fluctuation amplitude is the original standard deviation multiplied by the geometric distortion compensation coefficient (for example, the result of 0.458 degrees multiplied by 59.2 is approximately 27.1 degrees).

[0086] During the process of excluding the pseudo-defect region, a fluctuation tolerance threshold is preset in advance. This threshold is determined by statistically calculating the maximum value of the corrected fluctuation amplitude of the defect-free samples. The specific method is: collect a sufficient number of known defect-free samples (for example, 100), calculate the corrected fluctuation amplitude of each sample and extract the maximum value (for example, 18.2 degrees); multiply the maximum value by a safety factor (for example, an empirical value between 1.2 and 1.3) to obtain the final threshold (for example, 18.2 degrees multiplied by 1.2 equals 21.8 degrees). When the corrected fluctuation amplitude of the candidate region exceeds this threshold, it is determined as a pseudo-defect. For the candidate regions that do not exceed the threshold, the continuity of the change in the reflection direction angle needs to be further verified. For example, by checking whether the direction of the angle change at adjacent detection stations is consistent. If the three angles are 5.2 degrees, 5.8 degrees, and 6.1 degrees respectively, the adjacent differences are 0.6 degrees and 0.3 degrees respectively, both of which are positive changes, and it is judged as continuous; if there is a situation where the previous difference is positive and the subsequent difference is negative, it is regarded as a jump anomaly.

[0087] Extract the morphological gradient amplitude and the standard deviation of the gray histogram of the filtered region, and determine the type of surface defect according to the gradient-gray space coupling relationship. The specific implementation is as follows:

[0088] When generating the morphological gradient amplitude, the processed image data corresponding to the candidate regions obtained after filtering out pseudo-defects is processed, which specifically includes the following steps: using a preset gradient operator to perform enhancement operations on the edges of the candidate regions in the processed image to obtain the luminance change rates of each pixel point along the axial and circumferential directions, taking the maximum absolute value of the normalized change rates in the two directions as the gradient eigenvalue of the pixel point, performing binarization processing on the gradient eigenvalues of all pixel points, and taking the arithmetic mean of the gradient eigenvalues within the largest connected region of the binarized image as the morphological gradient amplitude of the region. For example, the calculation method of the axial gradient operator is the sum of the absolute values of the gray-scale differences between each pixel point in the candidate region along the axial extension direction of the welded pipe and its two adjacent pixels, and the calculation method of the circumferential gradient operator is the sum of the absolute values of the gray-scale differences between the pixel point along the circumferential tangent direction and its two adjacent pixels on the left and right; during normalization, the original gradient values in the axial and circumferential directions are respectively divided by the global maximum gray-scale value of the image as the change rate; for the segmentation threshold set for binarization processing, by statistically analyzing the gradient distribution histogram of the background pixels corresponding to the non-candidate regions in the processed image, the 95% quantile is selected as the boundary value.

[0089] When obtaining the standard deviation of the gray-scale histogram, the following steps are included: performing histogram statistics on the gray-scale values corresponding to the candidate regions in the processed image, generating a discretized frequency distribution table according to the preset gray-scale segmentation interval, calculating the probability density of the number of pixels in each segment accounting for the total number of pixels in the region, calculating the sum of the squared deviations of the intermediate values of all gray levels from their mathematical expectations weighted by the probability density, and then dividing by the number of gray-level intervals to obtain the variance and taking the square root to form the standard deviation. For example, the gray-scale segmentation interval is set to 5 levels, that is, the gray-scale range of 0 - 255 is divided into 51 equally spaced intervals; the mathematical expectation is calculated by the sum of the products of the intermediate values of each interval and the corresponding probability density, where the intermediate value is the arithmetic mean of the starting value and the ending value of the interval; when calculating the variance, the empty intervals with the proportion of the number of pixels lower than the set ratio need to be excluded, and this ratio is determined to be 2% by analyzing the gray-scale segment continuity of the normal texture in the defect-free samples.

[0090] The construction process of the gradient-gray scale coupling classification model includes: collecting a sample image data set of known surface defect types, where the number of samples for each surface defect type is not less than 200, covering different sizes and positions; performing candidate region segmentation processing on each sample after geometric distortion correction, and calculating its morphological gradient amplitude and gray scale histogram standard deviation respectively to form a two-dimensional feature vector; using the density-based clustering analysis method to divide the data distribution region boundaries corresponding to cracks, rust, and scratches in the gradient-gray scale space respectively, connecting the center points of the overlapping regions of the three defects in the feature space as the decision boundary, and recording the coordinate ranges of each boundary as the mapping interval boundary values. For example, the data corresponding to surface cracks is concentrated in the range where the morphological gradient amplitude is higher than 60 and the gray scale standard deviation is between 30 and 45, the morphological gradient amplitude corresponding to rust is distributed between 40 and 55 and the gray scale standard deviation is 45 to 60, and the scratch area covers the interval of morphological gradient amplitude 70 - 85 and gray scale standard deviation 15 - 25 at the same time; the decision boundary is generated by constructing an equidistant separation line at the nearest distance points of the two types of defect data clouds, and using the cubic spline interpolation method to connect each key point to form a closed boundary.

[0091] In the surface defect type determination stage, the morphological gradient amplitude and the gray scale histogram standard deviation are used as coordinate points. By traversing the mapping interval boundary values in the gradient-gray scale coupling classification model, the surface defect type label corresponding to the interval to which the coordinate point belongs is determined. When the coordinate point is simultaneously in the overlapping area of the two decision boundaries, the final type is determined according to the distance difference from the nearest high-density clustering center; when the coordinate point is outside all mapping intervals, the manual review mechanism is triggered and updated to the model training data set. For example, when the calculated morphological gradient amplitude is 58 and the gray scale standard deviation is 42, it coincides with the overlapping area of the lower boundary 52 of the crack area and the upper boundary 45 of the rust area. At this time, the Euclidean distances from the distribution center points of rust and crack to this coordinate point are compared. If the distance to the crack center point is closer, it is determined as a crack.

[0092] The periodic update mechanism for the decision boundary includes: after manually reviewing and confirming misjudged samples, adding the feature vectors of the new samples to the original training data set, re-performing the density clustering and boundary generation processes, and replacing the original model parameters with the adjusted decision boundary to achieve iterative upgrade. For example, after adding 80 misjudged samples, the upper limit of the gray scale standard deviation of the rust area is recalculated and increased to 62, and at the same time, the lower limit of the morphological gradient amplitude is adjusted to 38. The normalization coefficient of the morphological gradient amplitude is adjusted according to the dynamic range change of the global gray scale of the image. When the maximum gray scale value changes by more than 15% due to the change of the exposure parameter of the image acquisition system, the coefficient recalibration process is triggered. The segmentation interval of the gray scale histogram is adaptively adjusted according to the minimum pixel size of the candidate region. When the width of the candidate region is less than 10 pixels, a 3-level gray scale interval is used to ensure the effectiveness of frequency statistics.

[0093] In the process of filtering out pseudo-defects, the candidate region refers to the set of regions retained after filtering, which is consistent with the region after filtering in the previous text of the embodiment in terms of physical meaning. Specifically: The candidate region is defined based on the image data after geometric distortion correction of the region after filtering, ensuring that the calculation objects of the morphological gradient amplitude and the standard deviation of the gray histogram are the effective regions processed by the previous steps. In the process of generating the morphological gradient amplitude, the gray value preprocessing step of the candidate region is connected with the publicly disclosed geometric distortion correction method, including using bilinear interpolation to eliminate the image stretching deformation generated by the previous steps and restoring the pixel coordinate correspondence, so that the edge gradient feature and the gray distribution statistical result of the candidate region conform to the spatial geometric constraints of the original image. For example, there is a strict mapping relationship between the actual image data of the candidate region after geometric distortion correction and its physical position on the original welded pipe surface, and the pixel neighborhood operations during the calculation of the candidate region are determined according to this mapping relationship to determine the index range of adjacent pixels. In the calculation process of the standard deviation of the gray histogram, the segmented statistical interval of the gray value of the candidate region is associated with the distribution characteristics of the row and column coordinates in the pixel matrix after geometric correction, excluding the gray distortion points introduced by coordinate mapping errors.

[0094] Generate the final defect determination based on the superposition result of the deviation vector between the surface defect type and the basic reflection feature map. The specific implementation is as follows:

[0095] After determining the surface defect type through the gradient-gray coupling classification model, call the basic reflection feature map pre-associated with the surface defect type; the basic reflection feature map is generated through multiple calibration experiments on known defect samples under laboratory conditions, and it contains the calibration parameter vectors of the specular reflectivity and diffuse reflectivity of the surface defect type under more than three preset illumination direction and intensity combinations. Among them, the calibration parameter vector of the specular reflectivity is expressed as (S1, S2,..., Sn) as the arithmetic mean of the results of three experiments under each preset illumination condition, and the calibration parameter vector of the diffuse reflectivity is expressed as (D1, D2,..., Dn) as the harmonic mean of the results of five experiments. And each preset illumination condition corresponds to a different combination of incident angle and polarization direction; n represents the total number of preset illumination conditions, Sn is the arithmetic mean of the three measured specular reflectivities under the nth illumination condition, and Dn is the harmonic mean of the five measured diffuse reflectivities under the same condition. The two respectively represent the specular and diffuse light intensity reference values corresponding to a specific incident angle and polarization combination.

[0096] When extracting the actual reflectivity of the current candidate region under the same illumination conditions, the illumination condition settings identical to those in the basic reflection feature map are obtained through the calibrated reflectivity measurement device, where the incident angle deviation of the specular reflectivity measurement beam is less than 0.15°, and the polarization direction error is controlled within the range of ±3°; specifically, the absolute value of the difference between the actual specular reflectivity of the current candidate region and the calibration parameters of the corresponding surface defect type in the basic reflection feature map is calculated item by item, and the absolute value of the difference in diffuse reflectivity is weighted and summed according to the weight coefficients of each illumination condition, where the weight coefficients are determined according to the proportion of the projected area of the geometric shape of the current candidate region in the gradient-gray space, and finally the overall deviation amplitude is obtained;

[0097] Then, when determining the deviation vector direction and modulus according to the proportional relationship between the calculated deviation amplitude and the preset deviation threshold, the preset deviation threshold is set separately for the basic reflection feature map corresponding to each type of surface defect, and the threshold interval corresponding to each illumination condition is obtained by multiplying the standard deviation of the deviation amplitude of the historical samples of this type of defect by the correction coefficient α, and the value range of the correction coefficient α is between 1.2 and 2.5; when generating the deviation vector, if the deviation amplitude of the specular reflectivity accounts for more than 70% of the overall deviation amplitude, the deviation vector direction is defined as the main axis direction of the specular reflectivity component in the reflection feature space, and if the weighted deviation amplitude of the diffuse reflectivity exceeds 60% of the total amplitude, the main axis direction switches to the diffuse reflectivity component; the modulus of the deviation vector is calculated by multiplying the ratio of the actual deviation amplitude to the corresponding threshold by the reference modulus L, where the reference modulus L is adjusted to a value within the range of 50 to 100 units according to the dimension scaling ratio of the gradient-gray space;

[0098] The specific process of normalizing and superimposing the coordinate displacement vector of the current candidate region in the gradient-gray space and the deviation vector includes: linearly transforming the coordinate values of each dimension in the coordinate displacement vector in the gradient-gray space from the output result of the gradient-gray coupling classification model to the same spatial coordinate system as the deviation vector, where the linear transformation parameters are dynamically adjusted according to the sensitivity thresholds corresponding to different defect types; the modulus length of the new vector generated after normalization and superposition is calculated using the square root method of the sum of squares of each dimension, and if the included angle between the coordinate displacement vector and the deviation vector exceeds 90 degrees during the superposition process, the modulus length after superposition needs to be multiplied by the direction correction factor β, and the value of the direction correction factor β is negatively correlated with the cosine value of the included angle; when the modulus length of the superposition vector exceeds the tolerance radius defined in the reflection feature map for the corresponding surface defect type, it triggers the correction of the final defect determination result; the tolerance radius is pre-stored in the defect type data area corresponding to the reflection feature map, and its specific value is jointly determined according to the misjudgment rate statistics result of this type of defect and the maximum deviation degree of the typical sample distribution in the gradient-gray space. For surface defect types with multiple subcategories, each subcategory corresponds to an independent tolerance radius subinterval; the correction method includes remapping the defect type of this candidate region to the defect category closest to the direction of the modulus length of the superposition vector and generating a corrected type identifier.

[0099] Through the above steps, in actual operation, for example, the determination of surface crack defects in welded pipes: The calibration parameter vector of the crack type in the basic reflection feature map includes the specular reflectivity (such as 0.65±0.03) and diffuse reflectivity (such as 0.24±0.02) under six standard lighting conditions. If the actually detected specular reflectivity of the candidate region is 0.72 and the diffuse reflectivity is 0.26, then the deviation amplitudes under the second lighting condition are |0.72 - 0.65| = 0.07 and |0.26 - 0.24| = 0.02 respectively. After weight calculation, the total deviation amplitude is 0.07×0.8 + 0.02×0.2 = 0.06; when this deviation amplitude exceeds the preset deviation threshold of 0.05 for the crack type under the second lighting condition, a deviation vector pointing to the specular reflectivity component is generated; at this time, if the coordinate displacement vector of the candidate region in the gradient-gray space is (30, 45), and the modulus length after normalization and superposition exceeds the tolerance radius of 80 units for the crack type, it will trigger the correction of the defect type of this region to a surface scratch type similar to the crack morphology; the specific values are only used to illustrate the parameter interaction logic in the implementation process, and the parameter value ranges in actual applications are adjusted according to the equipment accuracy requirements.

[0100] The above formulas are all dimensionless and take their numerical calculations. The formulas are obtained by collecting a large amount of data for software simulation to get a formula closest to the real situation. The preset parameters and threshold selections in the formulas are set by those skilled in the art according to the actual situation.

[0101] It should be noted that the present invention can be deployed on the device itself to implement embedded applications, or can also run on a PC or other terminal with a user interface, so as to meet various hardware environments and usage requirements.

[0102] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that contains one or more collections of available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0103] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0104] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or modules can be in electrical, mechanical, or other forms.

[0105] The module described as a separation component may or may not be physically separated. The component shown as a module may or may not be a physical module. It may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0106] In addition, in each embodiment of the present application, each functional module can be integrated into a processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.

[0107] If the described function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0108] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0109] Finally: The above is only the preferred embodiment of the present invention and is not used to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A surface defect detection system for welded pipes, characterized in that, It includes the following modules: A light source control module, which is used to irradiate the surface of the welded pipe with multi-angle light sources and collect the reflected light images corresponding to each light source; A feature extraction module, which is used to extract the diffuse reflection intensity ratio and the specular reflection angle distribution matrix of each reflected light image, and generate a basic reflection feature map of the surface of the welded pipe; A region positioning module, which locates the candidate defect regions according to the circumferential distribution deviation degree of the diffuse reflection and specular reflection intensity ratios in the basic reflection feature map, and outputs an updated candidate defect region set by screening out the interference regions; A distortion correction module, which calculates the geometric distortion compensation coefficient based on the curvature radius of the welded pipe and the moving speed of the detection station, and filters out the pseudo-defect regions by combining the temporal fluctuation characteristics of the reflection direction angle with the work position in the updated candidate defect region set; A defect determination module, which is used to extract the morphological gradient amplitude and the standard deviation of the gray histogram of the filtered region, and determine the surface defect type according to the gradient-gray space coupling relationship; A result output module, which generates a final defect determination based on the superposition result of the deviation vector between the surface defect type and the basic reflection feature map.

2. The surface defect detection system for welded pipes according to claim 1, wherein Irradiating the surface of the welded pipe with multi-angle light sources and collecting the reflected light images corresponding to each light source, including: Constructing a circular light source array from multiple linearly distributed irradiation light sources, and arranging them evenly on the outer side of the circumferential detection surface of the welded pipe at a preset circumferential interval angle; According to the reflectivity range of the metal material on the surface layer of the welded pipe, setting the emission wavelength and projection angle of each light source, and generating a composite incident light field for the axial region of the pipe body of the welded pipe; Triggering the light sources in the circular light source array by time-sharing pulses according to a preset time sequence, and each pulse trigger signal corresponds to the instantaneous turn-on of a single light source; At the rising edge stage of each light source trigger pulse, synchronously controlling the industrial camera to collect the reflected light image under the current light source irradiation in the global shutter shooting mode; Adjusting the acquisition frame rate according to the lens focal length of the industrial camera, so that the resolution of the reflected light image meets the pixel pitch threshold corresponding to the minimum detectable defect size.

3. The surface defect detection system for welded pipes according to claim 2, characterized in that, Extracting the diffuse reflection intensity ratio and the specular reflection angle distribution matrix of each reflected light image, and generating a basic reflection feature map of the surface of the welded pipe, including: Analyzing the gray value distribution of the pixel regions of each reflected light image, separating the corresponding diffuse reflection intensity component and specular reflection intensity component, and calculating the diffuse reflection intensity ratio under different light source irradiations based on the peak interval distribution of the diffuse reflection intensity components in the reflected light images of each light source at the same axial position; Constructing a light source spatial angle index table according to the circumferential interval angle parameter and the projection angle distribution of the circular light source array, using the mutation position of the specular reflection intensity component of the same pixel point in the reflected light images of different light sources as the feature point, and calculating the specular reflection angle value corresponding to each feature point in combination with the geometric projection relationship of the light source spatial angle index table, and generating a specular reflection angle distribution matrix according to the pixel coordinate mapping; Fusing and superimposing the diffuse reflection intensity ratio and the specular reflection angle distribution matrix according to a preset weight ratio to form a basic reflection feature map containing three-dimensional reflection characteristic parameters.

4. The surface defect detection system for welded pipes according to claim 3, wherein, Locating the candidate defect regions according to the circumferential distribution deviation degree of the diffuse reflection and specular reflection intensity ratios in the basic reflection feature map, and outputting an updated candidate defect region set by screening out the interference regions, including: The surface of the welded pipe is equally divided into angular intervals corresponding to a preset number of circumferential segments along the circumferential direction. Calculate the deviation of the mean value of the diffuse reflection intensity ratio in each angular interval from the corresponding mean value of the defect-free region in the standard sample surface feature map. Select the angular intervals with deviations exceeding the dynamically set threshold as the circumferential position range of the candidate defect regions; Extract the circumferential gradient change rate corresponding to the specular reflection angle value in the specular reflection angle distribution matrix of the candidate defect region. Combine the ratio relationship between the diffuse reflection intensity component and the specular reflection intensity component in the surface three-dimensional reflection characteristic parameters. Set the tolerance threshold of the reflection angle gradient change rate and the fluctuation range of the proportion of the diffuse reflection intensity component, and exclude abnormal reflection data in the discontinuous gradient change region; According to the continuous distribution characteristics of the candidate defect region in the basic reflection feature map, use the region growing method to merge adjacent candidate defect regions, and eliminate discrete noise points according to the preset minimum defect area threshold and edge smoothness parameter to generate an updated candidate defect region set.

5. The surface defect detection system for welded pipes according to claim 4, characterized in that, Calculate the geometric distortion compensation coefficient based on the curvature radius of the welded pipe and the moving speed of the detection station. Combine the temporal fluctuation characteristics of the reflection direction angle with the axial displacement of the updated candidate defect region set to filter out pseudo-defect regions, including: According to the circumferential position and axial coordinates of each region in the updated candidate defect region set, obtain the curvature radius of the welded pipe at the corresponding position through the welded pipe surface geometric feature database; Based on the moving speed of the detection station and the time interval corresponding to the acquisition of the reflection direction angle, calculate the geometric distortion correction relationship between the axial displacement of the detection station and the circumferential angle increment of the welded pipe; Generate a geometric distortion compensation coefficient according to the proportional coefficient between the axial displacement and the circumferential angle increment in the geometric distortion correction relationship and the local change amount of the curvature radius of the welded pipe; Synchronously extract the temporal fluctuation amplitude of the reflection direction angle of each region in the updated candidate defect region set under the continuous change of the axial displacement of the detection station, and correct the cumulative deviation of the temporal fluctuation amplitude through the geometric distortion compensation coefficient after the curvature compensation of the welded pipe; Combine the corrected temporal fluctuation amplitude with the preset fluctuation tolerance threshold to exclude candidate regions whose temporal distribution does not conform to the continuous defect reflection characteristics, and output the final defect region set.

6. The surface defect detection system for welded pipes according to claim 5, characterized in that, Extract the morphological gradient amplitude and the standard deviation of the gray histogram of the filtered region, and determine the surface defect type according to the gradient-gray space coupling relationship, including: Based on the geometric distortion correction result of the filtered region, calculate the corresponding morphological gradient amplitude and obtain the corresponding standard deviation of the gray histogram, and input the morphological gradient amplitude and the standard deviation of the gray histogram into the pre-established gradient-gray coupling classification model; Based on the distribution difference of the morphological gradient amplitude and the standard deviation of the gray histogram in the gradient-gray space, determine the corresponding surface defect type.

7. The surface defect detection system for welded pipes according to claim 6, characterized in that, Among them, The gradient-gray coupling classification model contains the boundary values of the mapping intervals calibrated through experiments in the gradient-gray space for three surface defect types: surface cracks, rust, and scratches.

8. A welded pipe surface defect detection system according to claim 7, characterized in that Generate a final defect determination based on the superposition result of the deviation vector between the surface defect type and the basic reflection feature map, including: Obtain the basic reflection feature map corresponding to the surface defect type; Extract the actual reflectivity of the current candidate region under the same lighting conditions, and calculate the absolute value of the difference between the actual reflectivity and the calibration parameter of the corresponding surface defect type as the deviation amplitude; Generate the deviation vector direction and magnitude according to the proportional relationship between the deviation amplitude and the preset deviation threshold; Normalize and superimpose the coordinate displacement vector of the current candidate region in the gradient-gray space with the deviation vector. When the magnitude of the superimposed vector exceeds the tolerance radius defined for the corresponding surface defect type in the reflection feature map, the correction of the final defect determination result is triggered.

Citation Information

Cited By

  • Full-appearance detection method and system for internal wire welding flux of automobile brake hose joint

    CN120507362A

  • A method and system for full appearance inspection of the inner wire solder of automobile brake hose joints

    CN120507362B

  • Interventional operation force feedback interaction system based on virtual simulation

    CN120508213A

  • Magnetic material defect detection system based on image recognition

    CN120558971A

  • A magnetic material defect detection system based on image recognition

    CN120558971B