A machine vision-based water pump shell welding positioning method and system

By using an adaptive dynamic gradient threshold calculation method, the difficulty of distinguishing defect textures from real contours in water pump casing positioning by the fixed-parameter Canny edge detection algorithm is solved, achieving higher welding positioning accuracy and stability, and improving production efficiency and yield.

CN121304713BActive Publication Date: 2026-03-24WUHAN SANYUAN PUMP MFG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing machine vision-based pump casing localization methods, the Canny edge detection algorithm with fixed parameters cannot effectively distinguish between the defect texture and the true contour of the pump casing surface, resulting in feature extraction failure or deviation, which affects the accuracy and stability of welding positioning.

Method used

An adaptive dynamic gradient threshold calculation method is adopted. By obtaining the defect level of the neighborhood window of each pixel, the gradient threshold is dynamically adjusted to suppress false edges and ensure the extraction of real structural edges. Combined with structural saliency and texture activity index, the accuracy of edge detection is improved.

Benefits of technology

It improves the accuracy and stability of welding positioning, enhances the production efficiency and yield of automated welding, and ensures welding quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121304713B_ABST
    Figure CN121304713B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and more particularly to a water pump pump shell welding positioning method and system based on machine vision. The method comprises the steps of: collecting a water pump pump shell image, obtaining the edge irregularity, gradient disorder and neighborhood edge fuzziness of each pixel point in the water pump pump shell image, and then obtaining the structural saliency of each pixel point; based on the structural saliency, obtaining the weighted texture degree of each neighborhood pixel point of each pixel point; based on the weighted texture degree, obtaining the texture activity of the neighborhood window of each pixel point; according to the texture activity, obtaining the defect degree of the neighborhood window of each pixel point; based on the defect degree, obtaining the dynamic gradient threshold value of each pixel point; based on the dynamic gradient threshold value, obtaining the real structure edge, and according to the real structure edge, guiding the welding robot to perform accurate welding work. The present application realizes accurate positioning of the water pump pump shell.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and system for positioning the welding of a water pump casing based on machine vision. Background Technology

[0002] The pump casing is the core pressure-bearing component of a water pump, and its welding quality directly affects the safety and service life of the entire product. In automated production lines, welding robots are typically used for welding operations. However, achieving high-quality welding requires precise three-dimensional positioning of the pump casing. Therefore, machine vision technology, due to its non-contact and high-efficiency characteristics, is applied to the automated positioning of workpieces.

[0003] Existing machine vision-based localization methods typically acquire two-dimensional images of the pump casing using a camera, which are then used as pump casing images. The Canny edge detection algorithm is then used to extract key geometric features such as the pump casing outline from the pump casing image. However, the traditional Canny edge detection algorithm has a significant limitation in practical applications: the high and low gradient thresholds in the Canny edge detection algorithm are usually fixed values ​​that are preset by human experience.

[0004] As a casting or stamping part, the surface condition of a water pump casing is complex and varied. During the production process, oil stains, rust, or oxide scale inevitably adhere to the surface of the pump casing. When faced with these pump casings with surface defects, the Canny edge detection algorithm with fixed parameters may mistake the defect texture on the pump casing surface for key geometric features such as the pump casing outline, or it may lose key geometric features such as the pump casing outline, ultimately leading to failure or serious deviation in feature extraction. This cannot guarantee the accuracy and stability of subsequent welding positioning, and seriously reduces the production efficiency and yield of automated welding. Summary of the Invention

[0005] To address the technical problem that the fixed-parameter Canny edge detection algorithm may mistake the defect texture on the pump casing surface for key geometric features such as the pump casing outline, or it may lose key geometric features such as the pump casing outline, ultimately leading to feature extraction failure or serious deviation, this invention provides a water pump casing welding positioning method and system based on machine vision.

[0006] In a first aspect, the present invention provides a machine vision-based method for positioning the welding casing of a water pump, employing the following technical solution:

[0007] A machine vision-based method for positioning the welding casing of a water pump includes the following steps:

[0008] Acquire images of the water pump casing; obtain the edge irregularity, gradient disorder, and edge blurring within the neighborhood of each pixel in the water pump casing image;

[0009] Obtain the structural saliency of each pixel , The structural saliency of the i-th pixel; This indicates the edge irregularity within the neighborhood of the i-th pixel; This indicates the gradient disorder of the i-th pixel. This indicates the blurring of the neighborhood edges of the i-th pixel; exp() represents an exponential function with the natural constant as the base.

[0010] Based on the structural saliency, the weighted texture degree of each neighboring pixel of each pixel is obtained; based on the weighted texture degree, the texture activity of the neighborhood window of each pixel is obtained; based on the texture activity of the neighborhood window of each pixel, the defect degree of the neighborhood window of each pixel is obtained; based on the defect degree, the dynamic gradient threshold of each pixel is obtained, and the image is processed based on the dynamic gradient threshold to extract the true structural edge of the pump casing.

[0011] Based on the actual structural edges, the welding robot is guided to perform precise welding operations.

[0012] The innovation of this invention lies in its adaptive calculation of a dynamic gradient threshold for each pixel in the image based on the defect level of its neighborhood window. In areas with oil stains or rust, a higher threshold is automatically used to suppress false edges; while in areas with true contours, a normal gradient threshold is used to ensure edge integrity. This avoids the problem of fixed parameters mistaking the defect textures on the pump casing surface for key geometric features such as the pump casing contour, leading to feature extraction failure. This improves the accuracy and stability of subsequent welding positioning, as well as the production efficiency and yield of automated welding. Furthermore, this invention constructs the defect level of each pixel's neighborhood window using indicators such as structural saliency and texture activity. The defect level can accurately distinguish between meaningful structural edges and meaningless defect textures, making the extracted true structural edges purer and more accurate.

[0013] Preferably, the acquisition of edge irregularities within the neighborhood includes:

[0014] The Canny edge detection algorithm is used to obtain edge pixels in the pump casing image; the neighborhood window size is preset. ; Construct with the i-th pixel as the center A window of a certain size is used as the neighborhood window of the i-th pixel. The least squares method is used to perform curve fitting on all edge pixels in the neighborhood window of the i-th pixel to obtain the neighborhood edge fitting curve of the i-th pixel. The variance of the curvature of all data points on the neighborhood edge fitting curve of the i-th pixel is denoted as the neighborhood edge irregularity of the i-th pixel.

[0015] Preferably, the acquisition of gradient randomness includes:

[0016] The variance of the gradient direction type of all edge pixels within the neighborhood window of the i-th pixel is denoted as the gradient randomness of the i-th pixel.

[0017] Preferably, the acquisition of the neighborhood edge ambiguity includes:

[0018] A gradient parameter t is preset. For any edge pixel within the neighborhood window of the i-th pixel, the product of the gradient parameter t and the gradient magnitude of the edge pixel is recorded as the attenuation factor. The gradient magnitude of each pixel is traversed along the gradient direction of the edge pixel. If the gradient magnitude of the pixel is greater than or equal to the attenuation factor, the pixel is recorded as the target pixel. This process continues until the magnitude of the most recently traversed pixel is less than the attenuation factor, at which point the traversal stops. The number of all target pixels is recorded as the blur factor of the edge pixel. The average of the blur factors of all edge pixels within the neighborhood window of the i-th pixel is recorded as the neighborhood edge blur of the i-th pixel.

[0019] Preferably, obtaining the weighted texture degree of each neighboring pixel of each pixel includes:

[0020] ;

[0021] In the formula, The weighted texture degree represents the j-th neighboring pixels of the i-th pixel; The structural saliency of the i-th pixel; This represents the gradient value of the j-th neighboring pixel of the i-th pixel.

[0022] When a pixel belongs to the real structure, its gradient value is suppressed; when a pixel belongs to the defect texture, its gradient value is preserved. This is used to obtain the weighted texture degree, which is convenient for obtaining the texture activity of the neighborhood window of each pixel in the future.

[0023] Preferably, obtaining the texture activity of the neighborhood window of each pixel includes:

[0024] ;

[0025] In the formula, The texture activity of the neighborhood window representing the i-th pixel; The weighted texture degree represents the j-th neighboring pixels of the i-th pixel; This represents the number of pixels in the neighborhood window of the i-th pixel.

[0026] Preferably, obtaining the defect level of the neighborhood window for each pixel includes:

[0027] ;

[0028] In the formula, This represents the degree of defect in the neighborhood window of the i-th pixel; The texture activity of the neighborhood window representing the i-th pixel; The mean value represents the texture activity of all pixels in the pump casing image; exp() represents an exponential function with the natural constant as the base.

[0029] This facilitates the subsequent adaptive acquisition of the dynamic gradient threshold for each pixel based on the degree of defect.

[0030] Preferably, the step of obtaining the dynamic gradient threshold for each pixel and processing the image based on the dynamic gradient threshold to extract the true structural edges of the pump casing includes:

[0031] ;

[0032] In the formula, The dynamic gradient threshold representing the i-th pixel; This represents the degree of defect in the neighborhood window of the i-th pixel; Represents the global basic gradient threshold; Represents the adjustment coefficient;

[0033] If the gradient magnitude of any pixel in the pump casing image is greater than its dynamic gradient threshold, that pixel is taken as an edge point. All edge points of the pump casing image are obtained, and all edge points of the pump casing image are connected to obtain the real structural edge.

[0034] Based on dynamic gradient thresholding, the accuracy of real structure edge extraction is improved.

[0035] Preferably, guiding the welding robot to perform precise welding operations based on the actual structural edges includes:

[0036] The actual structural edges are matched with the projected edges of the pump casing CAD model pre-loaded into the computer memory. Specifically, the iterative nearest point algorithm is used to minimize the distance between the projected edges of the pump casing CAD model and the actual structural edges through iterative optimization. When the algorithm converges, the optimal transformation matrix obtained is the precise pose of the pump casing in the camera coordinate system. The precise pose of the pump casing in the camera coordinate system is transmitted to the welding robot control system to guide the robot to perform precise welding operations.

[0037] Based on the actual structural edges, the accuracy and stability of welding positioning are improved.

[0038] Secondly, the present invention provides a water pump casing welding positioning system based on machine vision, which adopts the following technical solution:

[0039] A machine vision-based water pump casing welding positioning system includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the aforementioned machine vision-based water pump casing welding positioning method.

[0040] By adopting the above technical solution, a computer program is generated from the above-mentioned machine vision-based water pump casing welding positioning method and stored in the memory so that it can be loaded and executed by the processor. In this way, a terminal device can be made based on the memory and the processor for convenient use.

[0041] The present invention has the following technical effects: First, the present invention constructs the defect degree of the neighborhood window of each pixel through indicators such as structural saliency and texture activity. The defect degree can accurately distinguish between meaningful structural edges and meaningless defect textures, making the extracted real structural edges purer and more accurate. Then, based on the defect degree of the neighborhood window of each pixel, the dynamic gradient threshold of each pixel is obtained. In areas with oil stains or rust, a higher threshold is automatically used to suppress false edges. In areas with real contours, a normal gradient threshold is used to ensure the integrity of the edges. This avoids fixed parameters from mistaking the defect texture of the pump shell surface as the contour and other key geometric features of the pump shell, which would lead to feature extraction failure. This improves the accuracy and stability of subsequent welding positioning, as well as the production efficiency and yield of automated welding. Attached Figure Description

[0042] Figure 1 This is a flowchart of a machine vision-based water pump casing welding positioning method according to an embodiment of the present invention. Detailed Implementation

[0043] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0044] This invention discloses a machine vision-based method for positioning the welding casing of a water pump, referring to... Figure 1 This includes steps S1-S4:

[0045] S1: Acquire an image of the water pump casing.

[0046] In this embodiment of the invention, an industrial camera is deployed above the welding station. The industrial camera is used to take pictures of the water pump casing image to obtain an RGB image of the water pump casing. The RGB image of the water pump casing is then converted to grayscale to obtain the water pump casing image.

[0047] S2: Obtain the irregularity of the neighborhood edges, the randomness of the gradient, and the blurring of the neighborhood edges for each pixel in the pump casing image; based on the irregularity of the neighborhood edges, the randomness of the gradient, and the blurring of the neighborhood edges, obtain the structural saliency of each pixel; based on the structural saliency, obtain the weighted texture degree of each neighboring pixel of each pixel; based on the weighted texture degree, obtain the texture activity of the neighborhood window of each pixel.

[0048] It should be noted that the gradient directions of pixels in rust and oil stain textures are usually chaotic. Therefore, if the gradient direction of the edge pixels in the neighborhood window of any pixel is highly complex, the pixel is more likely to be located in a rust or oil stain texture. Furthermore, if there are multiple pixels with similar gradient magnitudes in the gradient direction of the edge pixels in the neighborhood window of any pixel, it indicates that the edge ambiguity in the neighborhood window of that pixel is greater, and the pixel is more likely to be located in a rust or oil stain texture. Also, since the edges of rust and oil stain areas are usually not smooth or regular, this irregularity is caused by the uneven distribution of rust or oil stains. Therefore, when performing curve fitting on the edge pixels in the neighborhood window of any pixel, if the curvature variance of the data points on the edge fitting curve in the neighborhood is large, the pixel is more likely to be located in a rust or oil stain texture.

[0049] For pixels on the edge of a real structure (such as the outline of a water pump casing), the gradient direction of the edge pixels in its neighborhood window is consistent. The curvature variance of the data points on the edge fitting curve obtained after curve fitting of the edge pixels in its neighborhood window is small, and there are no pixels with similar gradient magnitude in the gradient direction of the edge pixels in its neighborhood window.

[0050] Therefore, based on the above features, this invention obtains the irregularity of the neighborhood edge, the randomness of the gradient, and the fuzziness of the neighborhood edge of each pixel, and then obtains the structural saliency of each pixel. The larger the value, the more likely the pixel belongs to the edge of the real structure. Conversely, the pixel is located at the rust or oil stain texture.

[0051] In this embodiment of the invention, the Canny edge detection algorithm is used to obtain edge pixels in the water pump casing image;

[0052] Construct with the i-th pixel as the center A window of a certain size is used as the neighborhood window for the i-th pixel. In this embodiment of the invention, the neighborhood window size is preset. In other embodiments, the implementer may preset the value of n according to the specific implementation method;

[0053] In this embodiment of the invention, the least squares method is used to perform curve fitting on all edge pixels in the neighborhood window of the i-th pixel to obtain the neighborhood edge fitting curve of the i-th pixel; the variance of the curvature of all data points on the neighborhood edge fitting curve of the i-th pixel is denoted as the neighborhood edge irregularity of the i-th pixel.

[0054] The variance of the gradient direction type of all edge pixels within the neighborhood window of the i-th pixel is denoted as the gradient disorder of the i-th pixel.

[0055] A gradient parameter t = 0.2 is preset. For any edge pixel within the neighborhood window of the i-th pixel, the product of the gradient parameter t and the gradient magnitude of the edge pixel is denoted as the decay factor. The gradient magnitude of each pixel is traversed along the gradient direction of the edge pixel. If the gradient magnitude of the pixel is greater than or equal to the decay factor, the pixel is marked as a target pixel. This process continues until the magnitude of the most recently traversed pixel is less than the decay factor, at which point the traversal stops. The number of all target pixels is denoted as the blur factor of the edge pixel. The average of the blur factors of all edge pixels within the neighborhood window of the i-th pixel is denoted as the neighborhood edge blur of the i-th pixel.

[0056] Obtain the structural saliency of each pixel:

[0057] ;

[0058] In the formula, The structural saliency of the i-th pixel; This indicates the edge irregularity within the neighborhood of the i-th pixel; This indicates the gradient disorder of the i-th pixel. represents the fuzziness of the neighborhood edges of the i-th pixel; exp() represents an exponential function with the natural constant as the base; the smaller the irregularity of the neighborhood edges, the randomness of the gradient, and the fuzziness of the neighborhood edges of the i-th pixel, the greater the structural saliency of the i-th pixel, indicating that the i-th pixel may be a real structural edge; conversely, the smaller the structural saliency of the i-th pixel, the more likely the i-th pixel is located in rust or oil stain textures;

[0059] It should be noted that if there are no edge pixels in the neighborhood window of any pixel, it means that the pixel belongs to the smooth metal surface of the pump housing, and the structural saliency of the pixel is set to 1.

[0060] It should be noted that the known structural saliency of a pixel can reflect whether each pixel belongs to the edge of a real structure, the smooth metal surface of the pump casing, or the texture of rust and oil stains. At the edge of the real structure of the pump casing, the gray value of the pixel changes abruptly from dark (pump casing) to bright (background), with a drastic change in brightness, so the gradient amplitude will be very high. On the smooth metal surface of the pump casing, the brightness is relatively uniform, so the gradient amplitude approaches 0. Pixels in the rust and oil stain textures have varying shades and brightness, but usually not as drastic as the edge of the real structure, so the gradient amplitude is smaller compared to the edge of the real structure. If any pixel is located in a rust or oil stain area, the gradient values ​​of the neighboring pixels of that pixel will be weighted higher, thus indicating that the texture of the neighboring window of that pixel is more salient.

[0061] Therefore, this invention combines the structural saliency of each pixel to weight the gradient values ​​of the neighboring pixels of each pixel to obtain the weighted texture degree of the neighboring pixels of each pixel. The greater the weighted texture degree, the more likely the pixel belongs to the rust or oil stain texture. Then, the weighted texture degree of each neighboring pixel of each pixel is summed to obtain the texture activity of the neighborhood window of each pixel. The greater the texture activity, the more significant the rust or oil stain texture of the neighborhood window of each pixel.

[0062] In this embodiment of the invention, the weighted texture degree of each neighboring pixel is obtained:

[0063] ;

[0064] In the formula, The weighted texture degree represents the j-th neighboring pixels of the i-th pixel; The structural saliency of the i-th pixel; This represents the gradient value of the j-th neighboring pixel of the i-th pixel;

[0065] The larger the value, and A larger value indicates that the j-th neighboring pixel of the i-th pixel is located on the pump casing outline. The value approaches 0, according to Will When the value decreases, the weighted texture degree of the j-th neighboring pixels of the i-th pixel is smaller;

[0066] The value is large, and The smaller the value, the more likely the j-th neighboring pixel of the i-th pixel is located in the rust or oil stain texture. The value approaches 1, for The value is not adjusted, and at this time, the weighted texture degree of the j-th neighboring pixels of the i-th pixel is relatively large;

[0067] In this embodiment of the invention, the texture activity of the neighborhood window of each pixel is obtained:

[0068] ;

[0069] In the formula, The texture activity of the neighborhood window representing the i-th pixel; The weighted texture degree represents the j-th neighboring pixels of the i-th pixel; This represents the number of pixels in the neighborhood window of the i-th pixel. The larger the value, the greater the weighted texture degree of the neighborhood windows of each pixel. In this case, the greater the texture activity of the neighborhood window of the i-th pixel, the more prominent the rust and oil stain textures of the neighborhood window of the i-th pixel. The smaller the value, the less active the texture of the neighborhood window of the i-th pixel, and the less significant the rust and oil stain textures of the neighborhood window of the i-th pixel.

[0070] S3: Based on the texture activity of the neighborhood window of each pixel, obtain the defect degree of the neighborhood window of each pixel; based on the defect degree, obtain the dynamic gradient threshold of each pixel; based on the dynamic gradient threshold, obtain the true structural edge.

[0071] It should be noted that the higher the texture activity of a pixel's neighborhood window, the more pronounced the rust and oil stains in that window become. This makes extracting the true structural edge from the neighborhood window extremely difficult. Therefore, by comparing the texture activity of any pixel's neighborhood window with the average texture activity of all pixels' neighborhood windows, if the texture activity exceeds or equals the average, it indicates that the rust and oil stains are more pronounced, and the defect level of the pixel's neighborhood window approaches 1. Conversely, if the texture activity does not exceed the average, it indicates that the neighborhood window is more likely located at the edge of the true structure or on the smooth metal surface of the pump casing, and the defect level of the pixel's neighborhood window decreases sharply, approaching 0.

[0072] In this embodiment of the invention, the defect level of the neighborhood window of each pixel is obtained:

[0073] ;

[0074] In the formula, This represents the degree of defect in the neighborhood window of the i-th pixel; The texture activity of the neighborhood window representing the i-th pixel; The mean value representing the texture activity of all pixels in the pump casing image; exp() represents an exponential function with the natural constant as the base.

[0075] when much smaller hour, The value is less than 0, and The larger the value, the more likely the neighborhood window of the i-th pixel is to be located at the edge of the real structure or on the smooth metal surface of the pump casing. Approaching 0; when Greater than or close to hour, The value is greater than or equal to 0, and The closer the value is to 0, the more likely the neighborhood window of the i-th pixel is to contain rust or oil stains. Approaching 1.

[0076] It should be noted that this step adjusts the key parameter of the edge detection algorithm, namely the gradient threshold, based on the degree of defect in the neighborhood window of each pixel, thereby achieving algorithm adaptability. If the degree of defect in the neighborhood window of any pixel is large, it means that the rust and oil stain textures of the neighborhood window of that pixel are more obvious. At this time, the dynamic gradient threshold of that pixel should be larger to avoid detecting pixels with rust and oil stain textures. Conversely, if the degree of defect in the neighborhood window of any pixel is small, it means that the pixel is located on the edge of the real structure or the smooth metal surface of the pump shell. At this time, the dynamic gradient threshold of that pixel should be as equal as possible to the global basic gradient threshold.

[0077] In this embodiment of the invention, the average gradient value of all pixels in the pump casing image is used as the global basic gradient threshold; the specific method for obtaining the dynamic gradient threshold of each pixel is as follows:

[0078] ;

[0079] In the formula, The dynamic gradient threshold representing the i-th pixel; This represents the degree of defect in the neighborhood window of the i-th pixel; Represents the global basic gradient threshold; This represents the adjustment coefficient, used to control the adjustment magnitude of the defect level on the global basic gradient threshold. The invention presets... In other embodiments, implementers may pre-set according to specific implementation conditions. The value of .

[0080] If the gradient magnitude of any pixel in the pump casing image is greater than its dynamic gradient threshold, that pixel is taken as an edge point. All edge points of the pump casing image are obtained, and all edge points of the pump casing image are connected to obtain the real structural edge.

[0081] S4: Guides the welding robot to perform precise welding operations based on the actual structural edges.

[0082] It should be noted that the welding robot is guided to perform precise welding operations based on the actual structural edges.

[0083] In this embodiment of the invention, the actual structural edge is matched with the projected edge of the pump casing CAD model pre-loaded into the computer memory. Specifically, the iterative nearest point algorithm is used to minimize the distance between the projected edge of the pump casing CAD model and the actual structural edge through iterative optimization. When the algorithm converges, the obtained optimal transformation matrix is ​​the precise pose of the pump casing in the camera coordinate system. The precise pose of the pump casing in the camera coordinate system is transmitted to the welding robot control system to guide the robot to perform precise welding operations.

[0084] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A machine vision-based method for positioning the welding casing of a water pump, characterized in that, include: Acquire images of the water pump casing; To obtain the edge irregularity, gradient disorder, and edge blurring within the neighborhood of each pixel in the pump casing image; Obtain the structural saliency of each pixel , The structural saliency of the i-th pixel; This indicates the edge irregularity within the neighborhood of the i-th pixel; This indicates the gradient disorder of the i-th pixel. This indicates the blurring of the neighborhood edges of the i-th pixel; exp() represents an exponential function with the natural constant as the base; Obtaining edge irregularities within the neighborhood includes: using the Canny edge detection algorithm to acquire edge pixels in the pump casing image; and setting a preset neighborhood window size. ; Construct with the i-th pixel as the center A window of size is used as the neighborhood window of the i-th pixel. The least squares method is used to perform curve fitting on all edge pixels in the neighborhood window of the i-th pixel to obtain the neighborhood edge fitting curve of the i-th pixel. The variance of the curvature of all data points on the neighborhood edge fitting curve of the i-th pixel is denoted as the neighborhood edge irregularity of the i-th pixel. The acquisition of gradient disorder includes: taking the variance of the gradient direction type of all edge pixels in the neighborhood window of the i-th pixel as the gradient disorder of the i-th pixel; The acquisition of neighborhood edge ambiguity includes: pre-setting a gradient parameter t; for any edge pixel within the neighborhood window of the i-th pixel, multiplying the gradient parameter t by the gradient magnitude of the edge pixel, and recording it as a decay factor; iterating through the gradient magnitude of each pixel along the gradient direction of the edge pixel; if the gradient magnitude of the pixel is greater than or equal to the decay factor, then the pixel is recorded as a target pixel; and so on, until the magnitude of the most recently traversed pixel is less than the decay factor, at which point the traversal stops; recording the number of all target pixels as the blur factor of the edge pixel; and recording the average of the blur factors of all edge pixels within the neighborhood window of the i-th pixel as the neighborhood edge ambiguity of the i-th pixel. Based on the structural saliency, the weighted texture degree of each neighboring pixel is obtained, including: , This represents the weighted texture degree of the j-th neighboring pixels of the i-th pixel. This represents the gradient value of the j-th neighboring pixel of the i-th pixel; Based on the weighted texture degree, the texture activity of the neighborhood window of each pixel is obtained, including: , The texture activity of the neighborhood window representing the i-th pixel. This represents the number of pixels in the neighborhood window of the i-th pixel. Based on the texture activity of the neighborhood window of each pixel, the defect level of the neighborhood window of each pixel is obtained, including: , This represents the degree of defect in the neighborhood window of the i-th pixel. The mean value representing the texture activity of all pixels in the pump casing image; Based on the degree of defect, the dynamic gradient threshold of each pixel is obtained, including: , This represents the dynamic gradient threshold of the i-th pixel. Represents the global basic gradient threshold. Represents the adjustment coefficient; The image is processed based on the dynamic gradient threshold to extract the true structural edges of the pump casing; Based on the actual structural edges, the welding robot is guided to perform precise welding operations.

2. The water pump casing welding positioning method based on machine vision according to claim 1, characterized in that, The step of processing the image based on the dynamic gradient threshold to extract the true structural edges of the pump casing includes: If the gradient magnitude of any pixel in the pump casing image is greater than its dynamic gradient threshold, that pixel is taken as an edge point. All edge points of the pump casing image are obtained, and all edge points of the pump casing image are connected to obtain the real structural edge.

3. The water pump casing welding positioning method based on machine vision according to claim 1, characterized in that, The method of guiding the welding robot to perform precise welding operations based on the actual structural edges includes: The actual structural edges are matched with the projected edges of the pump casing CAD model pre-loaded into the computer memory. Specifically, the iterative nearest point algorithm is used to minimize the distance between the projected edges of the pump casing CAD model and the actual structural edges through iterative optimization. When the algorithm converges, the optimal transformation matrix obtained is the precise pose of the pump casing in the camera coordinate system. The precise pose of the pump casing in the camera coordinate system is transmitted to the welding robot control system to guide the robot to perform precise welding operations.

4. A machine vision-based water pump casing welding positioning system, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a machine vision-based water pump casing welding positioning method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Method for edge detection

    AU2016101504A4

  • Art design style migration system based on deep learning

    CN120510252A