Method and apparatus for determining weld inflection point, processor and welding robot

By determining the effective pixel points and target linear segments in the weld image, the problem of determining the inflection point of weld in complex scenarios is solved, and efficient and accurate inflection point positioning is achieved, which is suitable for welding processes in complex scenarios.

CN113902699BActive Publication Date: 2025-06-13BEIJING BO TSING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111166725.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2025-06-13
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately determine the inflection point of the weld in complex scenarios, especially when the surface of the steel plate has anticorrosion paint, polishing and reflection, inconsistent brightness, pits, welding slag, etc.

Method used

By obtaining the weld image, the grayscale value of each column of pixel points is determined, and at least two target linear segments are determined based on these effective pixel points. These target linear segments meet preset conditions, such as being positioned in a predetermined area, having a width greater than a predetermined value, and a gray value greater than a predetermined value. Then, the weld inflection point is determined based on the position of the target linear segment.

Benefits of technology

This method can efficiently and accurately determine the weld inflection points, adapt to laser stripes in complex scenarios, avoid the need for artificial threshold setting, and improve practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113902699B_ABST
    Figure CN113902699B_ABST
Patent Text Reader

Abstract

The present application provides a method and apparatus for determining a weld inflection point, a processor, and a welding robot. The determination method includes: obtaining a weld image; obtaining the gray values of the pixel points in each column of the weld image to determine a plurality of valid pixel points, where the number of valid pixel points in each column of pixel points is less than or equal to 1, and the valid pixel point is the pixel point with the maximum gray value among the pixel points in each column; determining at least two target straight line segments based on the plurality of consecutive valid pixel points, and the at least two target straight line segments satisfy a first preset condition, and the first preset condition at least includes: the position of the region between the two target straight line segments is within a predetermined position region, the width of the region between the two target straight line segments is greater than a predetermined width, and there are pixel points with gray values greater than a predetermined gray value between the two target straight line segments; determining the position of the target inflection point according to the positions of the at least two target straight line segments, thereby solving the problem in the prior art that it is difficult to determine the inflection point of the weld in a complex scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of welding, and in particular, to a method and device for determining a weld inflection point, a computer-readable storage medium, a processor, and a welding robot. Background Art

[0002] Weld seam tracking: A line laser projects onto the weld seam, a camera collects the weld seam laser stripe image, detects and identifies the inflection points in the image, and controls the robot to track the weld seam. In actual applications, there are some influencing factors. For example, the steel plate may have anti-corrosion paint, the surface of the weld seam will be polished, the laser stripe in the image will have problems such as polishing reflection and inconsistent brightness; the surface of the steel plate of the weld seam will have unevenness such as pits and welding slag; the brightness of the laser may become dim, and the welding slag splashing onto the protective glass sheet at the front end of the laser or the camera will also affect the width of the laser stripe in the image.

[0003] In existing methods, many extract laser stripes and detect inflection points by means of foreground segmentation, combining the contour and shape analysis of the foreground, etc. These methods are sensitive to thresholds and have high requirements for the brightness and consistency of the laser stripe in the image.

[0004] Therefore, there is an urgent need for a method for determining the inflection point of a weld seam that can adapt to laser stripes in complex scenarios.

[0005] The above information disclosed in the background art section is only used to enhance the understanding of the background art of the technology described in this article. Therefore, the background art may contain certain information that is not prior art known to those skilled in the art in this country. Summary of the Invention

[0006] The main purpose of the present application is to provide a method and device for determining a weld inflection point, a computer-readable storage medium, a processor, and a welding robot, so as to solve the problem that it is difficult to determine the inflection point of a weld seam in a complex scenario in the prior art.

[0007] According to one aspect of an embodiment of the present invention, a method for determining a weld inflection point is provided, including: obtaining a weld image; obtaining the gray values of the pixel points in each column of the weld image, determining a plurality of valid pixel points, the number of the valid pixel points in each column of the pixel points being less than or equal to 1, and the valid pixel points being the pixel points with extremely large gray values in each column of the pixel points; determining at least two target line segments according to a plurality of consecutive valid pixel points, and the at least two target line segments satisfying a first preset condition, the first preset condition at least including: the position of the region between the two target line segments being within a predetermined position region, the width of the region between the two target line segments being greater than a predetermined width, and there being pixel points with gray values greater than a predetermined gray value between the two target line segments; determining the position of a target inflection point according to the positions of the at least two target line segments.

[0008] Optionally, obtaining a weld image includes: obtaining a laser stripe image of the weld; processing the laser stripe image to obtain the weld image.

[0009] Optionally, obtaining the gray values of the pixel points in each column of the weld image and determining a plurality of valid pixel points includes: filtering the pixel points in each column of the weld image to obtain the filtered pixel points in each column; extracting the extreme points of the filtered pixel points in each column to obtain a plurality of extreme points, and determining at least some of the plurality of extreme points as the valid pixel points.

[0010] Optionally, determining at least some of the plurality of extreme points as the valid pixel points includes: determining whether the plurality of extreme points satisfy a second preset condition, the second preset condition including at least one of the following: whether the gray value of the extreme point is greater than the predetermined gray value, and whether the position of the extreme point is within the predetermined position region; determining the extreme points that satisfy the second preset condition as the valid pixel points.

[0011] Optionally, determining at least two target line segments according to a plurality of consecutive valid pixel points includes: determining a plurality of consecutive line segments according to the positions of the plurality of consecutive valid pixel points, the straightness of the line segments being less than a predetermined value; processing the plurality of consecutive line segments to obtain at least two target line segments, and the plurality of consecutive line segments satisfying a third preset condition, the third preset condition at least including: the width between two adjacent line segments being less than the predetermined width, and the height difference between two adjacent line segments being less than a predetermined height difference.

[0012] Optionally, when determining the two target line segments based on multiple consecutive ones of the valid pixel points, determining the position of the target inflection point according to the positions of at least two of the target line segments includes: determining whether there is a groove between two adjacent ones of the target line segments; and when it is determined that there is a groove between the two target line segments, determining the endpoints of the two target line segments on the side close to the groove as the target inflection point.

[0013] Optionally, determining whether there is a groove between two adjacent ones of the target line segments includes: obtaining a target image between the two target line segments; inputting the target image into a groove classification model to obtain an output result, and when the output result indicates that the target image is a groove image, determining that there is the groove between the two target line segments, where the groove classification model is obtained by training using a neural network model.

[0014] Optionally, when determining the two target line segments based on multiple consecutive ones of the valid pixel points, determining the position of the target inflection point according to the positions of at least two of the target line segments includes: determining two fitting lines according to multiple consecutive ones of the valid pixel points, where the fitting lines and the target line segments correspond one by one; determining a search area according to the positions of the fitting lines and the corresponding target line segments, where the width of the search area is greater than or equal to the distance between the first endpoint of the target line segment and a predetermined point on the corresponding fitting line, the predetermined point being the point on the fitting line having the same abscissa as the first endpoint, the search area including the first endpoint, the first endpoint being the endpoint close to the other target line segment; traversing the pixel points in the search area in the direction close to the other target line, and determining the target pixel point as one of the target inflection points at least when the pixel value of the target pixel point is greater than a first pixel threshold and the pixel value of the next pixel point is less than a second pixel threshold, where the first pixel threshold is greater than the second pixel threshold.

[0015] According to another aspect of the embodiments of the present invention, there is also provided a device for determining a weld inflection point, including: a first acquisition unit configured to acquire a weld image; a second acquisition unit configured to acquire the gray values of the pixel points in each column of the weld image, determine a plurality of valid pixel points, the number of the valid pixel points in each column of the pixel points being less than or equal to 1, and the valid pixel point being the pixel point with the maximum gray value among the pixel points in each column; a first determination unit configured to determine at least two target straight line segments according to a plurality of consecutive valid pixel points, and the at least two target straight line segments satisfy a first preset condition, the first preset condition at least including: the position of the region between the two target straight line segments is within a predetermined position region, the width of the region between the two target straight line segments is greater than a predetermined width, and there are pixel points with gray values greater than a predetermined gray value between the two target straight line segments; a second determination unit configured to determine the position of the target inflection point according to the positions of the at least two target straight line segments.

[0016] According to yet another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and the program executes any of the above methods.

[0017] According to still another aspect of the embodiments of the present invention, there is also provided a processor, and the processor is used to run a program, where the program executes any of the above methods when running.

[0018] According to one aspect of the embodiments of the present invention, there is also provided a welding robot, including a welding body and a device for determining a weld inflection point, and the device for determining a weld inflection point is used to execute any of the above methods.

[0019] In an embodiment of the present invention, in the method for determining the weld inflection point, first, the gray values of the pixel points in each column of the weld image are obtained, and a plurality of valid pixel points are determined according to the gray values of the pixel points in each column. Then, at least two target line segments are determined according to the plurality of consecutive valid pixel points. Finally, when the two target line segments meet the first preset condition, the position of the target inflection point is determined according to the positions of the at least two target line segments, where the valid pixel points are the pixel points with the maximum gray value in each column of the pixel points, and the first preset condition at least includes: the position of the region between the two target line segments is within a predetermined position region, the width of the region between the two target line segments is greater than a predetermined width, and there are pixel points with gray values greater than a predetermined gray value between the two target line segments. In this solution, at least two target line segments are determined according to the obtained plurality of valid pixel points, and the position of the target inflection point is determined by the at least two determined target line segments, which ensures that the position of the target inflection point can be determined more efficiently and accurately. Compared with the method of setting thresholds to determine the inflection point in the prior art, this solution does not require artificial setting of many thresholds and can adapt to the situation of laser stripes in complex scenarios, with higher practicability, thus solving the problem that it is difficult to determine the inflection point of the weld in complex scenarios in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation to this application. In the drawings:

[0021] Figure 1 FIG. shows a schematic diagram of a method for determining a weld inflection point according to an embodiment of the present application;

[0022] Figure 2 FIG. shows a schematic diagram of a device for determining a weld inflection point according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will refer to the drawings and combine the embodiments to detail this application.

[0024] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

[0025] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so as to implement the embodiments of this application described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0026] As mentioned in the background art, it is difficult to determine the inflection points of weld seams in complex scenarios in the prior art. To solve the above problems, in a typical implementation manner of this application, a method for determining the inflection points of weld seams, a determining device, a computer-readable storage medium, a processor and a welding robot are provided.

[0027] According to an embodiment of this application, a method for determining the inflection points of weld seams is provided.

[0028] Figure 1 is a flowchart of the method for determining the inflection points of weld seams according to an embodiment of this application. As Figure 1 shown, the method includes the following steps:

[0029] Step S101, obtaining a weld seam image;

[0030] Step S102, obtaining the gray values of the pixel points in each column of the above weld seam image, determining a plurality of valid pixel points, the number of the above valid pixel points in each column of the above pixel points is less than or equal to 1, and the above valid pixel points are the pixel points with extremely large gray values among the above pixel points in each column;

[0031] Step S103, determining at least two target straight line segments according to a plurality of consecutive above valid pixel points, and at least two above target straight line segments satisfy a first preset condition, and the first preset condition at least includes: the position of the area between the two above target straight line segments is within a predetermined position area, the width of the area between the two above target straight line segments is greater than a predetermined width, and there are above pixel points with gray values greater than a predetermined gray value between the two above target straight line segments;

[0032] Step S104, determining the position of the target inflection point according to the positions of at least two above target straight line segments.

[0033] In the method for determining the inflection point of the above-mentioned weld seam, first, the gray values of the pixel points in each column of the weld seam image are obtained, and a plurality of valid pixel points are determined according to the gray values of the pixel points in each column. Then, at least two target line segments are determined according to the plurality of consecutive valid pixel points. Finally, when the two target line segments meet the first preset condition, the position of the target inflection point is determined according to the positions of the at least two target line segments. Among them, the valid pixel points are the pixel points with the maximum gray value among the pixel points in each column. The first preset condition at least includes: the position of the area between the two target line segments is within a predetermined position area, the width of the area between the two target line segments is greater than a predetermined width, and there are pixel points with gray values greater than a predetermined gray value between the two target line segments. In this solution, at least two target line segments are determined according to the obtained plurality of valid pixel points, and the position of the target inflection point is determined by the at least two determined target line segments, which ensures that the position of the target inflection point can be determined more efficiently and accurately. Compared with the method of setting thresholds to determine the inflection point in the prior art, this solution does not require artificial setting of many thresholds and can adapt to the situation of laser stripes in complex scenarios, with higher practicability, thus solving the problem that it is difficult to determine the inflection point of the weld seam in complex scenarios in the prior art.

[0034] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0035] In an embodiment of the present application, obtaining the weld seam image includes: obtaining the laser stripe image of the above-mentioned weld seam; processing the above-mentioned laser stripe image to obtain the above-mentioned weld seam image. In this embodiment, the obtained laser stripe image is processed, which ensures that the quality of the obtained weld seam image is good. Subsequently, the gray values of the pixel points in each column are obtained according to the weld seam image, further ensuring that the gray values of the pixel points in each column obtained are relatively accurate.

[0036] Specifically, in the actual application process, processing the above-mentioned obtained laser stripe image includes, but is not limited to: arc splash removal processing.

[0037] In another embodiment of the present application, the gray values of the pixel points in each column of the above weld image are obtained, and a plurality of valid pixel points are determined, including: filtering the pixel points in each column of the above weld image to obtain the pixel points in each column after filtering; extracting the extreme points of the pixel points in each column after filtering to obtain a plurality of the above extreme points, and determining at least some of the plurality of the above extreme points as the above valid pixel points. In this embodiment, the pixel points in each column of the weld image are filtered, which ensures that the filtered weld image is relatively smooth. Subsequently, the extreme points are extracted based on the filtered pixel points, and the valid pixel points are determined based on the extreme points, which further ensures that the determined valid pixel points are relatively accurate.

[0038] Of course, in the actual application process, in order to further ensure that the determined valid pixel points are more accurate, in another embodiment of the present application, determining at least some of the plurality of the above extreme points as the above valid pixel points includes: determining whether the plurality of the above extreme points meet the second preset condition, and the second preset condition includes at least one of the following: whether the gray value of the extreme point is greater than the above predetermined gray value, and whether the position of the extreme point is within the above predetermined position area; determining the extreme points that meet the above second preset condition as the above valid pixel points.

[0039] Specifically, in the actual application process, each column of the weld image is filtered, the extreme points and the positions where the extreme points are located in each column are extracted, and the effectiveness of the extreme points and the positions where the extreme points are located is screened. For example, the extreme points with too low extreme values, the extreme points close to the boundary of the weld image, or the extreme points with an intensity distribution less than the predetermined intensity are deleted, which can reduce the influence of invalid extreme points on the determination of the target straight line segment subsequently, further ensuring that the determined target straight line segment is relatively accurate, and further ensuring that the determined target inflection point is relatively accurate.

[0040] In still another embodiment of the present application, determining at least two target straight line segments based on a plurality of consecutive above valid pixel points includes: determining a plurality of consecutive straight line segments based on the positions of the plurality of consecutive above valid pixel points, and the straightness of the straight line segments is less than a predetermined value; processing the plurality of consecutive above straight line segments to obtain at least two target straight line segments, and the plurality of consecutive above straight line segments meet the third preset condition, and the third preset condition at least includes: the width between two adjacent above straight line segments is less than the above predetermined width, and the height difference between two adjacent above straight line segments is less than a predetermined height difference. In this embodiment, a plurality of consecutive straight line segments are determined based on the positions of the valid pixel points, which ensures that the determined valid straight line segments are relatively accurate. Subsequently, the plurality of consecutive straight line segments are processed, further ensuring that the determined at least two target straight line segments are relatively accurate.

[0041] In the actual application process, processing multiple consecutive straight line segments as described above includes, but is not limited to: merging or extending multiple consecutive straight line segments. Additionally, the present application does not limit the above-mentioned predetermined value of the straightness, as long as the straight line segments can be determined.

[0042] In a specific embodiment of the present application, according to the positions of the determined valid extreme points, multiple consecutive horizontal straight line segments are calculated. Among them, the rules for the straight line segments are that the length of the line segment is greater than one pixel point, the angle of the line segment is less than a certain angle, and the straightness of the line segment is less than a certain number of pixels. Then, the multiple extracted horizontal straight line segments are merged, which can better adapt to the situation where the laser stripe is very dark or interrupted, and the multiple horizontal straight line segments are extended, which can adapt to the situation of the white area, that is, the situation where the edge of the weld is too bright.

[0043] In order to ensure that the determined target inflection points are more accurate, in an embodiment of the present application, when determining two target straight line segments according to multiple consecutive valid pixel points as described above, determining the position of the target inflection point according to the positions of at least two target straight line segments includes: determining whether there is a groove between two adjacent target straight line segments; when it is determined that there is a groove between the two target straight line segments, determining the endpoints of the two target straight line segments close to the groove side as the target inflection points.

[0044] In another embodiment of the present application, determining whether there is a groove between two adjacent target straight line segments includes: obtaining the target image between the two target straight line segments; inputting the target image into the groove classification model to obtain the output result. When the output result indicates that the target image is a groove image, it is determined that there is a groove between the two target straight line segments. The groove classification model is trained using a neural network model. In this embodiment, the target image obtained between the target straight line segments is input into the groove classification model. When it is determined that the target image is a groove image, it is determined that there is a groove between the two target straight line segments, which ensures that the groove can be determined more accurately. Subsequently, when there is a groove, the endpoints of the two target straight line segments close to the groove side are determined as the target inflection points, which further ensures that the determined target inflection points are more accurate.

[0045] In a specific embodiment of the present application, a target image is obtained. The above target image includes a groove image, that is, the above groove image is at least part of the above target image. The above target image is input into the above groove classification model for recognition. When the output result indicates that the above target image is a groove image, a plurality of effective pixel points on both sides of the above groove image are calculated, and a plurality of continuous straight line segments are obtained on both sides of the groove. Then, the obtained straight line segments are merged or extended to obtain two target straight line segments on both sides of the groove image. According to the two obtained target straight line segments, the endpoint close to one side of the groove is determined as the target inflection point.

[0046] In order to further ensure that the determined target inflection point is more accurate, in an embodiment of the present application, when two above target straight line segments are determined according to a plurality of continuous above effective pixel points, the position of the target inflection point is determined according to the positions of at least two above target straight line segments, including: determining two fitting straight lines according to a plurality of continuous above effective pixel points, and the above fitting straight lines and the above target straight line segments correspond one by one; determining a search area according to the positions of the above fitting straight lines and the corresponding above target straight line segments, and the width of the above search area is greater than or equal to the distance between the first endpoint of the above target straight line segment and a predetermined point on the corresponding above fitting straight line, and the above predetermined point is the point on the above fitting straight line with the same abscissa as the above first endpoint. The above search area includes the above first endpoint, and the above first endpoint is the endpoint close to the other above target straight line segment; traversing the above pixel points in the above search area in the direction close to the other above target straight line. At least when the pixel value of the target pixel point is greater than the first pixel threshold and the pixel value of the next above pixel point is less than the second pixel threshold, the above target pixel point is determined as one above target inflection point, and the above first pixel threshold is greater than the above second pixel threshold.

[0047] In a specific embodiment of the present application, traversing the above pixel points in the above search area in the direction close to the other above target straight line can be achieved by traversing the above pixel points row by row; in addition, there are many methods for determining the target inflection point by traversing the above pixel points, and it can also be determined in combination with the situation of the inflection point and the groove. For example, the first method: when the pixel point before the above target pixel point is greater than the above first pixel threshold and the pixel point after the above target pixel point is less than the second pixel threshold, the above target pixel point is determined as the target inflection point; the second method: fitting the pixel points below the above target pixel point into a line segment. When the length of the above line segment is greater than a predetermined length, the above target pixel point is greater than the above first pixel threshold, and the pixel point after the above target pixel point is less than the above second pixel threshold, the above target pixel point is determined as the target inflection point.

[0048] The embodiment of the present application also provides a device for determining the inflection point of a weld seam. It should be noted that the device for determining the inflection point of the weld seam in the embodiment of the present application can be used to execute the method for determining the inflection point of the weld seam provided by the embodiment of the present application. The following introduces the device for determining the inflection point of the weld seam provided by the embodiment of the present application.

[0049] Figure 2 It is a schematic diagram of the device for determining the inflection point of the weld seam according to the embodiment of the present application. As Figure 2 shown, the device includes:

[0050] A first acquisition unit 10, configured to acquire a weld seam image;

[0051] A second acquisition unit 20, configured to acquire the gray values of the pixel points in each column of the above weld seam image, determine a plurality of valid pixel points, the number of the above valid pixel points in each column of the above pixel points is less than or equal to 1, and the above valid pixel points are the pixel points with extremely large gray values among the above pixel points in each column;

[0052] A first determination unit 30, configured to determine at least two target straight line segments according to a plurality of consecutive above valid pixel points, and at least two above target straight line segments satisfy a first preset condition, and the first preset condition at least includes: the position of the region between the two above target straight line segments is within a predetermined position region, the width of the region between the two above target straight line segments is greater than a predetermined width, and there are above pixel points with gray values greater than a predetermined gray value between the two above target straight line segments;

[0053] A second determination unit 40, configured to determine the position of the target inflection point according to the positions of at least two above target straight line segments.

[0054] In the above device for determining the inflection point of the weld seam, the first acquisition unit is used to acquire the weld seam image; the second acquisition unit is used to acquire the gray values of the pixel points in each column of the above weld seam image, determine a plurality of effective pixel points, and the number of the above effective pixel points in each column of the above pixel points is less than or equal to 1. The above effective pixel points are the pixel points with extremely large gray values among the above pixel points in each column; the first determination unit is used to determine at least two target straight line segments according to a plurality of consecutive above effective pixel points, and at least two of the above target straight line segments meet the first preset condition. The above first preset condition at least includes: the position of the area between two of the above target straight line segments is within a predetermined position area, the width of the area between two of the above target straight line segments is greater than a predetermined width, and there are above pixel points with gray values greater than a predetermined gray value between two of the above target straight line segments; the second determination unit is used to determine the position of the target inflection point according to the positions of at least two of the above target straight line segments. In this solution, at least two target straight line segments are determined according to the acquired plurality of effective pixel points, and the position of the target inflection point is determined by the at least two determined target straight line segments. This ensures that the position of the target inflection point can be determined more efficiently and accurately. Compared with the method of setting thresholds to determine the inflection point in the prior art, this solution does not require a large number of artificial thresholds to be set, and can adapt to the situation of laser stripes in complex scenarios, with higher practicability, thus solving the problem that it is difficult to determine the inflection point of the weld seam in complex scenarios in the prior art.

[0055] In an embodiment of the present application, the first acquisition unit further includes an acquisition module and a first processing module. Among them, the above acquisition module is used to acquire the laser stripe image of the above weld seam; the above first processing module is used to process the above laser stripe image to obtain the above weld seam image. In this embodiment, the acquired laser stripe image is processed, which ensures that the quality of the obtained weld seam image is good, and further ensures that the gray values of the pixel points in each column obtained subsequently are relatively accurate.

[0056] Specifically, in the actual application process, processing the above acquired laser stripe image includes, but is not limited to: arc splash removal processing.

[0057] In another embodiment of the present application, the second acquisition unit further includes a filtering module and an extraction module. The filtering module is configured to filter the pixel points of each column of the weld image to obtain the pixel points of each column after filtering. The extraction module is configured to extract the extreme points of the pixel points of each column after filtering to obtain a plurality of extreme points, and determine at least some of the plurality of extreme points as the valid pixel points. In this embodiment, the pixel points of each column of the weld image are filtered, which ensures that the filtered weld image is relatively smooth. Subsequently, the extreme points are extracted based on the filtered pixel points, and the valid pixel points are determined based on the extreme points, which further ensures that the determined valid pixel points are relatively accurate.

[0058] Certainly, in the actual application process, in order to further ensure that the determined valid pixel points are more accurate, in another embodiment of the present application, the extraction module further includes a first determination sub-module and a second determination sub-module. The first determination sub-module is configured to determine whether a plurality of the extreme points meet a second preset condition, and the second preset condition includes at least one of the following: whether the gray value of the extreme point is greater than the predetermined gray value, and whether the position of the extreme point is within the predetermined position area. The second determination sub-module is configured to determine the extreme points that meet the second preset condition as the valid pixel points.

[0059] Specifically, in the actual application process, each column of the weld image is filtered, the extreme points of each column and the positions where the extreme points are located are extracted, and the effectiveness of the extreme points and the positions where the extreme points are located is screened. For example, the extreme points with too low extreme values, extreme points close to the boundary of the weld image, or extreme points with an intensity distribution less than the predetermined intensity are deleted. This can reduce the influence of invalid extreme points on the determination of the target straight line segment subsequently, further ensuring that the determined target straight line segment is relatively accurate, and further ensuring that the determined target inflection point is relatively accurate.

[0060] In still another embodiment of the present application, the first determination unit further includes a first determination module and a second processing module. The first determination module is configured to determine a plurality of consecutive straight line segments according to the positions of a plurality of consecutive valid pixel points, and the straightness of the straight line segments is less than a predetermined value. The second processing module is configured to process the plurality of consecutive straight line segments to obtain at least two target straight line segments. The plurality of consecutive straight line segments satisfy a third preset condition, and the third preset condition at least includes: the width between two adjacent straight line segments is less than the predetermined width, and the height difference between two adjacent straight line segments is less than a predetermined height difference. In this embodiment, a plurality of consecutive straight line segments are determined according to the positions of valid pixel points, which ensures that the determined valid straight line segments are relatively accurate. Subsequently, the plurality of consecutive straight line segments are processed, which further ensures that at least two determined target straight line segments are relatively accurate.

[0061] In the actual application process, processing the plurality of consecutive straight line segments includes, but is not limited to: merging or extending the plurality of consecutive straight line segments. In addition, the present application does not limit the predetermined value of the straightness, as long as the straight line segments can be determined.

[0062] In a specific embodiment of the present application, according to the positions of the determined valid extreme points, a plurality of consecutive horizontal straight line segments are calculated. The rules for the straight line segments are that the length of the line segment is greater than one pixel point, the angle of the line segment is less than a certain angle, and the straightness of the line segment is less than a certain pixel. Then, the extracted plurality of horizontal straight line segments are merged, which can better adapt to the situation where the laser stripe is very dark or interrupted. The plurality of horizontal straight line segments are extended, which can adapt to the situation of the white area, that is, the situation where the edge of the weld is too bright.

[0063] In order to ensure that the determined target inflection points are more accurate, in an embodiment of the present application, when determining two target straight line segments according to a plurality of consecutive valid pixel points, the second determination unit further includes a second determination module and a third determination module. The second determination module is configured to determine whether there is a groove between two adjacent target straight line segments. The third determination module is configured to, when it is determined that there is a groove between the two target straight line segments, determine the endpoints of the two target straight line segments close to the groove side as the target inflection points.

[0064] In another embodiment of the present application, the second determination module further includes an acquisition sub-module and an output sub-module. The acquisition sub-module is configured to acquire a target image between two target straight line segments. The output sub-module is configured to input the target image into a groove classification model to obtain an output result. When the output result indicates that the target image is a groove image, it is determined that there is a groove between the two target straight line segments. The groove classification model is obtained by training using a neural network model. In this embodiment, the target image between the acquired target straight line segments is input into the groove classification model. When it is determined that the target image is a groove image, it is determined that there is a groove between the two target straight line segments, which ensures that the groove can be determined more accurately. Subsequently, when there is a groove, the endpoints of the two target straight line segments close to the groove side are determined as target inflection points, which further ensures that the determined target inflection points are more accurate.

[0065] In a specific embodiment of the present application, a target image is acquired. The target image includes a groove image, that is, the groove image is at least part of the target image. The target image is input into the groove classification model for recognition. When the output result indicates that the target image is a groove image, a plurality of effective pixel points on both sides of the groove image are calculated. A plurality of continuous straight line segments are obtained on both sides of the groove, and then the obtained straight line segments are merged or extended to obtain two target straight line segments on both sides of the groove image. The endpoints close to the groove side are determined as target inflection points according to the two obtained target straight line segments.

[0066] To further ensure that the determined target inflection points are more accurate, in an embodiment of the present application, when determining two target straight line segments according to a plurality of continuous effective pixel points, the second determination unit further includes a fourth determination module, a fifth determination module, and a sixth determination module. The fourth determination module is configured to determine two fitting straight lines according to the plurality of continuous effective pixel points. The fitting straight lines and the target straight line segments correspond one by one. The fifth determination module is configured to determine a search region according to the positions of the fitting straight lines and the corresponding target straight line segments. The width of the search region is greater than or equal to the distance between the first endpoint of the target straight line segment and a predetermined point on the corresponding fitting straight line. The predetermined point is the point on the fitting straight line with the same abscissa as the first endpoint. The search region includes the first endpoint, and the first endpoint is the endpoint close to the other target straight line segment. The sixth determination module is configured to traverse the pixel points in the search region in the direction close to the other target straight line. At least when the pixel value of the target pixel point is greater than a first pixel threshold and the pixel value of the next pixel point is less than a second pixel threshold, the target pixel point is determined as one of the target inflection points, and the first pixel threshold is greater than the second pixel threshold.

[0067] In a specific embodiment of the present application, traversing the pixel points in the above search area in a direction close to the other target straight line can traverse the pixel points row by row; in addition, there are many methods for determining the target inflection point by traversing the pixel points, and it can also be determined in combination with the situation of the inflection point and the groove. For example, the first method: when the previous pixel point of the target pixel point is greater than the first pixel threshold and the next pixel point of the target pixel point is less than the second pixel threshold, determine the target pixel point as the target inflection point; the second method: fitting the pixel points below the target pixel point into a line segment, and when the length of the line segment is greater than a predetermined length, the target pixel point is greater than the first pixel threshold, and the next pixel point of the target pixel point is less than the second pixel threshold, determine the target pixel point as the target inflection point.

[0068] The device for determining the weld inflection point includes a processor and a memory. The first acquisition unit, the second acquisition unit, the first determination unit, the second determination unit, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.

[0069] The processor contains a kernel, and the kernel retrieves the corresponding program units from the memory. One or more kernels can be set, and by adjusting the kernel parameters, the problem of difficultly determining the inflection point of the weld in a complex scenario in the prior art can be solved.

[0070] The memory may include non-permanent memory in a computer-readable medium, forms such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one storage chip.

[0071] The embodiment of the present invention provides a storage medium, on which a program is stored, and when the program is executed by a processor, the method for determining the weld inflection point is implemented.

[0072] The embodiment of the present invention provides a processor, and the processor is used to run a program. When the program runs, the method for determining the weld inflection point is executed.

[0073] In a typical embodiment of the present application, a welding robot is further provided. The welding robot includes a welding body and a device for determining the inflection point of the weld seam. The above-mentioned device for determining the inflection point of the weld seam can execute the above-mentioned method for determining the inflection point of the weld seam. In the above-mentioned method for determining the inflection point of the weld seam, at least two target straight line segments are determined according to the obtained multiple effective pixel points, and the position of the target inflection point is determined through the at least two determined target straight line segments. This ensures that the position of the target inflection point can be determined more efficiently and accurately. Compared with the method of setting thresholds to determine the inflection point in the prior art, this solution does not require artificial setting of many thresholds and can adapt to the situation of laser stripes in complex scenarios, having higher practicability, thus solving the problem that it is difficult to determine the inflection point of the weld seam in complex scenarios in the prior art.

[0074] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, it realizes at least the following steps:

[0075] Step S101, acquire a weld seam image;

[0076] Step S102, acquire the gray values of the pixel points in each column of the above-mentioned weld seam image, determine multiple effective pixel points, the number of the above-mentioned effective pixel points in each column of the above-mentioned pixel points is less than or equal to 1, and the above-mentioned effective pixel points are the pixel points with extremely large gray values among the above-mentioned pixel points in each column;

[0077] Step S103, determine at least two target straight line segments according to multiple consecutive above-mentioned effective pixel points. The at least two above-mentioned target straight line segments meet the first preset condition, and the above-mentioned first preset condition at least includes: the position of the area between the two above-mentioned target straight line segments is within a predetermined position area, the width of the area between the two above-mentioned target straight line segments is greater than a predetermined width, and there are above-mentioned pixel points with gray values greater than a predetermined gray value between the two above-mentioned target straight line segments;

[0078] Step S104, determine the position of the target inflection point according to the positions of the at least two above-mentioned target straight line segments.

[0079] The device in this article can be a server, a PC, a PAD, a mobile phone, etc.

[0080] The present application also provides a computer program product, which is suitable for executing a program initialized with at least the following method steps when executed on a data processing device:

[0081] Step S101, acquire a weld seam image;

[0082] Step S102: Obtain the gray values of the pixel points in each column of the above weld image, determine multiple valid pixel points, where the number of the above valid pixel points in each column of the above pixel points is less than or equal to 1, and the above valid pixel points are the pixel points with extremely large gray values among the above pixel points in each column;

[0083] Step S103: Determine at least two target straight line segments according to multiple consecutive above valid pixel points, and at least two above target straight line segments meet the first preset condition, where the first preset condition at least includes: the position of the area between the two above target straight line segments is within a predetermined position area, the width of the area between the two above target straight line segments is greater than a predetermined width, and there are above pixel points with gray values greater than a predetermined gray value between the two above target straight line segments;

[0084] Step S104: Determine the position of the target inflection point according to the positions of at least two above target straight line segments.

[0085] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0086] In several embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the above units can be a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of units or modules can be in an electrical or other form.

[0087] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0088] In addition, in each embodiment of the present invention, the various functional units can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

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

[0090] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0091] 1) In the method for determining the weld inflection point of the present application, first, the gray values of the pixel points in each column of the weld image are obtained, and a plurality of valid pixel points are determined according to the gray values of the pixel points in each column. Then, at least two target line segments are determined according to a plurality of consecutive valid pixel points. Finally, when the two target line segments satisfy the first preset condition, the position of the target inflection point is determined according to the positions of the at least two target line segments. Among them, the valid pixel points are the pixel points with the maximum gray value among the pixel points in each column, and the first preset condition at least includes: the position of the area between the two target line segments is within a predetermined position area, the width of the area between the two target line segments is greater than a predetermined width, and there are pixel points with gray values greater than a predetermined gray value between the two target line segments. In this solution, at least two target line segments are determined according to the obtained plurality of valid pixel points, and the position of the target inflection point is determined by the at least two determined target line segments. This ensures that the position of the target inflection point can be determined more efficiently and accurately. Compared with the method of setting thresholds to determine the inflection point in the prior art, this solution does not require artificial setting of many thresholds and can adapt to the situation of laser stripes in complex scenarios, having higher practicability, thus solving the problem that it is difficult to determine the inflection point of the weld in complex scenarios in the prior art.

[0092] 2) In the device for determining the weld inflection point of the present application, the first acquisition unit is used to acquire a weld image; the second acquisition unit is used to acquire the gray values of the pixel points in each column of the weld image, determine a plurality of valid pixel points, and the number of the valid pixel points in each column of the pixel points is less than or equal to 1. The valid pixel points are the pixel points with extremely large gray values among the pixel points in each column; the first determination unit is used to determine at least two target line segments according to a plurality of consecutive valid pixel points, and at least two target line segments satisfy a first preset condition. The first preset condition at least includes: the position of the area between the two target line segments is within a predetermined position area, the width of the area between the two target line segments is greater than a predetermined width, and there are pixel points with gray values greater than a predetermined gray value between the two target line segments; the second determination unit is used to determine the position of the target inflection point according to the positions of at least two target line segments. In this solution, at least two target line segments are determined according to the acquired plurality of valid pixel points, and the position of the target inflection point is determined by the at least two determined target line segments. In this way, it is ensured that the position of the target inflection point can be determined more efficiently and accurately. Compared with the method of determining the inflection point by setting thresholds in the prior art, this solution does not require manual setting of many thresholds, and can adapt to the situation of laser stripes in complex scenarios, with higher practicability, thus solving the problem that it is difficult to determine the inflection point of the weld in complex scenarios in the prior art.

[0093] 3) The welding robot of the present application includes a welding body and a device for determining the weld inflection point, and the device for determining the weld inflection point can execute the method for determining the weld inflection point. In the method for determining the weld inflection point, at least two target line segments are determined according to the acquired plurality of valid pixel points, and the position of the target inflection point is determined by the at least two determined target line segments. In this way, it is ensured that the position of the target inflection point can be determined more efficiently and accurately. Compared with the method of determining the inflection point by setting thresholds in the prior art, this solution does not require manual setting of many thresholds, and can adapt to the situation of laser stripes in complex scenarios, with higher practicability, thus solving the problem that it is difficult to determine the inflection point of the weld in complex scenarios in the prior art.

[0094] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for determining the inflection point of a weld seam, characterized in that, it includes: Obtain a weld seam image; Obtain the gray values of the pixel points in each column of the weld seam image, and determine a plurality of valid pixel points. The number of the valid pixel points in each column of the pixel points is less than or equal to 1. The valid pixel point is the pixel point with the maximum gray value among the pixel points in each column; Determine at least two target line segments according to a plurality of consecutive valid pixel points. At least two target line segments meet the first preset condition. The first preset condition at least includes: the position of the area between the two target line segments is within a predetermined position area, the width of the area between the two target line segments is greater than a predetermined width, and there are pixel points with gray values greater than a predetermined gray value between the two target line segments; Determine the position of the target inflection point according to the positions of at least two target line segments; When determining two target line segments according to a plurality of consecutive valid pixel points, determining the position of the target inflection point according to the positions of at least two target line segments includes: determining two fitting lines according to a plurality of consecutive valid pixel points, and the fitting lines and the target line segments correspond one by one; determining a search area according to the positions of the fitting line and the corresponding target line segment. The width of the search area is greater than or equal to the distance between the first end point of the target line segment and a predetermined point on the corresponding fitting line. The predetermined point is the point on the fitting line with the same abscissa as the first end point. The search area includes the first end point, and the first end point is the end point close to the other target line segment; traverse the pixel points in the search area in the direction close to the other target line segment. At least when the pixel value of the target pixel point is greater than the first pixel threshold and the pixel value of the next pixel point is less than the second pixel threshold, determine the target pixel point as one of the target inflection points. The first pixel threshold is greater than the second pixel threshold; Determining at least two target line segments according to a plurality of consecutive valid pixel points includes: determining a plurality of consecutive line segments according to the positions of a plurality of consecutive valid pixel points, and the straightness of the line segments is less than a predetermined value; processing a plurality of consecutive line segments to obtain at least two target line segments. A plurality of consecutive line segments meet the third preset condition. The third preset condition at least includes: the width between two adjacent line segments is less than the predetermined width, and the height difference between two adjacent line segments is less than a predetermined height difference.

2. The method according to claim 1, characterized in that, obtaining a weld seam image includes: Obtain the laser stripe image of the weld seam; Process the laser stripe image to obtain the weld seam image.

3. The method according to claim 1, characterized in that, obtaining the gray values of the pixel points in each column of the weld seam image and determining a plurality of valid pixel points includes: Filter the pixel points in each column of the weld seam image to obtain the filtered pixel points in each column; Extract the extreme points of the pixel points in each filtered column to obtain a plurality of the extreme points, and determine at least some of the plurality of the extreme points as the valid pixel points.

4. The method according to claim 3, wherein, determining at least some of the plurality of the extreme points as the valid pixel points includes: determining whether the plurality of the extreme points satisfy a second preset condition, where the second preset condition includes at least one of the following: whether the gray value of the extreme point is greater than the predetermined gray value, and whether the position of the extreme point is within the predetermined position area; determining the extreme points that satisfy the second preset condition as the valid pixel points.

5. A device for determining the inflection point of a weld seam, wherein, comprising: a first acquisition unit configured to acquire a weld seam image; a second acquisition unit configured to acquire the gray values of the pixel points in each column of the weld seam image, determine a plurality of valid pixel points, the number of the valid pixel points in each column of the pixel points being less than or equal to 1, and the valid pixel points being the pixel points with the maximum gray value in each column of the pixel points; a first determination unit configured to determine at least two target straight line segments according to a plurality of consecutive valid pixel points, where the at least two target straight line segments satisfy a first preset condition, and the first preset condition at least includes: the position of the area between the two target straight line segments is within the predetermined position area, the width of the area between the two target straight line segments is greater than the predetermined width, and there are pixel points with gray values greater than the predetermined gray value between the two target straight line segments; a second determination unit configured to determine the position of the target inflection point according to the positions of the at least two target straight line segments; When determining two target straight line segments according to a plurality of consecutive valid pixel points, the second determination unit further includes a fourth determination module, a fifth determination module, and a sixth determination module, where the fourth determination module is configured to determine two fitting straight lines according to a plurality of consecutive valid pixel points, and the fitting straight lines and the target straight line segments correspond one by one; the fifth determination module is configured to determine a search area according to the positions of the fitting straight line and the corresponding target straight line segment, the width of the search area being greater than or equal to the distance between the first end point of the target straight line segment and a predetermined point on the corresponding fitting straight line, the predetermined point being the point on the fitting straight line with the same abscissa as the first end point, and the search area including the first end point, the first end point being the end point close to the other target straight line segment; the sixth determination module is configured to traverse the pixel points in the search area in the direction close to the other target straight line segment, and determine the target pixel point as one of the target inflection points at least when the pixel value of the target pixel point is greater than a first pixel threshold and the pixel value of the next pixel point is less than a second pixel threshold, where the first pixel threshold is greater than the second pixel threshold. The first determination unit further includes a first determination module and a second processing module. The first determination module is configured to determine a plurality of consecutive straight line segments according to the positions of a plurality of consecutive valid pixel points, and the straightness of the straight line segments is less than a predetermined value. The second processing module is configured to process the plurality of consecutive straight line segments to obtain at least two target straight line segments, and the plurality of consecutive straight line segments satisfy a third preset condition, and the third preset condition at least includes: the width between two adjacent straight line segments is less than the predetermined width, and the height difference between two adjacent straight line segments is less than a predetermined height difference.

6. A computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 4.

7. A processor, characterized in that the processor is configured to run a program, wherein when the program runs, it executes the method according to any one of claims 1 to 4.

8. A welding robot, comprising a welding body and a device for determining the inflection point of a weld seam, characterized in that the device for determining the inflection point of the weld seam is configured to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • A method and system for image processing of welding seam

    CN109215000A