Welding rod end forming quality detection method integrating structured light and vision measurement

By using a dual-spectral polarization projection system and sub-pixel displacement correction technology, the problems of overexposure, artifacts, and image misalignment in electrode end-face imaging have been solved, achieving high-precision electrode end forming quality inspection, especially accurate calculation of eccentricity.

CN121724967APending Publication Date: 2026-03-24HUBEI CHUANWANG SPECIAL WELDING MATERIALS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing visual inspection technologies face problems such as overexposure due to strong reflection, artifacts due to mutual reflection, and image misalignment due to high-speed movement when imaging the end face of welding electrodes, making it difficult to achieve high-precision eccentricity detection.

Method used

A dual-spectral polarization projection system was used to acquire image data of the metal and the drug coating in a time-division manner. By using subpixel displacement correction and mutual reflection suppression mechanisms, combined with the spectral polarization discrimination index and geometric optics principles, the imaging channels of the metal and the drug coating were separated to eliminate overexposure, misalignment and artifact interference, and to accurately calculate the eccentricity.

Benefits of technology

It significantly improves the robustness and accuracy of electrode tip quality inspection, solves the problem of material segmentation under complex reflection characteristics, corrects systematic deviations in measurement, and provides accurate eccentricity detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121724967A_ABST
    Figure CN121724967A_ABST
Patent Text Reader

Abstract

The invention relates to the field of machine vision detection, in particular to a welding rod end forming quality detection method integrating structured light and vision measurement, which comprises the following steps: executing time-sharing acquisition by using a dual-spectrum polarization projection system to obtain modulation degree and phase data of metal and a coating; calculating a sub-pixel displacement vector to correct non-rigid dislocation caused by time-sharing acquisition; constructing a spectral polarization discrimination index by using a modulation degree ratio and a phase curvature to realize material pixel-level segmentation; a mutual reflection confidence attenuation factor is calculated, and artifacts, interfered by metal reflection, of the inner wall of the coating are eliminated; and finally fitting the geometric center of each region and calculating the eccentricity. According to the invention, the problems of imaging and measurement in a scene with coexistence of strong reflection and weak diffuse reflection are effectively solved, and the precision of quality detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of machine vision detection. More particularly, the present application relates to a welding rod end forming quality detection method fusing structured light and vision measurement. BACKGROUND

[0002] As the core consumable of high-end welding process, the end forming quality of special welding rod directly determines the arc ignition stability and molten pool consistency during automatic welding. Eccentricity, which is the deviation between the center of the metal welding core and the center of the outer coating, is the most critical geometric indicator for measuring the quality of the welding rod. In modern high-speed production lines, in order to achieve 100% full inspection of each welding rod, non-contact measurement systems based on machine vision or structured light are usually used.

[0003] However, the existing visual detection technology faces extremely challenging optical physics difficulties when dealing with the welding rod end face. First, the welding rod end face presents extremely different reflection characteristics: the center metal welding core surface is smooth, showing strong specular reflection characteristics, which easily causes the imaging sensor to be saturated, i.e., overexposure; while the outer coating surface is rough and dark, showing weak diffuse reflection characteristics, which often leads to insufficient imaging brightness, i.e., underexposure. Traditional single-exposure imaging cannot take both into account, resulting in incomplete edge extraction. Although existing high dynamic range imaging technology can alleviate this problem through multiple exposure synthesis, it significantly reduces the detection speed and cannot adapt to high-speed production lines with thousands of rods per minute.

[0004] More seriously, the existing structured light three-dimensional reconstruction technology has a serious model failure problem when dealing with such deep-hole high-reflectivity structures. Specifically, the strong reflected light of the metal welding core edge often falls on the adjacent coating inner wall, forming secondary or even multiple mutual reflections. This optical mutual reflection phenomenon forms false spots or bright bands on the coating inner wall, causing the structured light algorithm to mistakenly identify these spots as effective object surfaces, thus calculating incorrect depth data, i.e., artifacts. These artifacts are usually close to the metal edge and are easily misjudged as the coating boundary, directly leading to a smaller measurement value of the coating inner diameter, and further causing a large deviation in the calculation of eccentricity.

[0005] In addition, in order to obtain high-precision three-dimensional topography, the existing phase shift profilometry usually needs to project multiple fringe patterns. In the process of high-speed transmission, the welding rod inevitably produces micron-level mechanical jitter. This jitter causes sub-pixel level non-rigid misalignment between images collected at different times. Existing rigid registration algorithms cannot cope with this complex high-frequency jitter, causing the calculated phase map to have texture blur or edge ghosting, further deteriorating the measurement accuracy.

[0006] In summary, how to solve the problems of overexposure caused by strong reflection, optical artifacts caused by mutual reflection and image misregistration caused by high-speed motion in high dynamic range optical scene is a key technical problem to be solved in the field of electrode tip quality detection at present. SUMMARY

[0007] To solve the problems of overexposure caused by strong reflection, optical artifacts caused by mutual reflection and image misregistration caused by high-speed motion, the application proposes a welding electrode tip forming quality detection method combining structured light and vision measurement, which comprises the following steps: The dual-spectrum polarization projection system is used to collect the first channel image of the metal surface and the second channel image of the coating surface in time, and the first channel modulation data, the first channel phase data, the second channel modulation data and the second channel phase data are calculated; The sub-pixel displacement vector is calculated based on the gradient of the first channel modulation data and the second channel modulation data, and the second channel modulation data and the second channel phase data are corrected using the sub-pixel displacement vector; The spectral polarization discrimination index is constructed using the ratio of the first channel modulation data and the corrected second channel modulation data and the curvature of the first channel phase data and the second channel phase data, and the pixel points are classified as metal core area or coating area according to the spectral polarization discrimination index; The mutual reflection confidence attenuation factor of the coating area relative to the metal core area is calculated, and the coating area artifact data is removed using the mutual reflection confidence attenuation factor; The geometric centers of the metal core area and the coating area are fitted, the eccentricity index is calculated by calculating the distance between them, and the welding electrode tip forming quality detection is completed.

[0008] The application separates the imaging channels of the metal and the coating through the dual-spectrum polarization time-multiplexing strategy, solves the problem of insufficient dynamic range, and at the same time, through the sub-pixel displacement correction and mutual reflection suppression mechanism, eliminates the motion misregistration and optical artifacts at the algorithm level, significantly improves the robustness of the measurement.

[0009] Preferably, the calculation relationship of the sub-pixel displacement vector is:

[0010] In the formula, is the sub-pixel displacement vector, and are the transverse and longitudinal displacement variables to be optimized, respectively, is the order index of the pixel points in the image, is the gradient value of the first channel modulation data, is the gradient value of the second channel modulation data, is the gradient value of the second channel modulation data, Each pixel is shifted Interpolated gradient value, For phase constraint weights, The first channel phase data The value of each pixel. The second channel phase data The value of each pixel. This is a phase-wavelength conversion operator.

[0011] This invention combines modulation gradient (physical texture) and phase constraint (geometric shape) to construct a global optimization objective function. By minimizing this objective function, the minute displacements that occur during time-division acquisition can be accurately calculated, achieving sub-pixel-level soft registration of data from two channels and effectively resisting production line vibration interference.

[0012] Preferably, the formula for calculating the spectral polarization discrimination index is:

[0013] In the formula, For the first The spectral polarization discrimination index of each pixel It is the hyperbolic tangent function. For adjustment coefficients, The first channel modulation data The value of each pixel. The second channel modulation data after spatial correction The value of each pixel. The spectral crosstalk coefficient is... To prevent the loss of a tiny amount, As curvature weight, For the fusion phase at the 1st The second derivative at each pixel.

[0014] This invention does not rely solely on brightness information, but integrates spectral response ratio, polarization characteristics, and surface geometric curvature, i.e., the second derivative. This fusion of multi-dimensional physical features enables the algorithm to penetrate the interference of dust or oil on the surface and accurately identify the true physical boundary between the metal and the coating.

[0015] Preferably, the formula for calculating the mutual reflection confidence attenuation factor is:

[0016] In the formula, in the formula, The first in the drug coating area The cross-reflection confidence attenuation factor for each pixel. The first in the drug coating area The unit gradient vector of each pixel. Let be the incident vector of the projected ray. Represents the vector dot product. The attenuation sensitivity coefficient, The first in the drug coating area The Euclidean distance of each pixel from the nearest region of the metal core.

[0017] This invention, based on the principles of geometric optics, describes the possibility of each pixel being affected by mutual reflection interference. By introducing the angle between the surface normal vector and the incident light ray, as well as spatial distance constraints, it is possible to accurately locate artifact regions that should be shadows but are abnormally bright, and then perform weighted elimination on them, thereby restoring the true morphology of the inner wall of the drug coating.

[0018] Preferably, the dual-spectral polarization projection system includes a first wavelength light source and a second wavelength light source. The first wavelength light source is a blue LED with a center wavelength of 450 nm, and the second wavelength light source is a red LED with a center wavelength of 650 nm. A polarizer is provided in front of the polarization camera lens in the system, and a polarizer is provided in front of the blue LED. The transmission direction of the polarizer is orthogonal to that of the polarizer.

[0019] Preferably, the time-division acquisition process is as follows: when the first wavelength light source is turned on, the digital micromirror device is controlled to project a high-frequency sinusoidal stripe pattern; when the second wavelength light source is turned on, the digital micromirror device is controlled to project a low-frequency sinusoidal stripe pattern.

[0020] Preferably, the process of classifying pixels is as follows: Set the first threshold Second threshold ,in ; If the spectral polarization discrimination index of a certain pixel point This is determined to be the metal core region; If the spectral polarization discrimination index of a certain pixel point This is determined to be the area of ​​the medicated coating; If a certain pixel This region was identified as a transitional interference area and removed from subsequent calculations.

[0021] Preferably, the processing of the artifact data in the drug coating area is as follows: Calculate the cross-reflection confidence attenuation factor for each pixel within the drug coating area; When the interreflection confidence attenuation factor is lower than the preset validity threshold, the phase of the pixel is marked as invalid data and will not participate in subsequent contour fitting.

[0022] This invention utilizes a hard threshold elimination strategy to ensure that the point cloud data participating in the final circle fitting has extremely high confidence, thereby eliminating the influence of outliers on subsequent contour fitting from the source.

[0023] Preferably, the processing of the geometric center of the fitted metal core region and the drug coating region is as follows: The least squares method is used to perform circle fitting on the edge points of the metal core region to obtain the coordinates of the first circle center. A robust regression algorithm is used to perform circle fitting on the edge points of the drug-coated area after the removal process to obtain the coordinates of the second circle center.

[0024] The present invention has the following beneficial effects: Unlike existing technologies that rely solely on image grayscale or single structured light, this invention utilizes the differences in the response of different materials to wavelength, polarization state, and spatial curvature to construct a robust classification index, thus completely solving the problem of material segmentation under complex reflection characteristics.

[0025] Furthermore, by establishing a geometric optical path model, this invention can identify and eliminate false signals generated by strong metallic light on the inner wall of the drug coating from a fundamental perspective, correcting the systematic bias in measurement systems that has long plagued this field and significantly improving the accuracy of eccentricity detection.

[0026] Furthermore, this invention effectively overcomes the data misalignment problem caused by mechanical vibration in high-speed production lines through gradient-based subpixel displacement compensation, providing an accurate data foundation for subsequent accurate quality inspection. Attached Figure Description

[0027] Figure 1 This is a flowchart of the steps of a method for detecting the forming quality of welding electrode ends that integrates structured light and visual measurement, provided by an embodiment of the present invention. Figure 2 This refers to a two-channel image provided in an embodiment of the present invention; Figure 3 The detection result image of this solution provided in the embodiment of the present invention; Figure 4 The image shows the detection result of a conventional method provided in this embodiment of the invention. Detailed Implementation

[0028] Please see Figure 1 The diagram illustrates a flowchart of a method for detecting the forming quality of welding electrode ends that integrates structured light and visual measurement, as provided in Embodiment 1. The method includes the following steps: S1: Use a dual-spectral polarization projection system to acquire the first channel image of the metal surface and the second channel image of the drug coating surface in a time-division manner, and calculate the modulation data of the first channel, the phase data of the first channel, the modulation data of the second channel, and the phase data of the second channel.

[0029] It should be noted that the surface of the metal welding core exhibits strong specular reflection characteristics, while the flux coating exhibits weak diffuse reflection characteristics. This significant difference in reflectivity means that if a single exposure is used, the metal area will inevitably be overexposed due to light intensity exceeding the sensor's linear range, or the flux coating area will be underexposed and lost due to low reflectivity. In order to achieve high-quality imaging of the welding electrode end face with extreme reflectivity differences, it is necessary to physically separate the optical responses of the metal and the flux coating at the acquisition end.

[0030] Preferably, as an example, a dual-spectral polarization projection system is used to acquire a first-channel image of the metal surface and a second-channel image of the drug coating surface in a time-division manner, and the modulation data of the first channel, the phase data of the first channel, the modulation data of the second channel, and the phase data of the second channel are calculated, including: The dual-spectral polarization projection system employs a dual-color projection device comprising a first wavelength light source and a second wavelength light source. For example, the first wavelength light source is a blue LED with a center wavelength of 450 nm, and the second wavelength light source is a red LED with a center wavelength of 650 nm. Simultaneously, an analyzer is positioned in front of the polarization camera lens in the dual-spectral polarization projection system, and a polarizer is positioned in front of the blue LED, with the transmission directions of the polarizer and the analyzer being orthogonal.

[0031] First, during the odd-numbered subframe period, the first wavelength light source is turned on and high-frequency sinusoidal stripes are projected. The first channel image is acquired by utilizing the characteristics of the orthogonal polarizer to filter out specular reflections. This image records the diffuse reflection component of the metal surface and suppresses strong reflections. During even-numbered subframes, the second wavelength light source is turned on and low-frequency sinusoidal stripes are projected. Taking advantage of the strong penetrability of red light, the second channel image is acquired. This image records the diffuse reflection signal on the surface of the drug coating, thus improving the brightness of dark areas.

[0032] Subsequently, the first channel image and the second channel image are processed by an N-step phase shift algorithm to obtain the first channel modulation data, the first channel phase data, the second channel modulation data, and the second channel phase data.

[0033] Understandably, the modulation data of the first channel characterizes the metal texture response under polarized blue light, while the modulation data of the second channel characterizes the drug coating texture response under unpolarized red light. When facing a highly reflective metal core, the light intensity entering the camera is limited to the effective dynamic range due to the physical filtering effect of the orthogonal polarizer.

[0034] This intuitively verifies that the wavelength and polarization selection mechanism of physical optics accurately responds to the differentiated physical characteristics of strong metallic reflection and weak drug coating reflection, effectively eliminating the hidden dangers of overexposure and underexposure in imaging from the source.

[0035] Figure 2 The image consists of two channels. The left side shows the first channel image, which is generally dark, but the metal surface is non-reflective and the texture is clear. The right side shows the second channel image, where the yellow dashed lines mark the interreflection artifacts. These are bright areas formed by the strong light reflected from the metal core onto the inner wall of the coating, and are the core source of interference leading to misjudgment.

[0036] S2: Calculate the subpixel displacement vector based on the gradient of the first channel modulation data and the second channel modulation data, and use the subpixel displacement vector to correct the second channel modulation data and the second channel phase data.

[0037] It should be noted that during high-speed transmission, the welding electrode will experience micron-level random jitter relative to the camera. This jitter characteristic means that there is a non-rigid positional deviation between the modulation data of the first channel and the modulation data of the second channel acquired in time-division multiplexing. If not corrected, this can easily lead to edge ghosting in subsequent fusion calculations. In order to achieve accurate pixel alignment of data of different wavelengths in space, the influence of mechanical jitter must be eliminated before data fusion.

[0038] Preferably, as an example, the sub-pixel displacement vector is calculated based on the gradient of the first channel modulation data and the second channel modulation data, and the sub-pixel displacement vector is used to correct the second channel modulation data and the second channel phase data, including: First, the subpixel displacement vector is calculated using a gradient difference minimization model.

[0039] Subsequently, using a bilinear interpolation algorithm, the second channel data is translated to the first channel coordinate system based on the sub-pixel displacement vector to complete the correction.

[0040] The formula for calculating the sub-pixel displacement vector is as follows:

[0041] In the formula, The subpixel displacement vector, and These are the lateral and longitudinal displacement variables to be optimized, respectively. The index of the pixels in the image. The first channel modulation data Gradient values ​​of pixels, The second channel modulation data Each pixel is shifted Interpolated gradient value, For phase constraint weights, The first channel phase data The value of each pixel. The second channel phase data The value of each pixel. This is a phase-wavelength conversion operator.

[0042] Understandably, in the objective function The term characterizes the alignment of the physical texture edges between the two channels. Although the light colors are different, the physical textures on the surface of the welding rod, such as the processing marks, should be fixed in space. Therefore, when the welding rod undergoes a small displacement, it will cause the gradient distribution of the two channels to shift in coordinates, thereby significantly increasing the objective function value.

[0043] In the objective function The term characterizes the consistency of surface geometry and topology; phase data essentially reflects the three-dimensional height information of the object's surface. Although the absolute phase values ​​differ at different wavelengths, they are consistent through the operator. After scaling, the height response of the same physical point should be the same. If displacement occurs, the same pixel coordinates will correspond to different spatial height points, resulting in a significant increase in phase residual.

[0044] The above method minimizes the objective function through iterative search, forcibly calculating the optimal displacement that simultaneously satisfies the requirements of clearest texture and most overlapping shape.

[0045] This directly verifies that the above processing can accurately eliminate image misalignment caused by vibrations on high-speed production lines.

[0046] S3: Construct a spectral polarization discrimination index using the ratio of the modulation data of the first channel to the calibrated modulation data of the second channel and the curvature of the phase data of the first channel and the phase data of the second channel. Classify the pixels into metal core regions or drug coating regions based on the spectral polarization discrimination index.

[0047] It should be noted that burrs, oil stains, or mixed reflective areas often exist at the interface between the metal core and the coating. This mixed characteristic means that relying solely on brightness thresholds or phase heights cannot accurately distinguish between the metal core and the coating. To achieve precise segmentation of the metal core and the coating, robust classification criteria need to be established at the pixel level.

[0048] Preferably, as an example, a spectral polarization discrimination index is constructed using the ratio of the modulation data of the first channel to the calibrated modulation data of the second channel and the curvature of the phase data of the first channel and the phase data of the second channel. Based on the spectral polarization discrimination index, pixels are classified into metal core regions or drug coating regions, including: First, a normalized difference index construction strategy is adopted to calculate the spectral polarization discrimination index.

[0049] Next, based on the preset first threshold Second threshold ( ), classify the pixels: This region is identified as the metal core region. The intermediate value is determined to be the area of ​​the drug coating; the intermediate value is determined to be a transitional interference area and is removed.

[0050] The formula for calculating the spectral polarization discrimination index is as follows:

[0051] In the formula, For the first The spectral polarization discrimination index of each pixel It is the hyperbolic tangent function. For adjustment coefficients, The first channel modulation data The value of each pixel. The second channel modulation data after spatial correction The value of each pixel. The spectral crosstalk coefficient is... To prevent the loss of a tiny amount, As curvature weight, For the fusion phase at the 1st The second derivative at each pixel.

[0052] It is understandable that in the relational expression This reflects the spectral-polarization response ratio, where, The larger the value, the stronger the reflection of polarized blue light at that pixel location. The larger the value, the stronger the diffuse reflection of red light at that pixel location. This reflects the surface geometric smoothness. When a pixel is located in the metal core region, its... The larger, and The smaller the value, the closer the spectral polarization discrimination index is to 1; conversely, if the pixel is located in the drug coating region, the index is closer to -1.

[0053] This intuitively verifies that the algorithm accurately describes the physical reflection characteristics of composite materials through the joint constraints of spectrum, polarization, and geometric curvature, thus achieving accurate differentiation between the metal core and the outer coating.

[0054] S4: Calculate the cross-reflection confidence attenuation factor of the drug coating region relative to the metal core region, and use the cross-reflection confidence attenuation factor to remove artifact data in the drug coating region.

[0055] It should be noted that the strong reflected light from the edge of the metal core will be projected onto the inner wall of the drug coating, forming bright spots, i.e., artifacts. This reflection characteristic means that the brightness of some drug coating pixels does not come from direct illumination from the projector, but from secondary reflection from the metal. If not removed, it can easily lead to an underestimation of the drug coating's inner diameter. In order to achieve the true morphology of the drug coating's inner wall, optical artifacts need to be removed from the point cloud.

[0056] Preferably, as an example, the cross-reflection confidence attenuation factor of the drug coating region relative to the metal core region is calculated, and the cross-reflection confidence attenuation factor is used to remove artifact data in the drug coating region, including: The cross-reflection confidence attenuation factor is calculated using the geometric attenuation formula. When the cross-reflection confidence attenuation factor is lower than the validity threshold, the phase of that pixel is marked as invalid data and will not be included in subsequent contour fitting.

[0057] The formula for calculating the mutual reflection confidence attenuation factor is as follows:

[0058] In the formula, The first in the drug coating area The cross-reflection confidence attenuation factor for each pixel. The first in the drug coating area Unit surface normal vector of each pixel Let be the incident vector of the projected ray. Represents the vector dot product. The attenuation sensitivity coefficient, The first in the drug coating area The Euclidean distance of each pixel from the nearest region of the metal core.

[0059] Yes, that's understandable, variables. The value describes the illumination angle. The larger the value, or even when it is negative, the brighter the area. According to the direct illumination model, theoretically, the area of ​​the drug skin should not receive the projected light and should be in the shadow or dark area. Therefore, if a high-intensity modulation signal is still detected here, it means that the brightness here does not come from the direct illumination of the projector, but from the secondary reflection of the mirror surface of the adjacent metal core. Therefore, the probability of this area being an artifact is relatively high. The smaller the value, the shorter the light propagation path, the less energy is lost in secondary reflections, and the higher the artifact intensity.

[0060] This intuitively verifies that the algorithm, through geometric position and normal constraints, accurately responds to the light path propagation mechanism of multiple reflections, effectively identifying and eliminating false light spots that should be shadows but are abnormally bright.

[0061] It should be added that the first [item] in the drug coating area The method for obtaining the unit surface normal vector of a pixel includes: using the phase data of the second channel as input, calculating the unit surface normal vector of the pixel. The phase gradient of each pixel in the horizontal and vertical directions of the image is used to construct the tangent plane normal of the pixel in three-dimensional space based on the gradient data, and then normalize it to obtain the unit surface normal vector.

[0062] S5: Fit the geometric center of the metal core area and the coating area, calculate the distance between them to obtain the eccentricity index, and complete the electrode end forming quality inspection.

[0063] It should be noted that after the above processing steps, the data has been freed from overexposure, misalignment, and artifact interference, and possesses high confidence characteristics, making it suitable for molding quality inspection.

[0064] Preferably, as an example, the geometric centers of the metal core region and the coating region are fitted, and the eccentricity index is calculated to determine the distance between them. This completes the electrode tip forming quality inspection, including: First, the least squares method is used to fit the edge points of the metal core region to a circle to obtain the coordinates of the first circle center. Next, a robust regression algorithm, such as RANSAC, is used to perform circle fitting on the edge points of the drug-coated area after the removal process to obtain the coordinates of the second circle center.

[0065] Then, the Euclidean distance between the coordinates of the second center and the coordinates of the first center is calculated using the Euclidean distance formula as an index of eccentricity.

[0066] Finally, a quality threshold is set. For example, the quality threshold is 0.1 mm. If the eccentricity index is less than the quality threshold, the welding rod is judged to be a qualified product; otherwise, it is judged to be a defective product.

[0067] Understandably, the least squares method utilizes the high signal-to-noise ratio of metal core data to ensure fitting accuracy; while the robust regression algorithm utilizes its anti-outlier characteristics to further overcome the tiny noise that may remain at the edge of the drug coating.

[0068] Logical deduction shows that when the welding electrode has an eccentric defect, it will cause a significant difference in the coordinates of the two fitted circles, thereby increasing the calculated eccentricity index value.

[0069] This intuitively verifies that the algorithm, through a differentiated fitting strategy for different regions, accurately grasps the data distribution characteristics of different materials, thus achieving precise control over the forming quality of welding electrodes.

[0070] Figure 3The image shows the detection results of this method. The solid cyan circle represents the outline of the metal core region fitted by this method. It closely follows the edge of the real physical texture and is completely unaffected by external halos. The solid magenta circle represents the outline of the drug coating region fitted by this method. The image shows that this invention can accurately fit the outlines of the metal core region and the drug coating region, thus providing a basis for accurate circular positioning.

[0071] Figure 4 The image shows the detection results of the traditional method. The orange dashed circle in the image represents the outline of the metal core region fitted by the traditional algorithm. It can be seen that it is significantly larger than the actual metal core and captures the outer edge of the halo.

[0072] This concludes the embodiment.

[0073] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting the forming quality of welding electrode ends by integrating structured light and visual measurement, characterized in that, include: The first channel image of the metal surface and the second channel image of the drug coating surface were acquired in time division using a dual-spectrum polarization projection system. The modulation data of the first channel, the phase data of the first channel, the modulation data of the second channel, and the phase data of the second channel were calculated. The sub-pixel displacement vector is calculated based on the gradient of the first channel modulation data and the second channel modulation data, and the sub-pixel displacement vector is used to correct the second channel modulation data and the second channel phase data. A spectral polarization discrimination index is constructed using the ratio of the modulation data of the first channel to the calibrated modulation data of the second channel and the curvature of the phase data of the first channel and the phase data of the second channel. Based on the spectral polarization discrimination index, the pixels are classified into metal core regions or drug coating regions. Calculate the cross-reflection confidence attenuation factor between the drug coating region and the metal core region, and use the cross-reflection confidence attenuation factor to remove artifact data in the drug coating region; By fitting the geometric centers of the metal core region and the coating region, and calculating the distance between them to obtain the eccentricity index, the forming quality of the electrode end is inspected.

2. The method for detecting the forming quality of welding electrode ends by integrating structured light and visual measurement according to claim 1, characterized in that, The formula for calculating the sub-pixel displacement vector is: In the formula, The subpixel displacement vector, and These are the lateral and longitudinal displacement variables to be optimized, respectively. The index of the pixels in the image. The first channel modulation data Gradient values ​​of pixels, The second channel modulation data Each pixel is shifted Interpolated gradient value, For phase constraint weights, The first channel phase data The value of each pixel. The second channel phase data The value of each pixel. This is a phase-wavelength conversion operator.

3. The method for detecting the forming quality of welding electrode ends by integrating structured light and visual measurement according to claim 1, characterized in that, The formula for calculating the spectral polarization discrimination index is as follows: In the formula, For the first The spectral polarization discrimination index of each pixel It is the hyperbolic tangent function. For adjustment coefficients, The first channel modulation data The value of each pixel. The second channel modulation data after spatial correction The value of each pixel. The spectral crosstalk coefficient is... To prevent the loss of a tiny amount, As curvature weight, For the fusion phase in the 1st The second derivative at each pixel.

4. The method for detecting the forming quality of welding electrode ends by integrating structured light and visual measurement according to claim 1, characterized in that, The formula for calculating the mutual reflection confidence attenuation factor is as follows: In the formula, in the formula, The first in the drug coating area The cross-reflection confidence attenuation factor for each pixel. The first in the drug coating area Unit surface normal vector of each pixel Let be the incident vector of the projected ray. Represents the vector dot product. The attenuation sensitivity coefficient, The first in the drug coating area The Euclidean distance of each pixel from the nearest region of the metal core.

5. The method for detecting the forming quality of welding electrode ends by integrating structured light and visual measurement according to claim 1, characterized in that, The dual-spectral polarization projection system includes a first wavelength light source and a second wavelength light source. The first wavelength light source is a blue LED with a center wavelength of 450 nm, and the second wavelength light source is a red LED with a center wavelength of 650 nm. A polarizer is set in front of the polarization camera lens in the system, and a polarizer is set in front of the blue LED. The transmission direction of the polarizer is orthogonal to that of the polarizer.

6. The method for detecting the forming quality of welding electrode ends by integrating structured light and visual measurement according to claim 1, characterized in that, The time-division acquisition process is as follows: when the first wavelength light source is turned on, the digital micromirror device is controlled to project a high-frequency sinusoidal stripe pattern; when the second wavelength light source is turned on, the digital micromirror device is controlled to project a low-frequency sinusoidal stripe pattern.

7. The method for detecting the forming quality of welding electrode ends by integrating structured light and visual measurement according to claim 1, characterized in that, The process of classifying pixels is as follows: Set the first threshold Second threshold ,in ; If the spectral polarization discrimination index of a certain pixel point This is determined to be the metal core region; If the spectral polarization discrimination index of a certain pixel point This is determined to be the area of ​​the medicated coating; If a certain pixel This region was identified as a transitional interference area and removed from subsequent calculations.

8. The method for detecting the forming quality of welding electrode ends by integrating structured light and visual measurement according to claim 1, characterized in that, The processing of artifact data in the drug coating region is as follows: Calculate the cross-reflection confidence attenuation factor for each pixel within the drug coating area; When the interreflection confidence attenuation factor is lower than the preset validity threshold, the phase of the pixel is marked as invalid data and will not participate in subsequent contour fitting.

9. The method for detecting the forming quality of welding electrode ends by integrating structured light and visual measurement according to claim 1, characterized in that, The processing of the geometric centers of the fitted metal core region and the drug coating region is as follows: The least squares method is used to perform circle fitting on the edge points of the metal core region to obtain the coordinates of the first circle center. A robust regression algorithm is used to perform circle fitting on the edge points of the drug-coated area after the removal process to obtain the coordinates of the second circle center.

10. The method for detecting the forming quality of welding electrode ends by integrating structured light and visual measurement according to claim 2, characterized in that, The phase-wavelength conversion operator is used to unify the scale of the second channel phase data to the phase domain of the first channel phase data according to the wavelength ratio between the first wavelength and the second wavelength.