A machine vision-based welding automatic positioning method and system

By adaptively adjusting the atmospheric light composition through an improved dark channel prior dehazing algorithm, and combining environmental confidence and structural stability, the problem of inaccurate weld edges during welding was solved, enabling precise planning and stable execution of the welding path, and improving the reliability and robustness of automatic welding positioning.

CN122199501APending Publication Date: 2026-06-12HENAN HENGLI LONGCHENG HEAVY IND CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN HENGLI LONGCHENG HEAVY IND CO LTD
Filing Date
2026-03-19
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing dark channel prior defogging algorithms cannot accurately handle local high-brightness reflections, differences in smoke concentration, and changes in arc light during the welding process, resulting in inaccurate weld edge information and affecting the reliability and stability of automatic welding positioning.

Method used

An improved dark channel prior dehazing algorithm is adopted. By adaptively adjusting the atmospheric light composition, combined with pixel grayscale value, environmental confidence and spatial distance, adaptive dehazing is performed. Furthermore, combined with environmental confidence and structural stability analysis, weld edge detection and path planning are performed.

🎯Benefits of technology

Improve the continuity and edge sharpness of weld structures, ensure the accuracy and stability of welding paths, enhance the reliability of automatic welding positioning, and improve the system's robustness in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199501A_ABST
    Figure CN122199501A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image data processing, in particular to a welding automatic positioning method and system based on machine vision, comprising: acquiring an original image of a to-be-welded area; using an improved dark channel prior de-fogging algorithm to perform de-noising processing on the original image to obtain a de-noised original image, and performing welding path planning based on the de-noised original image. The present application solves the problem of insufficient reliability and stability of welding automatic positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology. More specifically, this invention relates to a machine vision-based automatic welding positioning method and system. Background Technology

[0002] In modern industrial manufacturing, welding is an indispensable and crucial process in industries such as automotive, rail transportation, aerospace, shipbuilding, machinery, and high-precision instruments. The quality of welding directly affects the structural integrity, durability, safety, and lifespan of products. In traditional welding processes, welding positioning relies primarily on manual experience and visual judgment, which is not only inefficient and limited in accuracy, but also prone to weld misalignment, uneven welding, or localized welding defects in mass production, high-precision welding, and complex workpiece structures, thus affecting the overall quality and reliability of the product. With the continuous improvement of industrial automation and the promotion of intelligent manufacturing concepts, machine vision-based automatic welding positioning technology is gradually becoming an important development direction in welding production.

[0003] In actual welding production environments, the quality of welding images is often affected by a variety of factors, including smoke, arc light, and spatter generated during the welding process, as well as high reflectivity and uneven local illumination on the metal surface of the welding area. These factors can lead to reduced image contrast, blurred edges, loss of detail, or local overexposure, posing a significant challenge to accurate weld seam identification and path planning. To address this issue, the dark channel prior dehazing algorithm has been applied to the field of welding image processing. By estimating the atmospheric light composition and transmittance information in the image, it effectively restores the image's sharpness and brightness contrast, thereby making the texture features of the welding area more prominent and the edges clearer.

[0004] However, existing dark channel prior dehazing algorithms generally employ fixed atmospheric light components, assuming that atmospheric light parameters remain constant throughout the image. This has significant limitations in welding scenarios. Welding areas typically exhibit localized high-brightness reflections, variations in localized smoke concentration, and intense arc light variations near the weld. Fixed atmospheric light components cannot accurately reflect these complex lighting conditions, leading to insufficient dehazing in localized areas and the continued presence of blurriness or shadows. Furthermore, for highly reflective areas, fixed atmospheric light parameters may cause over-enhancement, resulting in localized brightness distortion or loss of detail. In addition, welds are often long, continuous, but complex in shape. Fixed atmospheric light components lack adaptability when processing local pixel grayscale and texture information, resulting in inaccurate weld edge information. This affects the accuracy of weld centerline extraction and path planning, ultimately leading to insufficient reliability and stability in automatic welding positioning. Summary of the Invention

[0005] To address the issues of insufficient reliability and stability in automatic welding positioning mentioned in the background art, the present invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides a machine vision-based automatic welding positioning method, comprising: acquiring an original image of a region to be welded; denoising the original image using an improved dark channel prior dehazing algorithm to obtain a denoised original image; and planning a welding path based on the denoised original image; wherein the improved dark channel prior dehazing algorithm includes an atmospheric light component, the atmospheric light component being positively correlated with the grayscale value and environmental confidence of a target pixel in the original image, and negatively correlated with the Euclidean distance from the target pixel to the center of the original image; the environmental confidence characterizes the credibility of the target pixel, and the target pixel is any pixel in the original image.

[0007] The aforementioned technical solution achieves high-quality denoising and enhancement of the welding area image by introducing an improved dark channel prior dehazing algorithm during the automatic welding positioning process, making weld details and edge features in the image more clearly visible. By positively correlating atmospheric light components with pixel grayscale values ​​and their environmental reliability, and inversely correlating them with the spatial distance from the pixel to the image center, the dehazing process can adaptively consider pixel brightness information, local environmental consistency, and spatial position. This effectively suppresses interference caused by local high reflectivity, smoke, and uneven lighting, improving the continuity of the weld structure and edge sharpness. Based on this, welding path planning not only accurately extracts the weld centerline and generates a smooth and continuous welding trajectory, but also ensures the stability and accuracy of the welding equipment's movement along the path. This significantly improves the reliability of automatic welding positioning, weld alignment accuracy, and overall welding quality, while also enhancing the system's robustness and visual recognition capabilities in complex industrial environments.

[0008] Furthermore, the atmospheric light composition for: , The initial atmospheric light composition, pixels in the original image grayscale value, This represents the maximum grayscale value of a pixel within the original image. pixels in the original image Environmental confidence, In pixels Within the set neighborhood of the center, the first Environmental confidence of each pixel To set the total number of pixels within the neighborhood, To preset hyperparameters, For pixels Euclidean distance to the center of the original image This is the function for finding the maximum value.

[0009] The aforementioned technical solution achieves refined illumination compensation for each pixel in the welding image by adaptively weighting the atmospheric light component. The atmospheric light component calculation considers not only the pixel's grayscale value but also its environmental reliability information within its local neighborhood. Furthermore, it appropriately attenuates the atmospheric light based on the pixel's spatial position relative to the image center. This ensures that pixels closer to the image center and consistent with their surroundings contribute more to the atmospheric light, while pixels deviating from the center or exhibiting local anomalies automatically have their contributions reduced. This adaptive weighting method effectively enhances the representation of realistic structural and detailed features in the welding area, suppresses interference caused by high reflectivity, uneven local illumination, or noise, and results in a dehazed image with uniform brightness, clear edges, and continuous texture. This provides a more stable and reliable visual foundation for subsequent weld seam recognition, centerline extraction, and path planning.

[0010] Furthermore, pixels within the original image Environmental confidence for: , pixels in the original image grayscale value, For the natural constant An exponential function with base 0. In pixels The average grayscale value of all pixels within a neighborhood of the center is set. In pixels The variance of grayscale values ​​of all pixels within a defined neighborhood of the center. pixels in the original image Structural stability, It is a non-zero factor.

[0011] The above technical solution introduces environmental confidence to quantitatively evaluate the reliability of pixels, making image processing more intelligent and adaptive. Environmental confidence not only depends on the gray value of the pixel itself, but also combines the mean and variance of its gray value distribution in the neighborhood. It exponentially adjusts and strengthens pixels whose gray values ​​are consistent with the surrounding environment, while suppressing abnormal or deviating pixels. Combined with the structural stability of pixels, it gives higher weight to areas with smooth gray value changes and consistent local structure, while effectively weakening areas with noise interference or texture discontinuities.

[0012] Furthermore, pixels within the original image structural stability for: , In pixels Within the set neighborhood of the center, the first Gradient magnitude of each pixel pixels in the original image gradient magnitude, This sets the total number of pixels within the neighborhood.

[0013] The aforementioned technical solution quantifies and evaluates the gradient changes of pixels within their local neighborhoods, analyzing the continuity and consistency of the image structure. This results in regions with smooth grayscale changes and stable local structures receiving higher structural reliability evaluations, while regions with drastic gradient changes or abrupt changes receive lower evaluations. It effectively distinguishes real weld areas from noise, texture interference, or local anomalies, making weld edges and details more prominent and continuous in the image. This provides a robust foundation for subsequent environmental credibility calculations, weld recognition, and centerline extraction, improving the accuracy of welding path planning and the overall reliability of the automatic welding positioning system.

[0014] Furthermore, a CCD or CMOS camera is used to acquire the original image of the area to be soldered.

[0015] Furthermore, the original image of the area to be welded is converted to grayscale.

[0016] Furthermore, the defined neighborhood range is 3. 3.

[0017] Furthermore, the welding path planning specifically involves: performing edge detection on the original image after denoising to extract weld candidate regions, and performing connected component analysis on the weld candidate regions to obtain weld contours; performing curve fitting on the weld contours to obtain weld centerlines; generating welding paths based on the weld centerlines, and discretizing the welding paths into multiple path points as welding execution trajectories.

[0018] The aforementioned technical solution achieves accurate extraction and contour recognition of candidate weld regions by performing edge detection and connected component analysis on the denoised welding area image, ensuring that the weld edges are clear, continuous, and complete in the image. Based on this, curve fitting is performed on the weld contour to obtain the weld centerline, thereby generating a welding path highly consistent with the weld shape. This path is then discretized into multiple operable execution points for the welding equipment to move precisely along the trajectory. This processing not only ensures the smoothness and continuity of the welding trajectory and improves the stability and accuracy of the welding torch movement along the weld, but also effectively addresses the interference of local noise, surface texture, or minor deviations on weld recognition, thereby improving the accuracy of automatic welding positioning, system reliability, and the consistency of welding quality.

[0019] Furthermore, the edge detection is Canny edge detection.

[0020] In a second aspect, the present invention provides a machine vision-based automatic welding positioning system, including a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the machine vision-based automatic welding positioning method described above is implemented.

[0021] The beneficial effects of this invention are as follows: This invention achieves high precision and reliability in the automated welding positioning process by organically combining machine vision acquisition, image dehazing enhancement, pixel environment confidence assessment, structural stability analysis, and weld path planning. Utilizing an improved dark channel prior dehazing algorithm, the atmospheric light composition is adaptively adjusted, significantly improving image brightness balance, edge clarity, and texture continuity. Simultaneously, it effectively suppresses interference from localized high reflectivity, smoke, and uneven illumination, highlighting weld details and structural features. Through the calculation of environmental confidence and structural stability, the ability to identify real weld areas is further enhanced, and the impact of noise and abnormal textures on recognition is reduced. Based on this, edge detection, connected component analysis, and curve fitting are performed to accurately obtain the weld contour and centerline, generating a discretized welding execution trajectory. This allows the welding equipment to move smoothly along the path, ensuring weld alignment accuracy and welding process stability. This not only improves the accuracy and continuity of welding path planning and execution but also enhances the system's robustness and reliability in complex industrial environments, providing a stable technical guarantee for high-quality, high-efficiency welding automation. Attached Figure Description

[0022] Figure 1 This is a flowchart schematically illustrating an automatic welding positioning method based on machine vision according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the comparison of the processing effects of a machine vision-based automatic welding positioning method under various working conditions in a complex industrial environment according to an embodiment of the present invention. Figure 3 This is a schematic diagram illustrating the structure of a machine vision-based automatic welding positioning system according to an embodiment of the present invention. Detailed Implementation

[0023] An embodiment of an automatic welding positioning method based on machine vision.

[0024] like Figure 1 The flowchart shown is a machine vision-based automatic welding positioning method according to an embodiment of the present invention, which includes the following steps: S1: Obtain the original image of the area to be welded.

[0025] In a preferred embodiment, an industrial-grade vision acquisition device is used to acquire the original image of the area to be welded. Specifically, a high-resolution CCD or CMOS camera can be installed above or to the side of the welding station. The camera is stably mounted using a fixed bracket, and the camera's shooting angle and shooting distance are calibrated according to the size of the workpiece, the weld position, and the welding trajectory to ensure that the camera's field of view completely covers the area to be welded. The camera can be synchronously triggered with the control system of the welding equipment when acquiring images, thereby acquiring image information of the area to be welded in real time before welding begins or during welding, so that the acquired original image can accurately reflect the true state of the current welding area.

[0026] Furthermore, after acquiring the original image, preprocessing operations are performed on the original image, including grayscale conversion. Specifically, the acquired color image is converted from the RGB color space to a grayscale image. The red, green, and blue channels are weighted and summed according to set weights to obtain the grayscale value corresponding to each pixel, thereby generating a grayscale image. Grayscale conversion effectively reduces the dimensionality of image data while preserving image brightness information and structural features, reducing the computational load required in subsequent image processing and thus improving the overall algorithm's efficiency. In addition, since weld recognition and welding path extraction mainly rely on brightness changes and edge information in the image, converting the image to grayscale highlights the grayscale difference between the weld area and the base material, making the weld boundary more obvious and further improving the accuracy of subsequent edge detection and feature extraction.

[0027] Furthermore, after grayscale processing, preliminary image enhancement processing can be performed on the grayscale image. For example, the grayscale distribution can be adjusted by histogram equalization or adaptive contrast enhancement methods, so that the areas where the grayscale distribution is relatively concentrated can be effectively stretched, thereby enhancing the contrast between the weld area and the background area in the image.

[0028] S2: The original image is denoised using an improved dark channel prior dehazing algorithm to obtain the denoised original image.

[0029] like Figure 2 The figure shows a comparison of the processing effects of a machine vision-based automatic welding positioning method under various working conditions in a complex industrial environment, according to an embodiment of the present invention.

[0030] In a preferred embodiment, the improved dark channel prior dehazing algorithm includes an atmospheric light component, the atmospheric light component... for: , The initial atmospheric light composition, pixels in the original image grayscale value, This represents the maximum grayscale value of a pixel within the original image. pixels in the original image Environmental confidence, In pixels Within the set neighborhood of the center, the first Environmental confidence of each pixel To set the total number of pixels within the neighborhood, To preset hyperparameters, For pixels Euclidean distance to the center of the original image To obtain the maximum value function, the set neighborhood range is 3. 3. Of course, you can also set it according to the actual situation.

[0031] In the dehazing process, atmospheric light components are weighted by combining pixel grayscale information, environmental consistency, and spatial position relative to the image center. This ensures that the atmospheric light estimation for each pixel considers both brightness characteristics and the environmental relationship between the local area and the overall image. Specifically, the pixel's grayscale value provides basic brightness information, neighborhood environmental consistency reflects the reliability of the local area, and the distance of the pixel from the image center is used to adjust the spatial position attenuation. This results in pixels far from the center or with local anomalies contributing less to atmospheric light, while pixels consistent with their neighborhood and the overall environment receive higher weights. Through this comprehensive weighting method, while preserving image brightness and detail, the interference of noise and local anomalies on atmospheric light estimation can be effectively suppressed, thereby improving the accuracy and naturalness of the dehazing effect. The final restored image exhibits better performance in terms of brightness balance, clear details, and natural colors.

[0032] Pixels in the original image Environmental confidence for: , pixels in the original image grayscale value, For the natural constant An exponential function with base 0. In pixels The average grayscale value of all pixels within a neighborhood of the center is set. In pixels The variance of grayscale values ​​of all pixels within a defined neighborhood of the center. pixels in the original image Structural stability, It is a non-zero factor.

[0033] The environmental consistency of pixels is evaluated by comprehensively utilizing pixel grayscale information, neighborhood grayscale distribution characteristics, and structural stability. Specifically, the pixel grayscale value characterizes its brightness feature, and is adjusted based on the difference between its grayscale value and the mean grayscale value of its neighborhood. Positions whose grayscale features are closer to the surrounding area receive higher evaluations, while positions significantly deviating from the neighborhood grayscale level are relatively weakened. Neighborhood grayscale variance reflects the degree of grayscale fluctuation in a local area, allowing the impact of grayscale differences to be adaptively adjusted according to grayscale changes within the area. Furthermore, structural stability is combined to further enhance positions with continuous grayscale changes and consistent local structures. This approach highlights areas with consistent environmental features and stable structures, suppresses noise interference and local anomalies, and makes the effective structural information in the image clearer. This provides a more reliable data foundation for subsequent welding area identification and boundary extraction, improving the stability and accuracy of the overall image analysis process.

[0034] Pixels in the original image structural stability for: , In pixels Within the set neighborhood of the center, the first Gradient magnitude of each pixel pixels in the original image gradient magnitude, This sets the total number of pixels within the neighborhood.

[0035] Using image gradient information as the basis for describing pixel grayscale variation features, a certain neighborhood is defined around each pixel, and the difference in gradient magnitude between each pixel and its neighbors is compared to reflect the consistency of grayscale variation within a local area. When the difference in gradient magnitude between the target pixel and its neighbors is small, it indicates that the grayscale variation in that area is relatively smooth and continuous, and the local structure exhibits high consistency, thus indicating a high degree of structural stability at that location. Conversely, when the gradient difference between the target pixel and its neighbors is large, it means that there are significant abrupt changes in grayscale or structural changes in that area, resulting in a relative decrease in structural stability. This approach can, to some extent, reduce the impact of noise, illumination fluctuations, or random textures on the image analysis process, while enhancing the representation of areas with realistic structural features. It makes the effective structural information in the welding area more prominent, providing a more stable and reliable data foundation for subsequent edge detection, weld contour extraction, and welding area recognition, thereby improving the recognition accuracy and stability in the overall visual processing.

[0036] S3: Based on the original image after denoising, perform welding path planning.

[0037] In a preferred embodiment, the welding path planning specifically involves: performing edge detection on the denoised original image to extract weld candidate regions, and performing connected component analysis on the weld candidate regions to obtain the weld contour; performing curve fitting on the weld contour to obtain the weld centerline; generating a welding path based on the weld centerline, and discretizing the welding path into multiple path points as the welding execution trajectory. The edge detection is Canny edge detection.

[0038] This invention achieves high precision and high reliability in automatic welding positioning by organically combining machine vision, an improved dark channel prior dehazing algorithm, and welding path planning. The solution utilizes a high-resolution camera to acquire images of the area to be welded and enhances image clarity and contrast through adaptive dehazing processing, making the grayscale and structural features of the weld area more prominent. Simultaneously, environmental credibility and structural stability evaluations effectively suppress local noise, uneven illumination, and reflective areas in the image, ensuring image details and weld edge continuity. Based on this, edge detection, connected component analysis, and contour curve fitting are performed on the denoised image to generate the weld centerline and discretize it into executable path points. This allows the welding equipment to move smoothly, continuously, and precisely along the weld, significantly improving weld recognition accuracy, welding path planning reliability, and welding quality consistency. It also enhances the system's robustness and automation level in complex industrial environments, achieving efficient, stable, and intelligent control of the welding process.

[0039] An embodiment of a machine vision-based automated welding positioning system: like Figure 3 The diagram shows a structural block diagram of a machine vision-based automatic welding positioning system according to an embodiment of the present invention, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the machine vision-based automatic welding positioning method described above according to the present invention.

[0040] The aforementioned automatic welding positioning system based on machine vision also includes other components well known to those skilled in the art, such as communication interfaces. Their settings and functions are known in the art and will not be described in detail here.

[0041] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented using computer-readable / executable instructions stored or otherwise maintained by such a computer-readable medium.

[0042] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise explicitly specified.

[0043] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.

Claims

1. A machine vision-based automatic welding positioning method, characterized in that, include: Obtain the original image of the area to be welded; The original image is denoised using an improved dark channel prior dehazing algorithm to obtain a denoised original image, and welding path planning is performed based on the denoised original image. The improved dark channel prior dehazing algorithm includes atmospheric light components, which are positively correlated with the grayscale value and environmental confidence of the target pixel in the original image, and negatively correlated with the Euclidean distance from the target pixel to the center of the original image. The environmental confidence represents the credibility of the target pixel, and the target pixel is any pixel in the original image.

2. The automatic welding positioning method based on machine vision according to claim 1, characterized in that, The atmospheric light components for: , The initial atmospheric light composition, pixels in the original image grayscale value, This represents the maximum grayscale value of a pixel within the original image. pixels in the original image Environmental confidence, In pixels Within the set neighborhood of the center, the first Environmental confidence of each pixel To set the total number of pixels within the neighborhood, To preset hyperparameters, For pixels Euclidean distance to the center of the original image This is the function for finding the maximum value.

3. The automatic welding positioning method based on machine vision according to claim 1, characterized in that, Pixels in the original image Environmental confidence for: , pixels in the original image grayscale value, For the natural constant An exponential function with base 0. In pixels The average grayscale value of all pixels within a neighborhood of the center is set. In pixels The variance of grayscale values ​​of all pixels within a defined neighborhood of the center. pixels in the original image Structural stability, It is a non-zero factor.

4. The automatic welding positioning method based on machine vision according to claim 3, characterized in that, Pixels in the original image structural stability for: , In pixels Within the set neighborhood of the center, the first Gradient magnitude of each pixel pixels in the original image gradient magnitude, This sets the total number of pixels within the neighborhood.

5. The automatic welding positioning method based on machine vision according to claim 1, characterized in that, Use a CCD or CMOS camera to acquire the original image of the area to be soldered.

6. The automatic welding positioning method based on machine vision according to claim 1, characterized in that, The original image of the area to be welded is converted to grayscale.

7. The automatic welding positioning method based on machine vision according to claim 2, characterized in that, The defined neighborhood range is 3.

3.

8. The automatic welding positioning method based on machine vision according to claim 1, characterized in that, The welding path planning specifically involves: performing edge detection on the original image after denoising to extract candidate weld regions, and performing connected component analysis on the candidate weld regions to obtain the weld contour. The weld contour is curve-fitted to obtain the weld centerline; a welding path is generated based on the weld centerline, and the welding path is discretized into multiple path points as the welding execution trajectory.

9. The automatic welding positioning method based on machine vision according to claim 8, characterized in that, The edge detection method is Canny edge detection.

10. A machine vision-based automatic welding positioning system, characterized in that, It includes a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, it implements the automatic welding positioning method based on machine vision as described in any one of claims 1 to 9.