Weld pattern generation method and device, electronic equipment and storage medium
Obtain cross -sectional data by scanning the engineer, calculate the slope of the cutting line to determine the edge point of the weld, generate welded seam diagrams, solve the problem of low accuracy of welded seams in the existing technology, and improve the welding efficiency and quality.
Patent Information
- Application Number
- CN202411316798.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, in the weld tracking before welding and the weld quality inspection after welding, the prior art is susceptible to interference from factors such as ambient light, scratches on the surface of the workpiece, and stains, resulting in a low accuracy of the target weld area in the weld diagram.
By scanning the target workpiece, we obtain the height data corresponding to the sampling points on multiple cross sections, calculate the tangent slope of the sampling points, determine the left and right weld edge points, and then determine the target weld area and generate a weld map. .
The accuracy of the target weld area in the weld diagram has been improved, and the impact of environmental factors can be reduced, so that welding related equipment and personnel can more accurately identify and detect the welded area, and improve the welding efficiency and quality.
Smart Images

Figure CN119347130A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of laser welding, and in particular to a method, device, electronic device and storage medium for generating a weld image. Background Art
[0002] With the development of science and technology, welding automation and intelligence have become an inevitable trend. One of the key technologies of automated welding is to accurately identify and track the weld path and perform weld quality inspection after welding. In weld tracking before welding, the position, shape, and size of the weld often vary with product design and materials, and in actual production, due to factors such as workpiece deformation and assembly errors, the actual position of the weld may deviate from the designed position. In weld quality inspection after welding, various defects may occur in the weld, such as undercut, dents, and blast holes. Therefore, it is necessary to determine the specific area of the weld before welding so that subsequent inspections and other operations can be performed on the weld.
[0003] In the prior art, the weld is obtained by extracting the image captured by the camera. Specifically, the target weld area is identified by comparing the grayscale values and other data of different areas in the image captured by the camera. However, this is also easily interfered by external factors such as ambient light, scratches and stains on the workpiece surface, resulting in a low accuracy rate of the target weld area in the weld image generated according to the prior art. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for generating a weld image. The method in the embodiments of the present application is advantageous for improving the accuracy of the target weld area in the weld image.
[0005] This application is implemented using the following technical solutions.
[0006] In a first aspect, a method for generating a weld map comprises:
[0007] Scan the target workpiece to obtain height data corresponding to multiple sampling points on each of the multiple cross-sections of the target workpiece; the cross-section is a cross-section of the target workpiece in the direction of the line between the start point and the end point of the scan; the tangent slope corresponding to each of the multiple sampling points is calculated according to the height data corresponding to the multiple sampling points on each cross-section; the left weld edge point and the right weld edge point corresponding to each cross-section are determined according to the tangent slope corresponding to each of the multiple sampling points on each cross-section; the area between the left weld edge point and the right weld edge point in each cross-section is determined as the target weld area in each cross-section; and a weld map of the target workpiece is generated according to the target weld areas in the multiple cross-sections.
[0008] It can be seen that in the embodiment of the present application, the target weld area of the target workpiece is determined by the height data corresponding to the multiple sampling points obtained by scanning the target workpiece. Compared with the method of determining the target weld area of the target workpiece by the grayscale values of different areas in the image of the target workpiece and other data, the influence of ambient light, scratches and stains on the workpiece surface in the process of determining the target weld area of the target workpiece according to the image of the target workpiece is avoided, thereby improving the accuracy of the target weld area in the generated weld map, so that welding-related equipment and personnel can quickly distinguish the target weld area and the non-target weld area based on the weld map before welding, so as to improve the welding efficiency, and also enable welding-related equipment and personnel to improve the efficiency of determining the weld quality based on the weld map after welding.
[0009] In combination with the first aspect, in a possible embodiment, respectively calculating the tangent slope corresponding to each of the multiple sampling points according to the height data corresponding to the multiple sampling points on each cross section, including: determining multiple first auxiliary sampling points from the multiple sampling points on the target cross section; wherein the target cross section is one of the multiple cross sections, the first auxiliary sampling point is a sampling point on the target cross section whose horizontal distance from the first target sampling point is not greater than a first preset distance, and the first target sampling point is one of the multiple sampling points on the target cross section; if the number of the first auxiliary sampling points is greater than the preset number, calculating the tangent slope corresponding to the first target sampling point according to the height data corresponding to the first target sampling point and the height data corresponding to the multiple first auxiliary sampling points.
[0010] It can be seen that in the embodiment of the present application, when calculating the tangent slope corresponding to the first target sampling point, the height data corresponding to the plurality of first auxiliary sampling points whose distance from the first target sampling point is less than the first preset distance are used for calculation, thereby improving the accuracy of the tangent slope corresponding to the first target sampling point, thereby improving the accuracy of the left weld edge point and the right weld edge point subsequently determined according to the tangent slope.
[0011] In combination with the first aspect, in a possible embodiment, the spacing between two adjacent sampling points on the target cross section is a preset spacing, and if the number of the first auxiliary sampling points is not greater than the preset number, the method further includes: generating at least one corresponding second auxiliary sampling point according to part or all of the plurality of first auxiliary sampling points; wherein the sum of the number of the first auxiliary sampling points and the number of the second auxiliary sampling points is greater than the preset number, the height data corresponding to the second auxiliary sampling point is the same as the height data of the corresponding first auxiliary sampling point, and the distance between the second auxiliary sampling point and the first target sampling point is the same as the distance between the first auxiliary sampling point corresponding to the second auxiliary sampling point and the first target sampling point; and calculating the tangent slope corresponding to the first target sampling point according to the height data corresponding to the first target sampling point, the height data corresponding to the plurality of first auxiliary sampling points, and the height data corresponding to the at least one second auxiliary sampling point.
[0012] It can be seen that in the embodiment of the present application, when the number of first auxiliary sampling points corresponding to the first target sampling point is insufficient, the second auxiliary sampling point is generated as a new first auxiliary sampling point, and the first target sampling point is calculated according to the multiple first auxiliary sampling points, thereby improving the accuracy of the tangent slope corresponding to the first target sampling point.
[0013] In combination with the first aspect, in a possible embodiment, the left weld edge point and the right weld edge point corresponding to each cross section are determined according to the tangent slope corresponding to each sampling point among the multiple sampling points on each cross section, including: judging in sequence in a first order whether the absolute value of the tangent slope corresponding to each sampling point among the multiple sampling points on the target cross section is greater than a preset slope, and the target cross section is one of the multiple cross sections; the left weld edge point and the right weld edge point are determined according to the first sampling point in the first order whose absolute value of the tangent slope is greater than the preset slope and the last sampling point whose absolute value of the slope is greater than the preset slope.
[0014] It can be seen that in the embodiment of the present application, the left weld edge point and the right weld edge point corresponding to the cross section are determined by the tangent slope corresponding to the sampling point on the cross section, thereby improving the accuracy of the obtained left weld edge point and the right weld edge point.
[0015] In combination with the first aspect, in a possible embodiment, the left weld edge point and the right weld edge point are determined according to the first sampling point whose tangent slope absolute value is greater than the preset slope and the last sampling point whose slope absolute value is greater than the preset slope in the first sequence, including: determining a first reference point and a second reference point on the edge of the target cross section located on both sides of the second target sampling point; wherein the second target sampling point is the first sampling point whose tangent slope absolute value is greater than the preset slope and the last sampling point whose slope absolute value is greater than the preset slope in the first sequence, and the horizontal distances between the first reference point and the second reference point and the second target sampling point are both the second preset distances; generating a reference straight line according to the first reference point and the second reference point; determining the outer edge line of the target workpiece according to multiple sampling points between the first reference point and the second reference point; and determining a point on the outer edge line that is farthest from the reference straight line as the left weld edge point or the right weld edge point.
[0016] It can be seen that in the embodiment of the present application, after the second target sampling point is determined, the left weld edge point or the right weld edge point is determined according to the first reference point and the second reference point of the second target sampling point. After determining the sampling point closest to the actual edge of the target weld area closest to the target workpiece and the non-target weld area, a more accurate left weld edge point and right weld edge point are further determined, thereby improving the accuracy of the determined left weld edge point or right weld edge point.
[0017] In combination with the first aspect, in a possible embodiment, after a weld map of a target workpiece is generated based on target weld areas in multiple cross sections, the weld map is displayed, wherein the weld map includes a first area for characterizing the target weld area of the target workpiece and a second area for characterizing the non-target weld area of the target workpiece.
[0018] It can be seen that in the embodiment of the present application, the first area representing the target weld area and the second area representing the non-target weld area in the weld image are displayed in different colors, so that during the process of automated welding, the efficiency of related equipment and personnel in identifying the target weld area and the non-target weld area is improved.
[0019] In combination with the first aspect, in a possible embodiment, before scanning the target workpiece to obtain height data corresponding to multiple sampling points on each of multiple cross-sections of the target workpiece, the method also includes: obtaining the processing stage of the target workpiece; if the target workpiece is in the pre-welding stage, determining multiple cross-sections of the target workpiece on the surface of the target workpiece, and the distance between any two adjacent cross-sections in the multiple cross-sections is a third preset distance; performing scanning of the target workpiece to obtain height data corresponding to multiple sampling points on each of the multiple cross-sections of the target workpiece and subsequent steps; if the processing stage of the target workpiece is in the post-welding stage, determining multiple cross-sections in a target weld area of the target workpiece, and the distance between any two adjacent cross-sections in the multiple cross-sections is a fourth preset distance, and the third preset distance is greater than the fourth preset distance; scanning the target workpiece to obtain height data corresponding to multiple sampling points on each of the multiple cross-sections of the target workpiece; and generating a weld map of the target workpiece according to the multiple cross-sections of the target workpiece.
[0020] It can be seen that in the embodiment of the present application, different cross-sectional distances are used to determine the cross section of the target workpiece based on different processing stages. In the pre-welding stage of determining the welding area of the target workpiece, a third preset distance with a larger distance is used, so that fewer sampling points need to be scanned and the scanning efficiency is improved; in the post-welding stage of detecting the weld quality of the target workpiece, a fourth preset distance with a smaller distance is used, so that the details of the target weld area in the weld map are more accurate, and the accuracy of the judged weld quality is improved.
[0021] In combination with the first aspect, in a possible embodiment, after generating a weld map of the target workpiece based on the target weld areas in multiple cross sections, the method also includes: determining characteristic information of the target workpiece based on the weld map of the target workpiece, the characteristic information being one or more of weld joint position, joint depth, groove angle, weld width and weld penetration depth information; performing quality inspection on the target workpiece based on the characteristic information of the target workpiece to determine the welding quality of the target weld.
[0022] It can be seen that in the embodiments of the present application, through the weld map of the target workpiece, the relevant weld map generating device, or the welding device and other related devices can quickly perform quality inspection on the target workpiece based on the weld map of the target workpiece, and then can perform acceptance or re-welding operations on the welding quality of the target workpiece, thereby improving the welding process efficiency and welding process quality.
[0023] In a second aspect, an embodiment of the present application provides a device for generating a weld image, for executing a method for generating a weld image, the device comprising:
[0024] Scanning unit: used to scan the target workpiece to obtain height data corresponding to multiple sampling points on each cross section of multiple cross sections of the target workpiece; the cross section is a cross section of the target workpiece in the direction of the line between the starting point and the end point of the scan.
[0025] Calculation unit: used to calculate the tangent slope corresponding to each sampling point in the multiple sampling points according to the height data corresponding to the multiple sampling points on each cross section.
[0026] Determining unit: determining a left weld edge point and a right weld edge point corresponding to each cross section according to a tangent slope corresponding to each sampling point among a plurality of sampling points on each cross section.
[0027] The area between the left weld edge point and the right weld edge point in each cross section is determined as the target weld area in each cross section.
[0028] Generating unit: used for generating a weld map of a target workpiece according to target weld areas in a plurality of cross sections.
[0029] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, the processor is connected to a memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the industrial control computer executes a method as provided in any one of the first aspects.
[0030] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program enables a computer to execute a method as provided in any one of the first aspects.
[0031] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and a computer operable to cause the computer to execute a method such as the first aspect or the second aspect.
[0032] It can be understood that the weld seam image generating device of the second aspect, the electronic device of the third aspect, the computer-readable storage medium of the fourth aspect, or the computer program product of the fifth aspect provided above are all used to implement the method provided in any one of the first aspects. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A schematic diagram of an application scenario of a weld image generation method provided in an embodiment of the present application;
[0035] Figure 2 A schematic diagram of a flow chart of a method for generating a weld seam image provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of the arrangement of multiple sampling points of a target workpiece provided in an embodiment of the present application;
[0037] Figure 4A A schematic diagram of a cross section of a target workpiece provided in an embodiment of the present application;
[0038] Figure 4B A schematic diagram of a cross section of another target workpiece provided in an embodiment of the present application;
[0039] Figure 5 A schematic diagram for determining a first auxiliary sampling point provided in an embodiment of the present application;
[0040] Figure 6 A schematic diagram of generating a second auxiliary sampling point provided in an embodiment of the present application;
[0041] Figure 7 A schematic diagram for determining a left weld edge point provided in an embodiment of the present application;
[0042] Figure 8 A schematic diagram of a three-dimensional weld diagram provided in an embodiment of the present application;
[0043] Fig. 9 A schematic diagram of a two-dimensional weld seam diagram provided in an embodiment of the present application;
[0044] Fig.10 A structural schematic diagram of a weld image generating device provided in an embodiment of the present application;
[0045] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms of "a", "said" and "the" used in the embodiments of the present application, the accompanying drawings and the claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should be understood that the term "and / or" used in this article is only a kind of association relationship describing the associated objects, indicating that there can be three relationships, for example, A and / or B, which can be represented by: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are an "or" relationship. It should be understood that although the terms "first", "second" and similar words may be used in the embodiments of the present application, they do not represent any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one" or "one" do not represent quantity restrictions, but represent the existence of at least one. The "multiple" involved in the embodiments of the present application refers to greater than or equal to two.
[0048] See also Figure 1 , Figure 1 A schematic diagram of an application scenario of a weld map generation method provided in an embodiment of the present application. Figure 1 As shown, the application scenario 100 includes a terminal device 101 and a scanning device 102. The terminal device 101 is connected to the scanning device 102, and the scanning device 102 scans the target workpiece and sends the scanned data to the terminal device 101, so that the terminal device 101 generates a weld map of the target workpiece according to the data obtained by the scanning device 102 when scanning the target workpiece.
[0049] The terminal device 101 here specifically refers to a device operated by a user for issuing instructions to control the scanning device 102 and obtaining data sent by the scanning device 102, and may also be referred to as a terminal, terminal device, mobile station, mobile terminal, etc. Specifically, it may be a mobile phone, a tablet computer, an industrial computer, etc.
[0050] The scanning device 102 is used to identify the height of multiple sampling points on the target workpiece relative to a preset plane, which is specifically based on optical coherence tomography (OCT), line laser scanning technology or AI recognition technology. The sampling points are located on the upper surface of the target workpiece, and the preset plane can be the ground, a horizontal plane, a plane where the placement table of the scanning device 102 is placed, a plane where the bottom surface of the target workpiece is located, etc.
[0051] The target workpiece here is the workpiece that needs to be welded in automated welding. The terminal device will perform operations such as identification and welding quality inspection on the target weld area of the target workpiece.
[0052] In the embodiment of the present application, the terminal device 101 scans the target workpiece to obtain height data corresponding to multiple sampling points on each of the multiple cross sections of the target workpiece. The scanning of the target workpiece here is specifically performed by the terminal device 101 sending an instruction to the scanning device 102 to instruct the scanning device 102 to implement, and at the same time, the scanning device 102 obtains the height data corresponding to multiple sampling points on each of the multiple cross sections of the target workpiece.
[0053] The terminal device 101 calculates the tangent slope corresponding to each of the multiple sampling points according to the height data corresponding to the multiple sampling points on each cross section. First, the tangent slope corresponding to each of the multiple sampling points on each cross section is calculated;
[0054] The terminal device 101 determines the left weld edge point and the right weld edge point corresponding to each cross section according to the tangent slope corresponding to each sampling point in the multiple sampling points on each cross section. The target weld area is specifically a continuous concave area in the target workpiece, see Figure 1 The target workpiece in the target workpiece is a concave area in the target workpiece. Therefore, there are left weld edge points and right weld edge points in the target weld area in the cross section of the target workpiece. Here, it is determined by the height data corresponding to multiple sampling points. Specifically, it can be determined whether the sampling point is a weld edge point according to the tangent slope corresponding to the sampling point, and it can also be determined whether the sampling point is a weld edge point according to the height difference between two adjacent samples. The left weld edge point and the right weld edge point here are specifically the intersection points of the target weld area and the non-target weld area on a cross section.
[0055] The terminal device 101 determines the area between the left weld edge point and the right weld edge point in each cross section as the target weld area in each cross section. In a cross section, the area between the left weld edge point and the right weld edge point is the target weld area, and the target weld area includes multiple sampling points.
[0056] The terminal device 101 generates a weld map of the target workpiece according to the target weld area in the multiple cross sections. By splicing together the sampling points in the target weld area in all cross sections of the target workpiece, a complete three-dimensional or two-dimensional surface can be determined, and the three-dimensional or two-dimensional surface is the target weld area of the target workpiece. The terminal device 101 or other related devices can perform operations such as weld identification and welding quality inspection on the target workpiece according to the target weld area.
[0057] Before performing welding operation on the target workpiece, the weld map here is mainly used by relevant equipment or personnel to distinguish between the areas in the target workpiece that need to be welded and the areas that do not need to be welded.
[0058] After the welding operation is performed on the target workpiece, the weld seam diagram here is mainly used for operations such as welding quality inspection of the target workpiece by related equipment or personnel.
[0059] It can be seen that in the embodiment of the present application, the target weld area of the target workpiece is determined by the height data corresponding to the multiple sampling points obtained by scanning the target workpiece. Compared with the method of determining the target weld area of the target workpiece by the grayscale values of different areas in the image of the target workpiece and other data, the influence of ambient light, scratches and stains on the workpiece surface in the process of determining the target weld area of the target workpiece according to the image of the target workpiece is avoided, thereby improving the accuracy of the target weld area in the generated weld map, so that welding-related equipment and personnel can quickly distinguish the target weld area and the non-target weld area based on the weld map before welding, so as to improve the welding efficiency, and also enable welding-related equipment and personnel to improve the efficiency of determining the weld quality based on the weld map after welding.
[0060] See also Figure 2 , Figure 2 A schematic diagram of a flow chart of a method for generating a weld seam diagram provided in an embodiment of the present application can be based on Figure 1 The application scenario shown is implemented, including steps S201-S205:
[0061] S201: The terminal device scans the target workpiece to obtain height data corresponding to multiple sampling points on each cross section of multiple cross sections of the target workpiece; the cross section is a cross section of the target workpiece in the direction of a line connecting a start point and an end point of a scan.
[0062] Specifically, the terminal device is also connected to the scanning device, or the terminal device is built in the scanning device. The terminal device specifically scans the target workpiece through the scanning device to obtain height data corresponding to multiple sampling points on each cross section of multiple cross sections of the target workpiece.
[0063] For example, see Figure 3 , Figure 3 This is a schematic diagram of the arrangement of multiple sampling points of a target workpiece provided in an embodiment of the present application. Figure 3 The target workpiece shown includes those determined according to the XY coordinate system, where the XY coordinate system is determined based on a preset plane. The X-axis is the horizontal direction in the plane, and the Y-axis is the vertical direction in the plane. The terminal device will obtain the height data of the target workpiece in the direction corresponding to each sampling point, where the height data is specifically the height data of the target workpiece at the corresponding sampling point. It includes four columns of sampling points, each column includes five sampling points, and each column of sampling points corresponds to a cross section.
[0064] In a possible embodiment, a terminal device scans a target workpiece to obtain height data corresponding to multiple sampling points on each of multiple cross-sections of the target workpiece, including: the terminal device obtains multiple initial height information obtained by a scanning device scanning the target workpiece; filters noise in the multiple initial height information according to a median filter; and determines the height data corresponding to multiple sampling points on each of the multiple cross-sections of the target workpiece from the multiple initial height information filtered according to a termination filter.
[0065] S202: The terminal device calculates the tangent slope corresponding to each of the multiple sampling points according to the height data corresponding to the multiple sampling points on each cross section.
[0066] Specifically, the slopes corresponding to multiple sampling points on the cross section are first calculated, and then the slopes are used to calculate whether the corresponding sampling points are left weld edge points or right weld edge points. For example, see Figure 4A , Figure 4A A schematic diagram of a cross section of a target workpiece provided in an embodiment of the present application, including 8 sampling points corresponding to different height information, Figure 4A The cross section shown is generated based on the height information corresponding to these 8 sampling points. Figure 4A In the cross section of the target workpiece shown, the terminal device can determine that the target weld area is the area between the third sampling point from the left to the sixth sampling point, the left weld edge point in the cross section of the target workpiece is the third sampling point from the left, and the right weld edge point is the sixth sampling point from the left. The concave area between the left weld edge point and the right weld edge point is the target weld area of the target workpiece. It can be seen that the target workpiece here has not yet been welded, and the scan here is a pre-welding scan to distinguish the target weld area and the non-target weld area of the target workpiece.
[0067] See also Figure 4B , Figure 4B A schematic diagram of a cross section of another target workpiece provided in an embodiment of the present application, including 6 sampling points corresponding to different height information, Figure 4B The cross section shown is generated based on the height information corresponding to these six sampling points, such as Figure 4B In the cross section of the target workpiece shown, the terminal device can determine that the target weld area is the area between the second sampling point from the left to the fifth sampling point, the left weld edge point in the cross section of the target workpiece is the second sampling point from the left, and the right weld edge point is the fifth sampling point from the left. The target weld area is a protruding part, and it can be seen that the target workpiece here is a workpiece that has been welded, and the scan at this time is a post-weld scan to determine the welding quality of the target workpiece.
[0068] In a possible embodiment, respectively calculating the tangent slope corresponding to each of the multiple sampling points according to the height data corresponding to the multiple sampling points on each cross section, including: determining multiple first auxiliary sampling points from the multiple sampling points on the target cross section; wherein the target cross section is one of the multiple cross sections, the first auxiliary sampling point is a sampling point on the target cross section whose horizontal distance from the first target sampling point is not greater than a first preset distance, and the first target sampling point is one of the multiple sampling points on the target cross section; if the number of the first auxiliary sampling points is greater than the preset number, calculating the tangent slope corresponding to the first target sampling point according to the height data corresponding to the first target sampling point and the height data corresponding to the multiple first auxiliary sampling points.
[0069] Specifically, in the embodiment of the present application, tangent slopes corresponding to multiple sampling points on the target cross section are calculated through multiple first auxiliary sampling points, which is described in detail below through the first target sampling point.
[0070] Here, the multiple first auxiliary sampling points are sampling points whose horizontal distance from the first target sampling point is not greater than the first preset distance, that is, multiple other sampling points arranged before and after the first target sampling point. The tangent slope corresponding to the first target sampling point is calculated by obtaining the height data of the multiple first auxiliary sampling points, thereby improving the accuracy of the calculated tangent slope. The tangent slope corresponding to the first target sampling point calculated based on the height data corresponding to the first target sampling point and the height data corresponding to the multiple auxiliary sampling points satisfies the following formula (1):
[0071]
[0072] where k i is the slope rate of the first target sampling point, N is the number of the first auxiliary sampling points, Z i+j is the height data corresponding to the j sampling points arranged before the first target sampling point, Z i-j is the height data corresponding to the j sampling points arranged after the first target sampling point.
[0073] See also Figure 5 , Figure 5 A schematic diagram for determining a first auxiliary sampling point provided in an embodiment of the present application is shown in FIG. Figure 5 The third sampling point from the left in the cross section of the target workpiece shown is the first target sampling point, where N is 4, and the first preset distance is the preset spacing between the two sampling points, where the preset spacing specifically refers to the horizontal distance between the two sampling points. It can be seen that the two sampling points arranged before the first target sampling point and the two sampling points arranged after the first target sampling point are the first auxiliary sampling points of the first target sampling point.
[0074] It can be seen that in the embodiment of the present application, when calculating the tangent slope corresponding to the first target sampling point, the height data corresponding to the plurality of first auxiliary sampling points whose distance from the first target sampling point is less than the first preset distance are used for calculation, thereby improving the accuracy of the tangent slope corresponding to the first target sampling point, thereby improving the accuracy of the left weld edge point and the right weld edge point subsequently determined according to the tangent slope.
[0075] In a possible embodiment, the spacing between two adjacent sampling points on the target cross section is a preset spacing, and if the number of the first auxiliary sampling points is not greater than the preset number, the method further includes: generating at least one corresponding second auxiliary sampling point according to part or all of the plurality of first auxiliary sampling points; wherein the sum of the number of the first auxiliary sampling points and the number of the second auxiliary sampling points is greater than the preset number, the height data corresponding to the second auxiliary sampling point is the same as the height data of the corresponding first auxiliary sampling point, and the distance between the second auxiliary sampling point and the first target sampling point is the same as the distance between the first auxiliary sampling point corresponding to the second auxiliary sampling point and the first target sampling point; and calculating the tangent slope corresponding to the first target sampling point according to the height data corresponding to the first target sampling point, the height data corresponding to the plurality of first auxiliary sampling points, and the height data corresponding to the at least one second auxiliary sampling point.
[0076] Specifically, in the embodiment of the present application, it is necessary to determine multiple first auxiliary sampling points of the first target sampling point to calculate the tangent slope corresponding to the first target sampling point. The preset number here is specifically 2, 4, 6, etc., that is, multiple pairs of sampling points are determined before and after the first target sampling point as multiple first auxiliary sampling points of the first target sampling point.
[0077] If the number of the first auxiliary sampling points is not greater than the preset number, at least one corresponding second auxiliary sampling point is generated according to part or all of the plurality of first auxiliary sampling points, so that the terminal device can calculate the slope corresponding to the first target sampling point.
[0078] For example, if there are 3 other sampling points on the left side of the first target sampling point and one sampling point on the right side, the preset number of the first auxiliary sampling points is 4, and the first auxiliary sampling point of the first target sampling point here includes 2 sampling points on the left side and one sampling point on the right side. In this case, it is necessary to generate an additional second auxiliary sampling point based on some of the 2 sampling points on the left side, and determine the second auxiliary sampling point as a new first auxiliary sampling point to perform the subsequent step of calculating the tangent slope corresponding to the first target sampling point.
[0079] If there are 3 other sampling points on the left side of the first target sampling point and 2 sampling points on the right side, the preset number of the first auxiliary sampling points is 4, and the first auxiliary sampling points of the first target sampling point here include 2 sampling points on the left side and 2 sampling points on the right side. At this time, the subsequent step of calculating the tangent slope corresponding to the first target sampling point can be directly executed.
[0080] The second auxiliary sampling point here is generated by mirroring the first auxiliary sampling point based on the first target sampling point and the perpendicular line of the preset plane. Therefore, the generated second auxiliary sampling point has a one-to-one correspondence with the first auxiliary sampling point, the height data corresponding to the second auxiliary sampling point is the same as the height data of the corresponding first auxiliary sampling point, and the distance between the second auxiliary sampling point and the first target sampling point is the same as the distance between the corresponding first auxiliary sampling point and the first target sampling point.
[0081] For example, see Figure 6 , Figure 6 A schematic diagram of generating a second auxiliary sampling point provided in an embodiment of the present application is shown in FIG. Figure 6 In the scenario shown, the preset number is 2, and the first preset distance is the distance between two sampling points, so Figure 6 The first auxiliary sampling point corresponding to the first target sampling point shown is only one after the first target sampling point. At this time, a mirrored second auxiliary sampling point is generated based on the symmetry axis according to the first auxiliary sampling point. The distance between the second auxiliary sampling point and the first target sampling point is the same as the distance between the first auxiliary sampling point and the first target sampling point, and the height information corresponding to the second auxiliary sampling point is the same as the height information corresponding to the first auxiliary sampling point.
[0082] Optionally, the height data corresponding to the second auxiliary sampling point is generated according to the height data of the first target sampling point, and the height information corresponding to the second auxiliary sampling point is the same as the height information of the first target sampling point.
[0083] Optionally, the difference between the height data corresponding to the second auxiliary sampling point and the height data corresponding to the first target sampling point is equal to the difference between the height data corresponding to the first target sampling point and the height data corresponding to the first auxiliary sampling point.
[0084] It can be seen that in the embodiment of the present application, when the number of first auxiliary sampling points corresponding to the first target sampling point is insufficient, the second auxiliary sampling point is generated as a new first auxiliary sampling point, and the first target sampling point is calculated according to the multiple first auxiliary sampling points, thereby improving the accuracy of the tangent slope corresponding to the first target sampling point.
[0085] S203: The terminal device determines the left weld edge point and the right weld edge point corresponding to each cross section according to the tangent slope corresponding to each sampling point among the multiple sampling points on each cross section.
[0086] Specifically, a target weld area is included in the cross-section of the target workpiece, and the intersection point of the target weld area and the non-target weld area is the left weld edge point or the right weld edge point here, wherein the edge point of the weld is specifically the left weld edge point or the right weld edge point determined according to the relative positions of the two edge points.
[0087] In a possible embodiment, a left weld edge point and a right weld edge point corresponding to each cross section are determined according to a tangent slope corresponding to each sampling point among multiple sampling points on each cross section, including: judging in sequence in a first order whether an absolute value of a tangent slope corresponding to each sampling point among multiple sampling points on a target cross section is greater than a preset slope, where the target cross section is one of the multiple cross sections; and determining a left weld edge point and a right weld edge point according to a first sampling point in the first order whose absolute value of a tangent slope is greater than a preset slope and a last sampling point whose absolute value of a slope is greater than a preset slope.
[0088] Specifically, in the embodiment of the present application, the left weld edge point and the right weld edge point of the target workpiece on each cross section are determined by calculating the tangent slope corresponding to each sampling point on each cross section. The target cross section is used as an example for detailed description.
[0089] First, according to the height data corresponding to multiple sampling points on the target cross section, the tangent slope corresponding to each sampling point is calculated. If the outer edge line of the target workpiece formed by connecting multiple sampling points on the target cross section is a curve, the slope corresponding to the sampling point here is the tangent slope at the sampling point; if the outer edge line of the target workpiece formed by connecting multiple sampling points on the target cross section is a straight line, the slope here is the slope of the straight line formed by connecting multiple sampling points including the target sampling point.
[0090] After determining the tangent slope corresponding to each sampling point, it is determined in turn in a first order whether the absolute value of the tangent slope corresponding to each of the multiple sampling points on the target cross section is greater than a preset slope. The first order here is the arrangement order of the multiple sampling points from left to right or from right to left on the corresponding cross section.
[0091] If the absolute value of the tangent slope corresponding to a sampling point is greater than the preset slope, it can be inferred that the height data difference corresponding to the sampling points before and after the sampling point is large, and the sampling point is close to the actual boundary between the target weld area and the non-target weld area in the corresponding cross section. For details, please refer to Figure 4A The third sampling point from the left and the sixth sampling point from the left are shown in . Therefore, the left weld edge point and the right weld edge point are determined according to the sampling point whose absolute value of the tangent slope is greater than the preset slope and the sampling point whose absolute value of the slope is greater than the preset slope in the first order.
[0092] Furthermore, in the embodiment of the present application, the horizontal spacing of the sampling points is the same. If the horizontal spacing of the sampling points is small, the difference between the position of the sampling point whose tangent slope absolute value is greater than the preset slope and the position of the actual left weld edge point or the right weld edge point is not large, and the sampling point whose absolute value is greater than the preset slope can be directly determined as the left weld edge point or the right weld edge point;
[0093] If the horizontal spacing of the sampling points is large, the position of the sampling point whose absolute value of the tangent slope is greater than the preset slope is significantly different from the position of the actual left weld edge point or the right weld edge point. At this time, it is necessary to further determine the sampling point whose absolute value is greater than the preset slope as the left weld edge point or the right weld edge point.
[0094] It can be seen that in the embodiment of the present application, the left weld edge point and the right weld edge point corresponding to the cross section are determined by the tangent slope corresponding to the sampling point on the cross section, thereby improving the accuracy of the obtained left weld edge point and the right weld edge point.
[0095] In a possible embodiment, determining a left weld edge point and a right weld edge point according to a first sampling point whose tangent slope absolute value is greater than a preset slope and a last sampling point whose slope absolute value is greater than the preset slope in a first sequence includes: determining a first reference point and a second reference point on the edge of a target cross section located on both sides of a second target sampling point; wherein the second target sampling point is a first sampling point whose tangent slope absolute value is greater than a preset slope and a last sampling point whose slope absolute value is greater than the preset slope in the first sequence, and horizontal distances between the first reference point and the second reference point and the second target sampling point are both second preset distances; generating a reference straight line according to the first reference point and the second reference point; determining an outer edge line of a target workpiece according to a plurality of sampling points between the first reference point and the second reference point; and determining a point on the outer edge line that is farthest from the reference straight line as a left weld edge point or a right weld edge point.
[0096] Specifically, after the tangent slopes corresponding to multiple sampling points in the target cross section are calculated in the embodiment of the present application, the first sampling point whose tangent slope absolute value is greater than the preset slope and the last sampling point whose slope absolute value is greater than the preset slope in the first order determined from the multiple sampling points are only two sampling points among the multiple sampling points that are closer to the actual edge distances of the target weld area and the non-target weld area in the target workpiece, and more accurate left weld edge points and right weld edge points need to be determined based on these two sampling points.
[0097] Here, the first reference point and the second reference point of the second target sampling point are determined, and the first reference point and the second reference point are points on the edge of the target cross section whose horizontal distance from the second target sampling point is not greater than the second preset distance. The first reference point and the second reference point are directly connected to obtain a reference straight line, and the reference straight line is represented by the following formula (2):
[0098] y=kx+b(2)
[0099] Where k satisfies the following formula (3):
[0100]
[0101] b satisfies the following formula (4):
[0102]
[0103] In formula (3) and formula (4), x1, y1 are the coordinates of the first reference point in the XY coordinate system, and x2, y2 are the coordinates of the second reference point in the XY coordinate system. The XY coordinate system is determined based on a preset plane.
[0104] The outer edge of the target workpiece between the first reference point and the second reference point is determined as the outer edge line, where the first reference point and the second reference point are specifically two other sampling points whose horizontal distance from the second target sampling point is not greater than the second preset distance and whose distance from the second target sampling point is the same, or points on the outer edge of the target workpiece generated based on other sampling points. Figure 7 , Figure 7 A schematic diagram of determining the left weld edge point provided in an embodiment of the present application, wherein the dotted line is a reference straight line formed by a first reference point and a second reference point, and the solid line between the first reference point and the second reference point is an outer edge line, which is the outer edge of the target workpiece determined based on multiple reference points in the target cross section. It can be seen that in the quasi-triangle formed by the outer edge line and the reference straight line, the point on the outer edge line that is farthest from the reference straight line is a vertex of the quasi-triangle. That is, the left weld edge point here.
[0105] It can be seen that in the embodiment of the present application, after the second target sampling point is determined, the left weld edge point or the right weld edge point is determined according to the first reference point and the second reference point of the second target sampling point. After determining the sampling point closest to the actual edge of the target weld area closest to the target workpiece and the non-target weld area, a more accurate left weld edge point and right weld edge point are further determined, thereby improving the accuracy of the determined left weld edge point or right weld edge point.
[0106] S204: The terminal device determines the area between the left weld edge point and the right weld edge point in each cross section as the target weld area in each cross section.
[0107] Specifically, there are multiple sampling points between the left weld edge point and the right weld edge point of a cross section of the target workpiece. The terminal device connects and splices the sampling points between the left weld edge point and the right weld edge point to determine the target weld area of the cross section.
[0108] S205: The terminal device generates a weld map of the target workpiece according to the target weld areas in the multiple cross sections.
[0109] Specifically, after determining the weld edge points in each cross section of the target workpiece, the complete target weld area of the target workpiece can be determined based on the weld edge points in all cross sections included in the target workpiece. The weld edge points here refer to all sampling points in the target weld area of the target workpiece, including the left weld edge points and the right weld edge points mentioned above. The weld map here includes a first area connected and spliced according to the sampling points in multiple target weld areas in the target weld area, and the first area is used to display the shape, size, and specific distribution position of the target weld area of the target workpiece on the target workpiece.
[0110] In a possible embodiment, after a weld map of a target workpiece is generated according to target weld areas in a plurality of cross sections, the weld map is displayed, the weld map including a first area for characterizing the target weld area of the target workpiece and a second area for characterizing the non-target weld area of the target workpiece.
[0111] Specifically, after the terminal device determines the target weld area in multiple cross sections of the target workpiece, it can determine the target weld area of the target workpiece according to the multiple sampling points in the target weld area for subsequent detection, welding and other steps. For the terminal device in the embodiment of the present application, it is not necessary to generate a two-dimensional or three-dimensional weld map to perform the above steps. For other equipment or relevant personnel, detection, welding and other steps can be performed based on the weld map here.
[0112] In the embodiment of the present application, the terminal device includes a display screen. After the terminal device generates the weld map, the weld map is also displayed on the display screen, so that relevant personnel can synchronously observe whether the target weld area determined by the terminal device is accurate during the automatic operation of the terminal device or other devices identify the target weld area through the weld map, etc. The first color and the second color here are usually colors with a high degree of contrast, for example, the first color is red and the second color is yellow, the first color is black and the second color is white, etc.
[0113] For example, see Figure 8 , Figure 8 A schematic diagram of a three-dimensional weld map provided in an embodiment of the present application is shown in the figure. Based on the steps in the above embodiments, the terminal device can obtain the height information corresponding to multiple sampling points of the target workpiece, and determine the sampling points belonging to different areas based on the height information of the multiple sampling points. Based on the height information, position information, etc. of the sampling points belonging to the target weld area and the sampling points of the non-target weld area, the terminal device connects and splices the multiple sampling points belonging to the target weld area to obtain a first area, i.e. Figure 8The target weld area shown in FIG. 1 is a target weld area; the sampling points in multiple non-target weld areas are connected and spliced to obtain a second area, namely Figure 8 Non-target weld area shown in . Figure 8 The XYN coordinate system shown in is generated based on a preset plane.
[0114] For example, see Fig. 9 , Fig. 9 A schematic diagram of a two-dimensional weld seam diagram provided in an embodiment of the present application. Fig. 9 The weld extraction shown in the figure is a two-dimensional image generated based on the first area and the second area. The weld image shows the target weld area from a top-down perspective of the target workpiece, where the center part displayed in white is the first area, i.e., the target weld area of the target workpiece, and the outer area displayed in black is the second area, i.e., the non-target weld area. Fig. 9 The XY coordinate system in is generated based on a preset origin on a preset plane.
[0115] It can be seen that in the embodiment of the present application, the first area representing the target weld area and the second area representing the non-target weld area in the weld image are displayed in different colors, so that during the process of automated welding, the efficiency of related equipment and personnel in identifying the target weld area and the non-target weld area is improved.
[0116] In a possible embodiment, before scanning the target workpiece to obtain height data corresponding to multiple sampling points on each of multiple cross-sections of the target workpiece, the method further includes: acquiring a processing stage of the target workpiece; if the target workpiece is in a pre-welding stage, determining multiple cross-sections of the target workpiece on the surface of the target workpiece, and a distance between any two adjacent cross-sections in the multiple cross-sections is a third preset distance; performing scanning of the target workpiece to obtain height data corresponding to multiple sampling points on each of the multiple cross-sections of the target workpiece and subsequent steps; if the processing stage of the target workpiece is in a post-welding stage, determining multiple cross-sections in a target weld area of the target workpiece, and a distance between any two adjacent cross-sections in the multiple cross-sections is a fourth preset distance, and the third preset distance is greater than the fourth preset distance; scanning the target workpiece to obtain height data corresponding to multiple sampling points on each of the multiple cross-sections of the target workpiece; and generating a weld map of the target workpiece according to the multiple cross-sections of the target workpiece.
[0117] Specifically, in the pre-welding stage, the cross section of the target workpiece is directly determined on the surface of the target workpiece, where the surface of the target workpiece is the side of the target workpiece that needs to be welded, and is usually the upper surface of the target workpiece in actual processing. Multiple cross sections are distributed in parallel on the target workpiece, and the distance between each cross section is a third preset distance, where the third preset distance is determined based on factors such as the performance of the scanning device and the processing accuracy of the target workpiece.
[0118] In the post-welding stage, since the target weld area of the target workpiece has been determined, when scanning the target workpiece, it is only necessary to scan the target weld area of the target workpiece to judge the welding quality of the target workpiece. Therefore, multiple cross sections are determined in the target weld area of the target workpiece and subsequent scanning operations are performed. In the post-welding stage, multiple cross sections are distributed in parallel on the target weld area of the target workpiece, and the distance between each cross section is a fourth preset distance. The fourth preset distance here is also determined based on factors such as the performance of the scanning equipment and the processing accuracy of the target workpiece, but the fourth preset distance is less than the third preset distance to obtain finer weld details.
[0119] It can be seen that in the embodiment of the present application, different cross-sectional distances are used to determine the cross section of the target workpiece based on different processing stages. In the pre-welding stage of determining the welding area of the target workpiece, a third preset distance with a larger distance is used, so that fewer sampling points need to be scanned and the scanning efficiency is improved; in the post-welding stage of detecting the weld quality of the target workpiece, a fourth preset distance with a smaller distance is used, so that the details of the target weld area in the weld map are more accurate, and the accuracy of the judged weld quality is improved.
[0120] In a possible embodiment, after generating a weld map of the target workpiece according to the target weld areas in multiple cross sections, the method further includes: determining characteristic information of the target workpiece according to the weld map of the target workpiece, the characteristic information being one or more of weld joint position, joint depth, groove angle, weld width and weld penetration depth information; performing quality inspection on the target workpiece according to the characteristic information of the target workpiece to determine the welding quality of the target weld.
[0121] Specifically, the weld map generating device can further perform quality inspection on the target workpiece according to the weld map of the target workpiece, mainly by determining the corresponding height data through the edge position information and the middle position information in the target weld area of the weld map of the target workpiece to determine the characteristic information of the target workpiece, and the characteristic information here is used to ensure the weld characteristics of the target workpiece, specifically including the weld joint position, joint depth, groove angle, weld width and other characteristics. And based on the weld characteristics, the weld quality of the target workpiece is evaluated to determine whether the target workpiece needs to be re-welded or additively welded. The edge position information here is the height information corresponding to the left weld edge point and the right weld edge point, and the middle position information includes the height information corresponding to the sampling point between the left weld edge point and the right weld edge point.
[0122] It should be noted that the in-weld penetration depth information here includes multiple height data corresponding to the cross section of the target workpiece in the direction of the line between the multiple scanning start points and the end points during the process from the beginning of the formation to the closing of the multi-pass weld pool, which is determined based on the height data in multiple adjacent cross sections on the cross section of the target workpiece. The in-weld penetration depth information is specifically used to characterize the shape, height and other information of the molten pool formed by welding. The weld map generating device can specifically evaluate the welding quality of the target workpiece based on the shape, height and other information of the molten pool formed by welding.
[0123] It can be seen that in the embodiments of the present application, through the weld map of the target workpiece, the relevant weld map generating device, or the welding device and other related devices can quickly perform quality inspection on the target workpiece based on the weld map of the target workpiece, and then can perform acceptance or re-welding operations on the welding quality of the target workpiece, thereby improving the welding process efficiency and welding process quality.
[0124] It can be seen that in the embodiment of the present application, when the weld is identified on the laser processing plane in the post-welding stage, the middle depth position information between the left weld edge point and the right weld edge point is further identified on the cross section, and the weld quality is determined based on the edge position and the middle position information. For example, the surface of the weld is identified as an M-shaped weld, a concave weld, a burst point weld, etc., and the weld quality is determined by the plane morphology. It can be understood that in the embodiment of the present application, the descriptions of "left" and "right" of the left weld edge point and the right weld edge point are only for the convenience of position description. In some cases, the position of "left" or "right" can be understood as "up" or "down".
[0125] In some embodiments, for example, before welding two splicing plates, in order to track and identify the weld position of the splicing plates, when performing weld tracking, the embodiment of the present application detects the V-shaped bottom end after confirming the molten width of the V-shaped groove of the splicing plate, and then performs weld tracking. Further, the middle depth position information between the left weld edge point and the right weld edge point is identified, and the V-shaped bottom position coordinate information is fed back to the laser processing head, and the processing focus is aligned with the V-shaped bottom end.
[0126] It can be understood that the cross section is a cross section of the target workpiece in the direction of the line between the start point and the end point of a scan, and the cross section is at an angle of 85-90 degrees to the extension direction of the weld. Different process scenarios correspond to different angles. Usually, the cross section is perpendicular to the extension direction of the weld.
[0127] It can be understood that in some cases, when the weld quality is determined to be unqualified based on the weld map generated for the target workpiece, the corresponding position of the weld is re-welded or additively welded based on the middle depth position information between the left weld edge point and the right weld edge point.
[0128] In one application scenario, optical coherence tomography (OCT) can be used to obtain height data corresponding to multiple sampling points of the target workpiece, and the weld depth of the target workpiece can be determined based on the weld depth information before welding, the penetration depth information during welding, and the surface depth information after welding of the OCT. Figure 3 D graphics. This enables multi-dimensional display of weld structure diagrams before, during and after welding.
[0129] It can be understood that the penetration depth information during welding includes multiple height data corresponding to the cross section of the target workpiece in the direction of the line between the multiple scanning starting points and the end points during the process from the beginning of the formation to the closing of the multi-pass weld pool; the weld is formed according to the preset weld formation time and multiple height information fitting Figure 3 D graph. The penetration depth information during welding includes multiple height data corresponding to the cross section of the target workpiece in the direction of the line between the multiple scanning starting points and the end points during the process from the beginning of the formation to the closing of the multi-pass weld pool; the welding quality of the bottom of the weld is determined according to the preset weld formation time and multiple height information. Then, by observing the penetration depth information during welding, it is determined whether the welding is fully penetrated or the fusion depth is insufficient.
[0130] By implementing the method in the above application embodiment, it can be seen that the target weld area of the target workpiece is determined by scanning the height data corresponding to multiple sampling points of the target workpiece, which improves the accuracy of the target weld area in the generated weld map. Welding-related equipment and personnel can quickly distinguish the target weld area and the non-target weld area according to the weld map, which can improve the recognition efficiency of the target weld area before the welding operation, and can improve the efficiency of the weld quality detection after the welding operation. The slope corresponding to the first target sampling point is calculated by the height data corresponding to the multiple first auxiliary sampling points, which improves the accuracy of the tangent slope corresponding to the first target sampling point. The point on the outer edge line that is farthest from the reference straight line is determined as the left weld edge point or the right weld edge point, which further improves the accuracy of the left weld edge point or the right weld edge point. The weld map is generated based on the target weld area, which improves the efficiency of welding, weld quality detection and other steps for the weld.
[0131] See also Fig.10 , Fig.10 This is a schematic diagram of the structure of a weld image generating device provided in an embodiment of the present application. Fig.10 As shown, the welding seam diagram generating device 1000 comprises:
[0132] Scanning unit 1001: used to scan the target workpiece to obtain height data corresponding to multiple sampling points on each cross section of multiple cross sections of the target workpiece; the cross section is a cross section of the target workpiece in the direction of a line connecting a scanning start point and an end point.
[0133] The calculation unit 1002 is used to calculate the tangent slope corresponding to each sampling point in the multiple sampling points according to the height data corresponding to the multiple sampling points on each cross section.
[0134] Determining unit 1003: Determine the left weld edge point and the right weld edge point corresponding to each cross section according to the tangent slope corresponding to each sampling point among the multiple sampling points on each cross section.
[0135] The area between the left weld edge point and the right weld edge point in each cross section is determined as the target weld area in each cross section.
[0136] The generating unit 1004 is used to generate a weld map of the target workpiece according to the target weld areas in the multiple cross sections.
[0137] In a possible embodiment, in terms of respectively calculating the tangent slope corresponding to each of the multiple sampling points according to the height data corresponding to the multiple sampling points on each cross section, the determining unit 1003 is further specifically used to: determine multiple first auxiliary sampling points from the multiple sampling points on the target cross section; wherein the target cross section is one of the multiple cross sections, the first auxiliary sampling point is a sampling point on the target cross section whose horizontal distance from the first target sampling point is not greater than a first preset distance, and the first target sampling point is one of the multiple sampling points on the target cross section; if the number of the first auxiliary sampling points is greater than the preset number, then calculating the tangent slope corresponding to the first target sampling point according to the height data corresponding to the first target sampling point and the height data corresponding to the multiple first auxiliary sampling points.
[0138] In a possible embodiment, the spacing between two adjacent sampling points on the target cross section is a preset spacing. If the number of the first auxiliary sampling points is not greater than the preset number, the generating unit 1004 is further specifically configured to: generate at least one corresponding second auxiliary sampling point according to part or all of the plurality of first auxiliary sampling points; wherein the sum of the number of the first auxiliary sampling points and the number of the second auxiliary sampling points is greater than the preset number, the height data corresponding to the second auxiliary sampling point is the same as the height data of the corresponding first auxiliary sampling point, and the distance between the second auxiliary sampling point and the first target sampling point is the same as the distance between the first auxiliary sampling point corresponding to the second auxiliary sampling point and the first target sampling point; and calculate the tangent slope corresponding to the first target sampling point according to the height data corresponding to the first target sampling point, the height data corresponding to the plurality of first auxiliary sampling points, and the height data corresponding to the at least one second auxiliary sampling point.
[0139] In a possible embodiment, in terms of determining the left weld edge point and the right weld edge point corresponding to each cross-section according to the tangent slope corresponding to each sampling point among multiple sampling points on each cross-section, the determination unit 1003 is further specifically used to: determine in sequence in a first order whether the absolute value of the tangent slope corresponding to each sampling point among multiple sampling points on the target cross-section is greater than a preset slope, and the target cross-section is one of the multiple cross-sections; determine the left weld edge point and the right weld edge point according to the first sampling point in the first order whose absolute value of the tangent slope is greater than the preset slope and the last sampling point whose absolute value of the slope is greater than the preset slope.
[0140] In a possible embodiment, in terms of determining the left weld edge point and the right weld edge point according to the first sampling point whose absolute value of the tangent slope is greater than the preset slope and the last sampling point whose absolute value of the slope is greater than the preset slope in the first sequence, the determination unit 1003 is further specifically used to: determine a first reference point and a second reference point on the edge of the target cross section located on both sides of the second target sampling point; wherein the second target sampling point is the first sampling point whose absolute value of the tangent slope is greater than the preset slope and the last sampling point whose absolute value of the slope is greater than the preset slope in the first sequence, and the horizontal distances between the first reference point and the second reference point and the second target sampling point are both the second preset distances; generate a reference straight line according to the first reference point and the second reference point; determine the outer edge line of the target workpiece according to multiple sampling points between the first reference point and the second reference point; and determine a point on the outer edge line that is farthest from the reference straight line as the left weld edge point or the right weld edge point.
[0141] In a possible embodiment, after generating a weld map of the target workpiece according to the target weld areas in multiple cross sections, the generating unit 1004 is further specifically used to: display the weld map, the weld map including a first area for characterizing the target weld area of the target workpiece and a second area for characterizing the non-target weld area of the target workpiece.
[0142] In a possible embodiment, before scanning the target workpiece to obtain height data corresponding to multiple sampling points on each of multiple cross-sections of the target workpiece, the determination unit 1003 is further specifically used to: obtain the processing stage of the target workpiece; if the target workpiece is in the pre-welding stage, determine multiple cross-sections of the target workpiece on the surface of the target workpiece, and the distance between any two adjacent cross-sections in the multiple cross-sections is a third preset distance; execute scanning the target workpiece to obtain height data corresponding to multiple sampling points on each of the multiple cross-sections of the target workpiece and subsequent steps; if the processing stage of the target workpiece is in the post-welding stage, determine multiple cross-sections in a target weld area of the target workpiece, and the distance between any two adjacent cross-sections in the multiple cross-sections is a fourth preset distance, and the third preset distance is greater than the fourth preset distance; scan the target workpiece to obtain height data corresponding to multiple sampling points on each of the multiple cross-sections of the target workpiece; and generate a weld map of the target workpiece according to the multiple cross-sections of the target workpiece.
[0143] In a possible embodiment, after generating a weld map of the target workpiece according to the target weld areas in multiple cross sections, the determination unit 1003 is further specifically used to: determine characteristic information of the target workpiece according to the weld map of the target workpiece, the characteristic information being one or more of weld joint position, joint depth, groove angle, weld width and weld penetration depth information; perform quality inspection on the target workpiece according to the characteristic information of the target workpiece to determine the welding quality of the target weld.
[0144] It should be noted that the above-mentioned units (scanning unit 1001, calculation unit 1002, determination unit 1003 and generation unit 1004) are used to perform the relevant steps of the above-mentioned method. The various units or modules in the weld map generation device 1000 can be respectively or completely combined into one or several other units or modules to form, or one (some) of the units or modules can also be divided into multiple functionally smaller units or modules to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units or modules are divided based on logical functions. In practical applications, the functions of one unit (or module) can also be implemented by multiple units (or modules), or the functions of multiple units (or modules) can be implemented by one unit (or module).
[0145] Based on the description of the above method embodiment and device embodiment, please refer to Fig.11 , an embodiment of the present invention also provides a structural diagram of an electronic device 1100. Fig.11The electronic device 1100 shown (the electronic device 1100 may be a computer device) includes a memory 1101, a processor 1102, a communication interface 1103 and a bus 1104. The memory 1101, the processor 1102 and the communication interface 1103 are connected to each other through the bus 1104.
[0146] The memory 1101 may be a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM).
[0147] The memory 1101 can store programs. When the program stored in the memory 1101 is executed by the processor 1102, the processor 1102 and the communication interface 1103 are used to execute the various steps of the weld image generation method of the embodiment of the present application.
[0148] The processor 1102 can adopt a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits to execute relevant programs to implement the functions required to be performed by the units in the electronic device 1100 of the embodiment of the present application, or to execute the weld map generation method of the method embodiment of the present application.
[0149] The processor 1102 may also be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the weld map generation method of the present application may be completed by an integrated logic circuit of hardware or software instructions in the processor 1102. The above-mentioned processor 1102 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1101, and the processor 1102 reads the information in the memory 1101, and combines its hardware to complete the functions required to be performed by the units included in the electronic device 1100 of the embodiment of the present application, or executes the weld map generation method of the method embodiment of the present application.
[0150] The communication interface 1103 uses a transceiver such as, but not limited to, a transceiver to implement communication between the electronic device 1100 and other devices or a communication network. For example, data can be acquired through the communication interface 1103 .
[0151] The bus 1104 may include a path for transmitting information between various components of the electronic device 1100 (eg, the memory 1101 , the processor 1102 , and the communication interface 1103 ).
[0152] It should be noted that although Fig.11 The electronic device 1100 shown only shows a memory, a processor, and a communication interface, but in the specific implementation process, those skilled in the art should understand that the electronic device 1100 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the electronic device 1100 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the electronic device 1100 may also only include the devices necessary to implement the embodiments of the present application, and does not necessarily include Fig.11 All devices shown in .
[0153] An embodiment of the present application further provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to implement the weld image generation method.
[0154] Optionally, as an implementation manner, the chip may further include a memory, in which instructions are stored, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the weld image generating method.
[0155] An embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
[0156] The embodiment of the present application further provides a computer program product including instructions. When the computer program product is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
[0157] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or includes any media (e.g., based on a communication protocol) that facilitates the transfer of a computer program from one place to another. In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this application. A computer program product may include computer-readable media.
[0158] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are actually directed to non-temporary tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser optical disks, optical optical disks, digital versatile disks (DVDs), and Blu-ray disks, where disks typically reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0159] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the aforementioned structures or any other structures suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logic blocks, modules, and steps described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the techniques may be fully implemented in one or more circuits or logic elements.
[0160] The techniques of the present application may be implemented in a variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this application to emphasize functional aspects of devices for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units may be combined in an encoded hardware unit in conjunction with appropriate software and / or firmware, or provided by interoperating hardware units (including one or more processors as described above).
[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the specific descriptions of the corresponding steps in the aforementioned method embodiments, and will not be repeated here.
[0162] It should be understood that in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; wherein A and B can be singular or plural. Also, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, wherein a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be necessarily different. Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0163] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the division of the unit is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling, direct coupling, or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integrations. The available medium may be a read-only memory (ROM), or a random access memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a tape, a disk, or an optical medium, such as a digital versatile disc (DVD), or a semiconductor medium, such as a solid state disk (SSD), etc.
[0166] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.
[0167] The device embodiments described above are merely illustrative, wherein the units and modules described as separate components may or may not be physically separated. In addition, some or all of the units and modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present invention without creative effort.
[0168] The above is only a specific implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for generating a weld seam diagram, characterized in that: The method comprises: Scanning the target workpiece to obtain height data corresponding to a plurality of sampling points on each of a plurality of cross sections of the target workpiece; the cross section is a cross section of the target workpiece in the direction of a line connecting a start point and an end point of a scan; Calculate the tangent slope corresponding to each of the multiple sampling points according to the height data corresponding to the multiple sampling points on each cross section; Determine a left weld edge point and a right weld edge point corresponding to each cross section according to a tangent slope corresponding to each sampling point among a plurality of sampling points on each cross section; Determine the area between the left weld edge point and the right weld edge point in each cross section as the target weld area in each cross section; A weld map of the target workpiece is generated according to the target weld areas in the plurality of cross sections.
2. The method according to claim 1, characterized in that The step of calculating the tangent slope corresponding to each of the plurality of sampling points according to the height data corresponding to the plurality of sampling points on each cross section comprises: Determine a plurality of first auxiliary sampling points from a plurality of sampling points on a target cross section; wherein the target cross section is one of the plurality of cross sections, the first auxiliary sampling point is a sampling point on the target cross section whose horizontal distance from the first target sampling point is not greater than a first preset distance, and the first target sampling point is one of the plurality of sampling points on the target cross section; If the number of the first auxiliary sampling points is greater than a preset number, the tangent slope corresponding to the first target sampling point is calculated according to the height data corresponding to the first target sampling point and the height data corresponding to a plurality of first auxiliary sampling points.
3. The method according to claim 2, characterized in that The distance between two adjacent sampling points on the target cross section is a preset distance, and if the number of the first auxiliary sampling points is not greater than the preset number, the method further includes: Generate at least one corresponding second auxiliary sampling point according to part or all of the plurality of first auxiliary sampling points; wherein the sum of the number of the first auxiliary sampling points and the number of the second auxiliary sampling points is greater than the preset number, the height data corresponding to the second auxiliary sampling point is the same as the height data of the corresponding first auxiliary sampling point, and the distance between the second auxiliary sampling point and the first target sampling point is the same as the distance between the first auxiliary sampling point corresponding to the second auxiliary sampling point and the first target sampling point; The tangent slope corresponding to the first target sampling point is calculated according to the height data corresponding to the first target sampling point, the height data corresponding to the plurality of first auxiliary sampling points, and the height data corresponding to the at least one second auxiliary sampling point.
4. The method according to claim 1, characterized in that The step of determining the left weld edge point and the right weld edge point corresponding to each cross section according to the tangent slope corresponding to each sampling point among the multiple sampling points on each cross section comprises: determining in sequence in a first order whether an absolute value of a tangent slope corresponding to each sampling point in a plurality of sampling points on a target cross section is greater than a preset slope, the target cross section being one of the plurality of cross sections; The left weld edge point and the right weld edge point are determined according to the first sampling point whose tangent slope absolute value is greater than the preset slope and the last sampling point whose slope absolute value is greater than the preset slope in the first sequence.
5. The method according to claim 4, characterized in that The step of determining the left weld edge point and the right weld edge point according to the first sampling point whose absolute value of the tangent slope is greater than the preset slope and the last sampling point whose absolute value of the slope is greater than the preset slope in the first sequence comprises: Determine a first reference point and a second reference point on the edge of the target cross section located on both sides of a second target sampling point; wherein the second target sampling point is one of the first sampling point whose tangent slope absolute value is greater than the preset slope and the last sampling point whose slope absolute value is greater than the preset slope in the first sequence, and the horizontal distances between the first reference point and the second reference point and the second target sampling point are both second preset distances; generating a reference straight line according to the first reference point and the second reference point; Determine an outer edge line of the target workpiece according to a plurality of sampling points between the first reference point and the second reference point; A point on the outer edge line that is farthest from the reference straight line is determined as the left weld edge point or the right weld edge point.
6. The method according to any one of claims 1 to 5, characterized in that: After generating a weld map of the target workpiece according to the target weld areas in the plurality of cross sections, the method further includes: The weld map is displayed, the weld map including a first area for characterizing a target weld area of the target workpiece and a second area for characterizing a non-target weld area of the target workpiece.
7. The method according to any one of claims 1 to 5, characterized in that: Before scanning the target workpiece to obtain height data corresponding to a plurality of sampling points on each of a plurality of cross sections of the target workpiece, the method further includes: Acquiring the processing stage of the target workpiece; If the target workpiece is in a pre-welding stage, a plurality of cross sections of the target workpiece are determined on the surface of the target workpiece, and a distance between any two adjacent cross sections in the plurality of cross sections is a third preset distance; Execute the scanning of the target workpiece to obtain height data corresponding to a plurality of sampling points on each of a plurality of cross sections of the target workpiece and subsequent steps; If the processing stage of the target workpiece is in the post-welding stage, a plurality of cross sections are determined in a target weld region of the target workpiece, a distance between any two adjacent cross sections of the plurality of cross sections is a fourth preset distance, and the third preset distance is greater than the fourth preset distance; Scanning a target workpiece to obtain height data corresponding to a plurality of sampling points on each of a plurality of cross sections of the target workpiece; A weld map of the target workpiece is generated according to a plurality of cross sections of the target workpiece.
8. The method according to any one of claims 1 to 5, characterized in that: After generating a weld map of the target workpiece according to the target weld areas in the plurality of cross sections, the method further includes: Determine characteristic information of the target workpiece according to the weld map of the target workpiece, wherein the characteristic information is one or more of weld joint position, joint depth, groove angle, weld width and weld penetration depth information; The target workpiece is quality inspected according to the characteristic information of the target workpiece to determine the welding quality of the target weld.
9. A device for generating a weld seam diagram, characterized in that: A method for generating a weld seam diagram, the device comprising: Scanning unit: used for scanning the target workpiece to obtain height data corresponding to multiple sampling points on each cross section of multiple cross sections of the target workpiece; the cross section is a cross section of the target workpiece in the direction of a line connecting a starting point and an end point of a scan; A calculation unit: used for respectively calculating the tangent slope corresponding to each of the plurality of sampling points according to the height data corresponding to the plurality of sampling points on each cross section; A determination unit: determining a left weld edge point and a right weld edge point corresponding to each cross section according to a tangent slope corresponding to each sampling point among a plurality of sampling points on each cross section; Determine the area between the left weld edge point and the right weld edge point in each cross section as the target weld area in each cross section; A generating unit is used to generate a weld map of the target workpiece according to the target weld areas in the multiple cross sections.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.