A welding robot positioning method and system based on visual feature matching
Patent Information
- Application Number
- CN202610840866.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-11
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2046-06-11
AI Technical Summary
[0005]本发明提供一种基于视觉特征匹配的焊接机器人寻位方法及系统,旨在解决相关技术中关键区域特征点的严重匮乏与空间分布失衡,使得机器人在实际作业时无法准确捕捉焊缝的真实空间位置,进而导致三维位姿估计失效、焊枪无法对准焊缝起始点以及焊接轨迹严重跑偏,最终严重影响焊接质量的问题
[0015] In a second aspect, a welding robot positioning system based on visual feature matching is also provided, including a processor and a memory, the memory storing a computer program, the processor executing the computer program to implement the welding robot positioning method based on visual feature matching as described above.
Smart Images

Figure CN122391367B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a method and system for positioning welding robots based on visual feature matching. Background Technology
[0002] With the rapid development of industrial automation and intelligent manufacturing, welding robots have become an indispensable core equipment in modern industrial production. To improve the autonomous adaptation and operational capabilities of robots, positioning technology based on visual feature matching is widely used. This technology acquires workpiece images and depth information through vision sensors mounted on the end effector, extracts feature points using visual algorithms, and performs matching calculations to obtain the accurate three-dimensional pose of the workpiece, thereby guiding the welding torch to precisely execute welding tasks.
[0003] In actual industrial welding operations, workpiece surfaces often possess extremely complex physical and visual characteristics. Specifically, the weld zone, the core target area in the positioning task, typically exhibits weak texture characteristics with uniform grayscale distribution and gentle gradient changes in visual images due to the special grain structure formed by the solidification of the molten pool. In contrast, the surrounding base material areas, which contribute less to positioning, often exhibit strong texture characteristics with rich textures due to surface roughness and other factors. This significant spatial heterogeneity in workpiece surface texture presents specific challenges to the robot's accurate visual positioning in certain scenarios.
[0004] Currently, when using visual feature matching methods (such as SuperPoint algorithms) to solve the aforementioned welding positioning problem, a globally fixed and uniform response threshold is typically used to filter image feature points. However, this technique is prone to causing serious production anomalies in actual welding scenarios: because the globally uniform threshold ignores the texture differences on the workpiece surface, the algorithm cannot extract enough feature points in the critical areas of the weld seam, which have extremely high positioning contribution but exhibit weak texture. Instead, it concentrates a large number of feature points in the strongly textured base material areas with extremely low positioning contribution. This severe lack of feature points in critical areas and the imbalance in their spatial distribution make it impossible for the robot to accurately capture the true spatial position of the weld seam during actual operation. This leads to the failure of 3D pose estimation, the welding torch failing to align with the weld seam starting point, and severe deviation of the welding trajectory, ultimately seriously affecting welding quality and failing to meet the actual needs of industrial sites for high-precision autonomous positioning of welding robots under complex working conditions. Summary of the Invention
[0005] This invention provides a welding robot positioning method and system based on visual feature matching, aiming to solve the problems of severe lack of key area feature points and unbalanced spatial distribution in related technologies, which makes it impossible for robots to accurately capture the real spatial position of the weld during actual operation, resulting in failure of three-dimensional pose estimation, failure of welding torch to align with the weld start point, and serious deviation of welding trajectory, ultimately seriously affecting welding quality.
[0006] In a first aspect, the present invention provides a welding robot positioning method based on visual feature matching, comprising: acquiring an image and depth data containing a weld seam; preprocessing the image and dividing it into multiple grid cells; calculating the texture complexity spatial heterogeneity of each grid cell, wherein the texture complexity spatial heterogeneity integrates the gradient intensity and orientation diversity of pixels in a local region to quantify and distinguish the richness of texture in the image; constructing the regional importance of each grid cell, wherein the regional importance is used to measure the contribution of the region of the grid cell to the weld seam positioning task; extracting feature points of the image using the SuperPoint algorithm to obtain a response map containing the response values of each feature point; constructing an adaptive response threshold for each grid cell, wherein the adaptive response threshold is positively correlated with the ratio of a base threshold, the mean response value within the grid cell, and the mean global response value of the image, and negatively correlated with the regional importance; selecting feature points with response values greater than the corresponding adaptive response threshold as final feature points; matching the final feature points with feature points of a reference image; calculating the three-dimensional pose of the workpiece in the current image; and correcting the welding trajectory of the robot based on the three-dimensional pose. This method constructs an adaptive response threshold for each mesh cell by combining texture complexity spatial heterogeneity and regional importance. In actual welding operation scenarios, it can dynamically lower the screening threshold of weak texture weld areas with high positioning contribution, thereby accurately capturing the real spatial position of the weld. This effectively avoids the failure of 3D pose estimation and welding trajectory deviation, and greatly improves the high accuracy and stability of welding robots in autonomous positioning under complex working conditions.
[0007] Furthermore, the spatial heterogeneity of texture complexity for each grid cell is calculated, including: for any grid cell, calculating the Shannon entropy in the gradient direction within that grid cell and the proportion of pixels with gradient magnitudes greater than a threshold within that grid cell. The spatial heterogeneity of texture complexity for the grid cell is positively correlated with both the Shannon entropy and the proportion of pixels with high gradient magnitudes. This method, by comprehensively calculating the Shannon entropy in the gradient direction within the grid cell and the proportion of pixels with high gradient magnitudes, can more comprehensively and meticulously quantify the extremely complex physical and visual differences on the surface of actual welded workpieces. This provides a more scientific and reliable data foundation for accurately distinguishing between weak-texture weld seam areas and strong-texture base material areas, thereby ensuring the anti-interference capability of the positioning algorithm under complex lighting and rough surfaces.
[0008] Furthermore, the method constructs the regional importance of each grid cell, including: the regional importance is negatively correlated with the spatial heterogeneity of texture complexity, negatively correlated with the distance from the center of the grid cell to the nearest candidate weld edge, and positively correlated with the number of candidate weld edge pixels contained in the grid cell. By assigning higher weights to grid cells with weak textures, close to the weld edge, and containing a large number of edge pixels, this method can effectively focus the algorithm's attention on the core target region of the weld, which contributes significantly to the positioning task, in complex industrial welding scenarios. This fundamentally corrects the blindness of feature extraction and increases the probability of acquiring high-value region features.
[0009] Furthermore, the method for obtaining candidate weld edges includes: based on the index map constructed by the texture complexity spatial heterogeneity, using the Otsu method to divide the index map into texture-rich regions and weak texture regions, and using the Canny edge detection algorithm on the weak texture regions to extract the candidate weld edges. By using the Otsu method combined with the texture complexity index to pre-remove strong texture regions, and only using the Canny algorithm to extract candidate weld edges in weak texture regions, the method can significantly reduce the false extraction of non-target false edges when switching to new working conditions or when there are complex conditions such as oxidation or oil stains on the workpiece surface, thus significantly improving the purity and robustness of weld edge detection in actual production.
[0010] Furthermore, the proportion of pixels within the grid cell whose gradient magnitude is greater than a threshold includes: obtaining the threshold by processing the gradient magnitude map of the entire image using the Otsu thresholding method. Compared to manually setting a fixed gradient threshold based on experience, using the Otsu thresholding method to automatically process the gradient magnitude map of the entire image to obtain the threshold enables the robot vision system to adapt to changes in overall contrast under different materials (such as carbon steel and stainless steel) and different lighting conditions, enhancing the universality and debug-free capability of the positioning method in diverse industrial environments.
[0011] Furthermore, the method for obtaining the basic threshold includes: extracting the corner response map of the intermediate layer of the SuperPoint network, and using the 50th percentile of all corner response values in the corner response map as the basic threshold. Compared to using an absolutely fixed value as the response benchmark, which leads to overfitting or underfitting, using the 50th percentile of all corner response values in the corner response map as the basic threshold can dynamically establish a reasonable feature selection baseline based on the overall texture response level of a specific workpiece currently collected in real time.
[0012] Furthermore, the method includes: performing feature point density detection on regions with an importance greater than a preset importance threshold; when the detected feature point density is lower than a preset density threshold, reducing the adaptive response threshold value of the corresponding region and extracting additional feature points until the minimum density requirement is met. This method, through a compensation mechanism of feature point density detection and dynamic threshold adjustment for high-importance regions, constructs a safety net for feature extraction in critical regions. It effectively solves the fatal hidden danger of feature point discontinuity in weld segments caused by local extreme smoothness, leading to matching breakpoints and positioning failures, thus ensuring the absolute continuity and safety of welding trajectory planning.
[0013] Furthermore, calculating the 3D pose of the workpiece in the current image includes: matching the final feature points with the feature points of the reference image using the Nearest Neighbor Ratio (NNDR) method to obtain matching point pairs; based on the matching point pairs, estimating the homography matrix using the RANSAC algorithm and eliminating outliers; combining the homography matrix, camera calibration parameters, and depth data, solving the 3D pose of the workpiece using the PnP algorithm, and performing nonlinear optimization using the Levenberg-Marquardt algorithm. By combining the Nearest Neighbor Ratio for initial screening, using RANSAC to eliminate incorrectly matched outliers, and finally introducing the LM algorithm to perform nonlinear optimization of the 3D pose solved by PnP, the mismatch noise caused by unavoidable interference such as dust splashes and metal reflections in industrial environments can be eliminated to the greatest extent, providing extremely accurate and noise-resistant 3D spatial guidance for the robot end effector.
[0014] Furthermore, the preprocessing includes: performing distortion correction on the image using the camera intrinsic and extrinsic parameter matrix, enhancing the local contrast of the corrected image using the Adaptive Histogram Equalization (CLAHE) algorithm, and smoothing the enhanced image using a bilateral filter.
[0015] In a second aspect, a welding robot positioning system based on visual feature matching is also provided, including a processor and a memory, the memory storing a computer program, the processor executing the computer program to implement the welding robot positioning method based on visual feature matching as described above.
[0016] Beneficial effects: For complex workpiece surfaces in actual industrial welding where weak textured welds and strong textured base materials coexist, key regions are identified by quantifying the spatial heterogeneity of texture complexity. Combined with the regional importance of mesh cells, an adaptive response threshold is constructed. This method can dynamically lower the extraction threshold of weld regions that have extremely high positioning contribution but exhibit weak texture, effectively solving the problems of scarce feature points and unbalanced spatial distribution in key regions. This ensures the high accuracy and high stability of welding robots in three-dimensional autonomous positioning under complex and harsh working conditions. Attached Figure Description
[0017] Figure 1 This is a schematic flowchart illustrating a positioning method according to an embodiment of the present invention;
[0018] Figure 2 This is a schematic illustration of an original welded workpiece image according to an embodiment of the present invention; Figure 3 This is an illustration of the feature point extraction results of existing algorithms; Figure 4 This is a schematic illustration of the feature point extraction results of the improved algorithm according to an embodiment of the present invention. Detailed Implementation
[0019] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0020] like Figure 1 As shown, S101: Data acquisition and preprocessing.
[0021] In this embodiment, to achieve region-adaptive feature enhancement, it is first necessary to acquire multi-view images of the weld workpiece and the corresponding depth information. Specifically, an industrial camera and a structured light sensor are integrated into the end effector of the welding robot.
[0022] The data acquisition process is divided into two stages: offline calibration and online operation. In the offline calibration stage, workpiece image samples are collected under various working conditions, covering samples of different materials (such as carbon steel and stainless steel), different weld types (such as butt welds and fillet welds), and different levels of contamination (such as oxidation and oil stains). Zhang, and manually marked the weld area to generate a mask. During the online operation phase, the robot moves to an observation position above the workpiece surface, in order to... Multiple images from different perspectives are acquired at angular intervals and used as the original image (e.g., Figure 2 The original image of the welded workpiece is shown, and depth data is acquired simultaneously.
[0023] The acquired raw image data requires a series of preprocessing operations to improve the accuracy of subsequent processing. First, distortion correction is performed on the image using the camera's intrinsic and extrinsic parameter matrices obtained through Zhang Zhengyou's calibration method, eliminating radial and tangential distortions caused by lens physical characteristics. Second, to address the common problem of local overexposure or underexposure in welding scenes, an adaptive histogram equalization (CLAHE) algorithm is used to enhance local image contrast. Next, to effectively preserve edge information of key structures such as weld seams while filtering out image noise, a bilateral filter is used for smoothing. Finally, based on the extrinsic parameter calibration matrices of the camera and structured light sensor, the depth data is compared with… Perform pixel-level alignment on the image to generate the aligned image. The data serves as input for subsequent algorithms.
[0024] S102: Construct the texture complexity spatial heterogeneity of each mesh unit.
[0025] In this embodiment, the texture complexity of the workpiece surface exhibits significant spatial heterogeneity. The special grain structure formed by the solidification of the molten pool in the weld area typically results in a surface roughness of... It is much higher than the base material, which is usually in The weld area exhibits weak texture characteristics in the image, characterized by uniform grayscale distribution and gentle gradient changes. To quantify this difference, this embodiment constructs a texture complexity spatial heterogeneity.
[0026] Specifically, the preprocessed image is first divided into... Non-overlapping grid cells of pixel size. This size ensures that each cell contains enough pixels for effective statistical analysis. Subsequently, for each grid cell, the gradient information of all pixels within it is calculated separately.
[0027] To comprehensively evaluate the texture complexity of each mesh unit, this embodiment proposes a texture complexity spatial heterogeneity. Its construction is based on the fact that regions with rich textures typically exhibit a large number of pixels with high gradient magnitudes and diverse gradient directions; conversely, regions with weak textures have low gradient magnitudes and a single gradient direction. The calculation formula is as follows: In the formula: Indicates the first Texture complexity spatial heterogeneity of each grid cell; Indicates the first The gradient magnitude within a grid cell is greater than a threshold. The proportion of pixels, with values ranging from 0. , where the threshold The gradient magnitude map of the entire image is calculated using the Otsu thresholding method, which has good adaptability. This item mainly reflects the intensity of the texture. Indicates the first Shannon entropy in the gradient direction within a grid cell. Indicates the first The normalized standard deviation of gray values within each grid cell, with a value range of [value range missing]. This term is used to suppress the weights of regions where grayscale fluctuations are severe due to noise.
[0028] No. Shannon entropy in the gradient direction within each grid cell The specific calculation method is as follows: For the first... Each grid cell will The directional space is divided into The percentage of pixels falling into each interval is counted, and the Shannon entropy of that grid cell is calculated. Shannon entropy mainly reflects the directional diversity of the texture.
[0029] From the above formula, it can be seen that when the grid cell region When the texture is rich, the proportion of high gradient pixels is high. and gradient direction diversity Both will increase, leading to an increase in the numerator. Significantly increased; conversely, in areas with weak texture, such as weld seams, and The values are all relatively small, and the numerator term also decreases accordingly. Therefore, texture complexity spatial heterogeneity can effectively quantify and distinguish the texture complexity of different regions.
[0030] S103: Construct the regional importance of each grid cell.
[0031] In this embodiment, considering only texture complexity is insufficient to fully guide feature point extraction. This is because, for welding positioning tasks, although the weld seam and its surrounding area have weaker texture, their positioning contribution is far greater than that of the textured base material area. Therefore, it is necessary to construct a region importance index to comprehensively quantify the importance of each mesh element in the positioning task.
[0032] The construction of this index is first based on an index map composed of spatial heterogeneity of texture complexity. Otsu's method is used to automatically determine a threshold, dividing the image into texture-rich and texture-weak regions. Next, the Canny edge detection algorithm is used to extract candidate edges of the weld seam, where the high threshold is preferably... Low threshold is preferred .
[0033] The regional importance is determined based on the following: weak texture regions (more likely weld seams) should have higher base weights; regions closer to the weld seam edge are more important; and regions containing more weld seam edge pixels are more important. The calculation formula is as follows: In the formula: Indicates the first Regional importance of each grid cell. For the first Texture complexity spatial heterogeneity of each grid cell; This is the maximum value of the texture complexity spatial heterogeneity among all mesh cells, used for normalization; Indicates the first The normalized Euclidean distance from the center point of each grid cell to the nearest weld edge, which is normalized by dividing by the length of the image diagonal; Indicates the first The proportion of edge pixels within a grid cell.
[0034] It should be noted that the first item By inversely mapping the texture complexity metric, The smaller the value (weak texture) of a region, the larger this item's value, thus obtaining a higher base weight. The second item... It is a distance decay function, when The smaller the value, the closer it is to the weld; the larger the value of this item is. (Third item) It is a geometric feature enhancement factor; the more edge pixels a grid cell contains, the better. The larger the value, the greater the value of this item, thus amplifying the importance of this region.
[0035] The formula shows that when a mesh cell has a weak texture, is close to the weld, and contains many edges, its regional importance will increase significantly. This allows the weld region, which plays a key role in the positioning task, to be accurately identified.
[0036] S104: Construct the adaptive response threshold for each grid cell.
[0037] In this embodiment, to address the limitation of the original SuperPoint algorithm in using a globally fixed threshold to filter feature points, this embodiment constructs an adaptive response threshold for each grid cell, aiming to dynamically generate different response thresholds for different regions of the image based on local texture characteristics and regional importance.
[0038] When constructing this metric, the first step is to extract the corner response map of the intermediate layers of the SuperPoint network. The size of this map is typically the same as that of the input image. To facilitate subsequent calculations, the response map was upsampled to the same size as the original image using bicubic interpolation. Then, the statistics for each... The average response value within a grid cell.
[0039] The adaptive response threshold is constructed based on the following: the baseline level of the threshold should be determined by the global response distribution; the threshold should be appropriately lowered in areas with weak local responses to improve sensitivity; and the threshold should be further lowered in areas with higher regional importance to ensure sufficient feature points are extracted. The calculation formula is as follows: In the formula: Indicates the first Adaptive response threshold for each grid cell; The reference response threshold is represented by a threshold value, which, as a preferred approach, is set to the response values of all corner points of the entire image. percentile; Indicates the first Local average corner response value within each grid cell; This represents the global average corner response value of the entire image; For the first The regional importance assessment index for each grid cell. It should be noted that the second term in the formula... As a local response normalization factor, when the local response At lower levels, such as in areas with weak texture, this factor is less than This lowers the threshold in that region. (Third item) As an importance regulating factor, when the regional importance Increasing the threshold lowers the final adaptive response threshold. This method ensures that a lower threshold can be used in important, weakly textured regions, thereby extracting more feature points.
[0040] S105: Algorithm Improvement and Position Finding Implementation.
[0041] Based on the adaptive response threshold obtained in step S104, the SuperPoint algorithm is improved with region adaptation. During the network forward propagation stage, the SuperPoint detection head outputs a tensor of size H / 8×W / 8×65. First, this output is softmax normalized to obtain the probability distribution. Then, the dustbin channel is removed to obtain the corner response map. In the improved method, the input image is first divided into M×N regions using a 32×32 pixel grid. For each region, the corresponding adaptive response threshold is calculated, and an adaptive threshold map is constructed. Since the response map size is 1 / 8 of the original image, the threshold map is downsampled to H / 8×W / 8 size.
[0042] In the feature point selection stage, a globally uniform threshold is no longer used. Instead, the response value of each feature point is compared with the adaptive response threshold of its corresponding region. Only feature points with a response value greater than the adaptive response threshold are retained. For candidate points that meet the criteria, non-maximum suppression (NMS) is performed within their 3×3 neighborhood to ensure the local uniqueness of the feature points. Then, the corresponding 256-dimensional feature descriptor is extracted. To further enhance the robustness of feature points in weakly textured regions, for regions with a region importance greater than 0.6, if the feature point density is still insufficient (e.g., less than 3 feature points per 32×32 grid), the threshold for that region is further reduced to [value missing]. Furthermore, additional feature points are extracted until the minimum density requirement is met, ultimately resulting in a more spatially balanced set of feature points.
[0043] The complete process of welding robot positioning based on the improved SuperPoint algorithm is as follows: First, in the offline stage, a reference image of a standard workpiece is acquired, and feature points and descriptors (such as...) are extracted using the improved algorithm. Figure 4 The image shows the feature point extraction results of the improved algorithm, as follows: Figure 3The image shows the feature point extraction results of the existing algorithm, and a reference feature library is constructed. During online operation, the robot moves to the observation position, acquires the current workpiece image, and performs preprocessing. The improved algorithm is used to extract feature points and descriptors from the current image. Then, the nearest neighbor distance ratio (NNDR) method is used for feature matching, with a distance ratio threshold of 0.8 to screen reliable matching point pairs. The RANSAC algorithm is used to estimate the homography matrix for the matching point pairs, with an interior point threshold of 3 pixels and a maximum iteration count of 1000. Based on the homography matrix, combined with the camera calibration parameters and the depth data obtained in step S101, the 3D pose of the workpiece relative to the camera is solved using the PnP (Perspective-n-Point) algorithm, and nonlinear optimization is performed using the Levenberg-Marquardt optimization algorithm. The solved pose transformation is applied to the robot's inverse kinematics solution to generate the corrected welding trajectory. The robot executes the corrected trajectory, and the welding torch accurately reaches the weld start position, completing the autonomous positioning process.
[0044] The present invention also provides a welding robot positioning system based on visual feature matching. The system includes a processor and a memory, the memory storing computer program instructions. When the processor executes the computer program instructions, it implements the welding robot positioning method based on visual feature matching according to the first aspect of the present invention.
[0045] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and therefore will not be described in detail here.
[0046] 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 on such a computer-readable medium.
[0047] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A positioning method for welding robots based on visual feature matching, characterized in that, include: The process involves acquiring an image and depth data containing the weld seam, preprocessing the image, and dividing it into multiple grid cells. The texture complexity spatial heterogeneity of each grid cell is calculated. This spatial heterogeneity integrates the gradient intensity and orientation diversity of pixels within a local region to quantify and distinguish the richness of texture in the image. A regional importance score for each grid cell is constructed, measuring its contribution to the weld seam localization task. The SuperPoint algorithm is used to extract feature points from the image, obtaining a response map containing the response values of each feature point. An adaptive response threshold is constructed for each grid cell. This adaptive response threshold is positively correlated with the ratio of the base threshold, the mean response value within the grid cell, and the mean global response value of the image, and negatively correlated with the regional importance score. Feature points with response values greater than the corresponding adaptive response threshold are selected as final feature points. These final feature points are matched with feature points in a reference image to calculate the 3D pose of the workpiece in the current image. The robot's welding trajectory is then corrected based on the 3D pose. The formula for calculating the texture complexity spatial heterogeneity is as follows: In the formula: Indicates the first Texture complexity spatial heterogeneity of each grid cell; Indicates the first The gradient magnitude within a grid cell is greater than a threshold. The proportion of pixels, with values ranging from 0. , where the threshold The gradient magnitude map of the entire image is obtained by calculating it using the Otsu thresholding method; Indicates the first Shannon entropy in the gradient direction within each grid cell; Indicates the first The normalized standard deviation of gray values within each grid cell, with a value range of [value range missing]. ; The formula for calculating regional importance is as follows: In the formula: Indicates the first Regional importance of each grid cell; For the first Texture complexity spatial heterogeneity of each grid cell; This represents the maximum value of the texture complexity spatial heterogeneity across all mesh cells; Indicates the first Normalized Euclidean distance from the center point of each grid cell to the nearest weld edge; Indicates the first The proportion of edge pixels within a grid cell.
2. The welding robot positioning method based on visual feature matching according to claim 1, characterized in that, The texture complexity spatial heterogeneity of each grid cell is calculated, including: for any grid cell, calculating the Shannon entropy of the gradient direction within the grid cell and the proportion of pixels with gradient magnitudes greater than a threshold within the grid cell. The texture complexity spatial heterogeneity of the grid cell is positively correlated with the Shannon entropy and the proportion of pixels.
3. The welding robot positioning method based on visual feature matching according to claim 1, characterized in that, The regional importance of each grid cell is constructed, including: the regional importance is negatively correlated with the spatial heterogeneity of texture complexity, negatively correlated with the distance from the center of the grid cell to the nearest candidate weld edge, and positively correlated with the number of candidate weld edge pixels contained in the grid cell.
4. The welding robot positioning method based on visual feature matching according to claim 1, characterized in that, The method for obtaining candidate weld edges includes: based on the index map composed of the texture complexity space heterogeneity, using the Otsu method to divide the index map into texture-rich regions and weak texture regions, and using the Canny edge detection algorithm on the weak texture regions to extract the candidate weld edges.
5. The welding robot positioning method based on visual feature matching according to claim 2, characterized in that, The proportion of pixels within the grid cell whose gradient magnitude is greater than a threshold includes: obtaining the threshold by processing the gradient magnitude map of the entire image using the Otsu thresholding method.
6. The welding robot positioning method based on visual feature matching according to claim 1, characterized in that, The method for obtaining the basic threshold includes: extracting the corner response map of the intermediate layer of the SuperPoint network, and taking the 50th percentile of all corner response values in the corner response map as the basic threshold.
7. The welding robot positioning method based on visual feature matching according to claim 1, characterized in that, Also includes: For regions whose importance is greater than a preset importance threshold, feature point density detection is performed. When the detected feature point density is lower than the preset density threshold, the value of the adaptive response threshold of the corresponding region is reduced, and additional feature points are extracted until the minimum density requirement is met.
8. The welding robot positioning method based on visual feature matching according to claim 1, characterized in that, Calculating the 3D pose of the workpiece in the current image includes: matching the final feature points with the feature points of the reference image using the nearest neighbor distance ratio method to obtain matching point pairs; based on the matching point pairs, estimating the homography matrix using the RANSAC algorithm and eliminating outliers; combining the homography matrix, camera calibration parameters, and depth data, solving the 3D pose of the workpiece using the PnP algorithm; and performing nonlinear optimization using the Levenberg-Marquardt algorithm.
9. The welding robot positioning method based on visual feature matching according to claim 1, characterized in that, The preprocessing includes: performing distortion correction on the image using the camera intrinsic and extrinsic parameter matrix, enhancing the local contrast of the corrected image using the Adaptive Histogram Equalization (CLAHE) algorithm, and smoothing the enhanced image using a bilateral filter.
10. A welding robot positioning system based on visual feature matching, comprising a processor and a memory, characterized in that, The memory stores a computer program, and the processor executes the computer program to implement the welding robot positioning method based on visual feature matching as described in any one of claims 1-9.
Citation Information
Patent Citations
Industrial equipment anomaly detection method and system based on machine vision
CN120339254A
External facade crack detection method and device based on multi-scale feature fusion, equipment and medium
CN120635015A