Method for acquiring relative position relation between linear welding seams and related equipment
By obtaining the projected distance from the endpoint of the current straight weld to the reference straight weld, the problem of insufficient accuracy and efficiency in obtaining the relative position relationship of welds in the prior art is solved, and rapid and accurate weld positioning is achieved.
Patent Information
- Application Number
- CN202511736980.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2025-12-26
AI Technical Summary
Existing weld inspection methods suffer from insufficient accuracy and efficiency in obtaining the relative positional relationship between straight welds, especially in the case of repeated straight welds, where it is difficult to quickly and accurately calculate their relative positions.
By obtaining the projected distances from the endpoint of the current straight weld to the reference straight weld, including the starting point projection distance and the ending point projection distance, the relative positional relationship between the current straight weld and the reference straight weld is determined based on these projected distances.
It enables the rapid and accurate acquisition of the relative positional relationship between welds, improving the positioning accuracy and efficiency of the welding system.
Smart Images

Figure CN121213664A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of welding, in particular to a method for obtaining relative position relationship between straight weld seams and related equipment. BACKGROUND
[0002] In the visual detection link of modern intelligent welding systems, the existing weld detection scheme detects and filters the face structure composed of planar cylindrical surfaces using prior knowledge, and uses the weld end points existing in the face structure to form straight weld seams and circular arc weld seams. In this process, there are repeated straight weld seams with the same two end face structures. In order to accurately position the straight weld seams, it is necessary to calculate the relative position relationship between the repeated straight weld seams.
[0003] How to quickly and accurately obtain the relative position relationship between the weld seams has become a hot and difficult problem for those skilled in the art. SUMMARY
[0004] The purpose of the present application is to provide a method for obtaining relative position relationship between straight weld seams and related equipment to improve the above problems.
[0005] In order to achieve the above purpose, the technical solutions adopted by the embodiments of the present application are as follows: In a first aspect, the embodiments of the present application provide a method for obtaining relative position relationship between straight weld seams, which comprises: obtaining the projection distance of the end point of the current straight weld seam to the reference straight weld seam, wherein the reference straight weld seam is any one of the repeated straight weld seams corresponding to the current straight weld seam, and the projection distance comprises a start point projection distance and an end point projection distance; determining the relative position relationship between the current straight weld seam and the reference straight weld seam based on the projection distance.
[0006] In a second aspect, the embodiments of the present application provide a device for obtaining relative position relationship between straight weld seams, which comprises: a first processing unit configured to obtain the projection distance of the end point of the current straight weld seam to the reference straight weld seam, wherein the reference straight weld seam is any one of the repeated straight weld seams corresponding to the current straight weld seam, and the projection distance comprises a start point projection distance and an end point projection distance; a second processing unit configured to determine the relative position relationship between the current straight weld seam and the reference straight weld seam based on the projection distance.
[0007] In a third aspect, the embodiments of the present application provide a storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the above method.
[0008] In a fourth aspect, an electronic device is provided, and the electronic device includes a processor and a memory storing one or more programs, and when the one or more programs are executed by the processor, the above method is implemented.
[0009] With respect to the prior art, the method and related device for obtaining relative position relationship between linear weld seams provided by the embodiments of the present application obtain the projection distance of the end point of the current linear weld seam to the reference linear weld seam, wherein the reference linear weld seam is any weld seam in the repeated linear weld seam corresponding to the current linear weld seam, and the projection distance includes the start point projection distance and the end point projection distance; and the relative position relationship between the current linear weld seam and the reference linear weld seam is determined based on the projection distance. The projection distance of the start point and the end point of the current linear weld seam to the reference linear weld seam is obtained, and the relative position relationship between the current linear weld seam and the reference linear weld seam is determined based on the obtained projection distance, so as to achieve the purpose of quickly and accurately obtaining the relative position relationship between the weld seams.
[0010] In order to make the above objectives, characteristics and advantages of the present application more apparent, the following will describe preferred embodiments in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as a limitation to the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor.
[0012] Figure 1 One of the schematic diagrams of the relative position relationship provided by the embodiments of the present application.
[0013] Figure 2 The schematic diagram of the camera coplanar with the linear provided by the embodiments of the present application.
[0014] Figure 3 The structural schematic diagram of the electronic device provided by the embodiments of the present application.
[0015] Figure 4 One of the flow schematic diagrams of the method for obtaining relative position relationship between linear weld seams provided by the embodiments of the present application.
[0016] Figure 5 The auxiliary surface structure schematic diagram provided by the embodiments of the present application.
[0017] Figure 6 The surface structure schematic diagram provided by the embodiments of the present application.
[0018] Figure 7The second schematic diagram of relative position relationship provided by the embodiment of the present application.
[0019] Figure 8 The second schematic diagram of the flow of the method for obtaining relative position relationship between linear welds provided by the embodiment of the present application.
[0020] Figure 9 The schematic diagram of relative position relationship in the case of co-line provided by the embodiment of the present application.
[0021] Figure 10 The third schematic diagram of the flow of the method for obtaining relative position relationship between linear welds provided by the embodiment of the present application.
[0022] Figure 11 The schematic diagram of positive direction of camera coordinates on linear reference surface provided by the embodiment of the present application.
[0023] Figure 12 The schematic diagram of reverse direction of camera coordinates on linear reference surface provided by the embodiment of the present application.
[0024] Figure 13 The fourth schematic diagram of the flow of the method for obtaining relative position relationship between linear welds provided by the embodiment of the present application.
[0025] Figure 14 The first schematic diagram of position of linear reference surface provided by the embodiment of the present application.
[0026] Figure 15 The second schematic diagram of position of linear reference surface provided by the embodiment of the present application.
[0027] Figure 16 The fifth schematic diagram of the flow of the method for obtaining relative position relationship between linear welds provided by the embodiment of the present application.
[0028] Figure 17 The schematic diagram of coplanar of camera coordinates, reference linear weld and current linear weld provided by the embodiment of the present application.
[0029] Figure 18 The unit schematic diagram of the device for obtaining relative position relationship between linear welds provided by the embodiment of the present application.
[0030] In the figure: 10-processor; 11-memory; 12-bus; 13-communication interface; 501-first processing unit; 502-second processing unit. DETAILED DESCRIPTION
[0031] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.
[0032] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present application.
[0033] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Meanwhile, in the description of the present application, the terms "first", "second" and the like are only used to distinguish description, and cannot be understood as indicating or implying relative importance.
[0034] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Meanwhile, in the description of the present application, the terms "first", "second" and the like are only used to distinguish description, and cannot be understood as indicating or implying relative importance.
[0035] In the description of the present application, it should be noted that the terms "upper", "lower", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship commonly placed when the product of the present application is used, and are only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the indicated device or element must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.
[0036] In the description of the present application, it is also necessary to explain that, unless otherwise explicitly specified and limited, the terms "set", "connected" should be understood broadly, for example, it can be fixedly connected, or detachably connected, or integrally connected; it can be mechanically connected, or electrically connected; it can be directly connected, or indirectly connected through an intermediate medium, or it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0037] Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The following examples and features in the examples can be combined with each other without conflict.
[0038] The relative position relationship in the embodiment of the present application refers to the position relationship of two straight line welds in the same direction under the visual angle of shooting the weld. The relationship is irrelevant to the length of the straight line and the distance between them. The relative position relationship can be simply divided into three categories: parallel, collinear and irrelevant, wherein the parallel includes upper parallel, lower parallel, far side parallel and near side parallel, and the collinear includes left collinear, right collinear, covered collinear, covering collinear, overlapping on the forward extension line collinear and overlapping on the reverse extension line collinear. Please refer to Figure 1 Figure 1 One of the schematic diagrams of the relative position relationship provided by the embodiment of the present application.
[0039] It should be noted that the far side and the near side belong to special cases in theory. Please refer to Figure 2 Figure 2 The schematic diagram of the camera coplanar with the straight line provided by the embodiment of the present application. When the point where the camera is located and the two parallel and non-collinear straight lines are in the same plane, the two straight lines do not have the relationship of up, down, left and right. Only in the case that the point where the camera is located TCP is not between the two straight lines (the projection direction of the TCP1 and TCP3 of Figure 2 to the two straight lines is the same), the two straight lines have the relationship of far and near. In reality, since the visual angle cannot shoot the plane where the weld is located, there is almost no relationship of far and near. If the corresponding situation occurs, the shooting pose can be adjusted to obtain a more robust relative position relationship. There is another case that the camera is located between the two straight lines (such as the shadow area where the TCP2 of Figure 2 is located), at this time the two straight lines do not have the relative position relationship, that is, the relative position relationship cannot be determined, and the shooting pose can be adjusted to obtain a more robust relative position relationship.
[0040] The electronic device provided by the embodiment of the present application can be any one of a computer device, a mobile phone device and a server device. Please refer to Figure 3 , a structural schematic diagram of an electronic device. The electronic device comprises a processor 10, a memory 11, and a bus 12. The processor 10 and the memory 11 are connected through the bus 12. The processor 10 is configured to execute an executable module stored in the memory 11, such as a computer program.
[0041] The processor 10 can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the method for acquiring relative position relationship between linear weld seams can be completed by integrated logic circuits of hardware or instructions in the form of software in the processor 10. The processor 10 described above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be 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.
[0042] The memory 11 can include a high-speed random access memory (RAM) and can also include a non-volatile memory, such as at least one disk memory.
[0043] The bus 12 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, etc. Figure 3 Only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus 12 or only one type of bus 12.
[0044] The memory 11 is configured to store a program, such as a program corresponding to the device for acquiring relative position relationship between linear weld seams. The device for acquiring relative position relationship between linear weld seams comprises at least one software function module which can be stored in the memory 11 in the form of software or firmware or solidified in an operating system (OS) of the electronic device. After receiving an execution instruction, the processor 10 executes the program to implement the method for acquiring relative position relationship between linear weld seams.
[0045] Possibly, the electronic device provided by the embodiment of the present application further comprises a communication interface 13. The communication interface 13 is connected with the processor 10 through the bus.
[0046] It should be understood that, Figure 3 The structure shown is only a schematic diagram of the structure of part of the electronic device, and the electronic device can further comprise more or fewer components than those shown in the figures, or have a different configuration from that shown in the figures. Figure 3 The components shown in the figures can be realized in hardware, software or a combination thereof. Figure 3 Figure 3 The straight seam relative position relationship acquisition method provided by the embodiment of the present application can be applied to, but is not limited to, the electronic device shown in the figures. For the specific process, please refer to
[0047] The straight seam relative position relationship acquisition method comprises S11 and S12, which are specifically described as follows. Figure 3 Figure 4 S11, the projection distance of the end point of the current straight seam to the reference straight seam is acquired.
[0048] S11, the projection distance of the end point of the current straight seam to the reference straight seam is acquired.
[0049] The reference straight seam is any one of the repeated straight seams corresponding to the current straight seam, and the projection distance comprises a start point projection distance and an end point projection distance. The projection point of the end point of the current straight seam on the reference straight seam is located on the reference straight seam or its extension line.
[0050] The repeated straight seam is a straight seam whose main surface structure or auxiliary surface structure is the same as that of the current straight seam, the plane normal vectors of the same surface structures are consistent, and the included angle between the repeated straight seam and the current straight seam is less than an angle threshold or greater than 180°-the angle threshold. The value range of the angle threshold is 5-10°.
[0051] The main surface structure or auxiliary surface structure of the repeated straight seam is the same as that of the current straight seam, which comprises that the main surface structure or auxiliary surface structure of the start point of the repeated straight seam is the same as that of the start point of the current straight seam, and the main surface structure or auxiliary surface structure of the end point of the repeated straight seam is the same as that of the end point of the current straight seam.
[0052] A straight seam has two end points, each end point corresponds to one or two surface structures, and can be divided into a main surface structure and an auxiliary surface structure, but not all end points have corresponding auxiliary surface structures. Among them, the auxiliary surface structure only appears in the case where the main surface structure is a three-surface plane structure, and the auxiliary surface structure is a two-surface plane structure contained in the disassembled intersection line in the three-surface plane structure, please refer to Figure 5 , Figure 5 The auxiliary surface structure schematic diagram provided by the embodiment of the present application. The starting point of the weld has only the main surface structure, and the end point of the weld has both the main surface structure and the auxiliary surface structure.
[0053] Please refer to Figure 6 , Figure 6 The surface structure schematic diagram provided by the embodiment of the present application. The surface structure includes two-face concave plane structure, two-face convex plane structure, three-face concave plane structure, three-face two-convex-one-concave plane structure, and three-face two-concave-one-convex plane structure.
[0054] S12, determining the relative position relationship between the current straight weld and the reference straight weld based on the projection distances.
[0055] In the embodiment of the present application, the projection distances of the starting point and the end point of the current straight weld to the reference straight weld are obtained, and the relative position relationship between the current straight weld and the reference straight weld is determined through the obtained projection distances, so as to achieve the purpose of quickly and accurately obtaining the relative position relationship between the welds.
[0056] On the basis of the foregoing, regarding the content in S12, the embodiment of the present application further provides an optional implementation manner, please refer to the following. S12, determining the relative position relationship between the current straight weld and the reference straight weld based on the projection distances, comprising: S121, when the starting point projection distance and the end point projection distance are both less than the distance threshold value, determining that the current straight weld and the reference straight weld are collinear.
[0057] The distance threshold value can be but is not limited to 2.5 mm, and the specific value considers the workpiece size and detection accuracy, and the value determines the allowable degree of the angle difference of the algorithm.
[0058] S122, when only one of the starting point projection distance and the end point projection distance is less than the distance threshold value, determining that the current straight weld and the reference straight weld are irrelevant.
[0059] S123, when the starting point projection distance and the end point projection distance are both greater than the distance threshold value, determining that the current straight weld and the reference straight weld are parallel.
[0060] It should be understood that the straight weld obtained by modeling is almost impossible to achieve theoretical parallelism or collinearity, so in the case that there is a certain angle difference between the two straight lines, the two straight lines are still determined to be parallel or collinear, please refer to Figure 7 , Figure 7 The second relative position relationship schematic diagram provided by the embodiment of the present application.
[0061] On the basis of the foregoing, regarding how to determine a more detailed relative position relationship, the embodiment of the present application further provides an optional implementation manner, please refer to Figure 8When it is determined that the current straight seam is collinear with the reference straight seam, the method for obtaining the relative position relationship between straight seams further comprises: S21 to S27, which are specifically described as follows.
[0062] S21, obtain an angle information set according to the end points of the current straight seam and the end points of the reference straight seam.
[0063] The angle information set comprises a first angle, a second angle, a third angle and a fourth angle, the i-th angle is an angle between the i-th direction vector and the current straight seam, the start point of the first direction vector is the start point of the current straight seam, the end point of the first direction vector is the start point of the reference straight seam, the start point of the second direction vector is the start point of the current straight seam, the end point of the second direction vector is the end point of the reference straight seam, the start point of the third direction vector is the end point of the current straight seam, the end point of the third direction vector is the start point of the reference straight seam, the start point of the fourth direction vector is the end point of the current straight seam, and the end point of the fourth direction vector is the end point of the reference straight seam.
[0064] S22, if the first angle, the second angle, the third angle and the fourth angle are all less than or equal to 90°, it is determined that the reference straight seam is located on the right side of the current straight seam.
[0065] S23, if the first angle, the second angle, the third angle and the fourth angle are all greater than 90°, it is determined that the reference straight seam is located on the left side of the current straight seam.
[0066] S24, if the first angle, the second angle and the fourth angle are all less than or equal to 90°, and the third angle is greater than 90°, it is determined that the reference straight seam partially overlaps the current straight seam and is located on the positive extension line of the current straight seam.
[0067] S25, if the first angle, the third angle and the fourth angle are all greater than 90°, and the second angle is less than or equal to 90°, it is determined that the reference straight seam partially overlaps the current straight seam and is located on the negative extension line of the current straight seam.
[0068] S26, if the first angle and the second angle are both less than or equal to 90°, and the third angle and the fourth angle are both greater than 90°, it is determined that the reference straight seam is covered by the current straight seam.
[0069] S27, if the second angle and the fourth angle are both less than or equal to 90°, and the first angle and the third angle are both greater than 90°, it is determined that the current straight seam is covered by the reference straight seam.
[0070] For the partial relative position relationship in the collinear case, please refer to Figure 9 , Figure 9 is a schematic diagram of the relative position relationship in the collinear case provided by the embodiment of the present application.
[0071] On the basis of the foregoing, the embodiment of the present application further provides an optional implementation for determining a more detailed relative position relationship, please refer to Figure 10 When it is determined that the current straight seam is parallel to the reference straight seam, the method for acquiring the relative position relationship between straight seams further comprises S301 to S308, which are specifically described as follows.
[0072] S301, a coordinate reference plane is constructed according to a coordinate connecting line and the current straight seam, and a plane normal vector of the coordinate reference plane is acquired.
[0073] The coordinate connecting line is a connecting line between a camera coordinate (TCP) used when the point cloud is photographed and the end point of the current straight seam. Optionally, a vector is determined according to the direction of the coordinate connecting line and the direction of the current straight seam, as the plane normal vector of the coordinate reference plane, and the coordinate reference plane can be obtained after the plane normal vector is determined.
[0074] The reference projection vector is a vector from the projection point of the end point of the reference straight seam on the coordinate reference plane to the end point of the reference straight seam. S303, a first reference angle between the reference projection vector and the plane normal vector of the coordinate reference plane is acquired.
[0075] S304, in the case that the first reference angle is not equal to 90°, an end point projection vector of the end point of the current straight seam projected on the reference straight seam is acquired, and an angle between the end point projection vector and the plane normal vector of the plane constituted by the current straight seam is calculated, including a second reference angle and a third reference angle. The start point of the end point projection vector is the end point of the current straight seam, and the end point of the end point projection vector is the projection point of the end point of the current straight seam on the reference straight seam.
[0076] It should be understood that because one seam corresponds to two constituent planes, there are two reference angles.
[0077] S305, if the second reference angle and the third reference angle are both greater than 90°, a normal vector of the straight reference plane is determined according to the direction of the end point projection vector and the direction of the current straight seam.
[0078] S306, if the second reference angle and the third reference angle are both less than 90°, a normal vector of the straight reference plane is determined according to the opposite direction of the end point projection vector and the direction of the current straight seam.
[0079] S307, the camera coordinate is projected on the straight reference plane to obtain a coordinate projection vector, the start point of the coordinate projection vector is the projection point of the camera coordinate on the straight reference plane, and the end point of the coordinate projection vector is the camera coordinate.
[0080] S308, determining the relative position relationship between the current linear weld and the reference linear weld in the parallel state according to the first reference included angle, the coordinate projection vector and the normal vector of the linear reference surface.
[0081] Optionally, S308, determining the relative position relationship between the current linear weld and the reference linear weld in the parallel state according to the first reference included angle, the coordinate projection vector and the normal vector of the linear reference surface, comprises: S308A and S308B, which are specifically described as follows.
[0082] S308A, in the case that the coordinate projection vector and the normal vector of the linear reference surface are in the same direction (the description camera coordinate TCP is in the positive direction of the linear reference surface), if the first reference included angle is less than 90°, it is determined that the reference linear weld is located on the upper side of the current linear weld; if the first reference included angle is greater than 90°, it is determined that the reference linear weld is located on the lower side of the current linear weld.
[0083] S308B, in the case that the coordinate projection vector and the normal vector of the linear reference surface are in opposite directions (the description camera coordinate TCP is in the opposite direction of the linear reference surface), if the first reference included angle is less than 90°, it is determined that the reference linear weld is located on the lower side of the current linear weld; if the first reference included angle is greater than 90°, it is determined that the reference linear weld is located on the upper side of the current linear weld.
[0084] Please refer to Figure 11 and Figure 12 , Figure 11 the positive direction of the linear reference surface of the camera coordinate provided by the embodiment of the application, Figure 12 the opposite direction of the linear reference surface of the camera coordinate provided by the embodiment of the application.
[0085] Please refer to Figure 13 , in the case that the second reference included angle and the third reference included angle do not satisfy the condition of being greater than 90° at the same time, and the second reference included angle and the third reference included angle do not satisfy the condition of being less than 90° at the same time, it is indicated that the linear reference surface is not between the two planes constituting the linear weld, and the relative position relationship obtaining method between the linear welds further comprises: S309 and S310, which are specifically described as follows.
[0086] S309, if the first reference included angle is less than 90°, it is determined that the reference linear weld is located on the upper side of the current linear weld.
[0087] S310, if the first reference included angle is greater than 90°, it is determined that the reference linear weld is located on the lower side of the current linear weld.
[0088] Please refer to Figure 14 and Figure 15 , Figure 14 one of the position schematic diagrams of the linear reference surface provided by the embodiment of the application, Figure 15Positioning diagram 2 of linear reference surface for providing embodiments of the present application; Figure 14 The linear reference surface is shown between the two planes constituting the current linear weld, Figure 15 The linear reference surface is shown not between the two planes constituting the current linear weld.
[0089] Please refer to Figure 16 In an alternative embodiment, the method for obtaining the relative positional relationship between linear welds further comprises S311, S312 and S313, which are described as follows.
[0090] S311, in the case where the first reference angle is equal to 90° (indicating that the camera coordinates are coplanar with the reference linear weld and the current linear weld), a first projection vector and a first projection distance of the camera coordinates to the current linear weld are obtained.
[0091] S312, a second projection vector and a second projection distance of the camera coordinates to the reference linear weld are obtained.
[0092] S313, in the case where the angle between the first projection vector and the second projection vector is less than 90°, if the first projection distance is greater than the second projection distance, it is determined that the reference linear weld is located on the near side of the current linear weld relative to the camera coordinates, and if the second projection distance is greater than the first projection distance, it is determined that the reference linear weld is located on the far side of the current linear weld relative to the camera coordinates.
[0093] In the case where the angle between the first projection vector and the second projection vector is less than 90°, a warning "suggest adjusting the shooting pose" can also be issued. If the angle between the first projection vector and the second projection vector is greater than 90°, the current TCP cannot determine the relative positional relationship between the linear one and the linear two, and an error "unable to confirm the relative positional relationship, adjust the shooting pose" is reported.
[0094] Please refer to Figure 17 , Figure 17 The coplanar diagram of the camera coordinates and the reference linear weld and the current linear weld provided by the embodiments of the present application is shown.
[0095] On the basis of the foregoing, regarding how to determine the relative positional relationship between the linear weld and all the repeated linear welds, the embodiments of the present application further provide an alternative embodiment, please refer to the following.
[0096] Step 1, determine whether i is less than or equal to the total number of linear welds in the weld database, the initial value of i is 1. If not, end, indicating that all repeated execution welds and corresponding relative positional relationship groups have been obtained. If yes, perform step 2.
[0097] Step 2, determine whether j is less than or equal to the total number of straight welds in the weld database. If not, then let i++, and repeat Step 1; if yes, then perform Step 3.
[0098] Step 3, determine whether j is equal to i. If yes, then let j++, and repeat Step 2; if not, then perform Step 4.
[0099] Step 4, determine the angle between the i-th straight weld and the j-th straight weld relative to the angle threshold. If angle threshold ≤ angle ≤ 180° - angle threshold, then let j++, and repeat Step 2; if angle is less than angle threshold, then perform Step 6; if angle is greater than 180° - angle threshold, then perform Step 5.
[0100] Step 5, adjust the direction of the j-th straight weld (take the opposite direction). And after Step 5 is performed, perform Step 6.
[0101] Step 6, determine whether the start face structure type of the i-th straight weld is the same as the start face structure type of the j-th straight weld. If not, then perform Step 7; if yes, then perform Step 9.
[0102] Step 7, determine whether the start face structure of the j-th straight weld is a three-face structure. If yes, then perform Step 8; if not, then let j++, and repeat Step 2.
[0103] Step 8, use the auxiliary face structure of the start of the j-th straight weld to replace its main face structure. And perform Step 9.
[0104] Step 9, determine the first set of plane normal angles of the start face structure of the i-th straight weld and the j-th straight weld. Let j++ when the first set of plane normal angles is greater than or equal to the plane angle threshold, and repeat Step 2. Perform Step 10 when the first set of plane normal angles is less than the plane angle threshold.
[0105] Step 10, determine whether the end face structure type of the i-th straight weld is the same as the end face structure type of the j-th straight weld. If not, then perform Step 11; if yes, then perform Step 13.
[0106] Step 11, determine whether the end face structure of the j-th straight weld is a three-face structure. If yes, then perform Step 12; if not, then let j++, and repeat Step 2.
[0107] Step 12, use the auxiliary face structure of the end of the j-th straight weld to replace its main face structure. And perform Step 13.
[0108] Step 13, determine the second set of plane normal included angles of the end point face structures of the i th linear weld and the j th linear weld. When the second set of plane normal included angles is greater than or equal to the plane included angle threshold, j is incremented by 1, and step 2 is repeatedly executed. When the second set of plane normal included angles is less than the plane included angle threshold, it is indicated that the j th linear weld is the repeated linear weld of the i th linear weld, and step 14 is executed.
[0109] Step 14, the relative position relationship acquisition method of the linear welds described above is executed to determine the relative position relationship of the i th linear weld and the j th linear weld.
[0110] After step 14 is executed, j is incremented by 1, and step 2 is repeatedly executed.
[0111] The corresponding repeated linear weld and the relative position relationship of each linear weld can be found from the input weld database, so that the subsequent step can use the relative position relationship of the reference linear to match the detected linear, and distinguish the unique detection result corresponding to each reference linear.
[0112] The repeated linear weld should have the following characteristics: the weld direction is the same, and the face structure types and characteristics corresponding to the end points are consistent. Since the three-face structure is a two-face structure when not completely photographed, when the main face structure corresponding to the end point of a linear is a three-face structure, the auxiliary face structure can be used instead of the main face structure to compare the face structure characteristics with the two-face structure.
[0113] Please refer to Figure 18 , Figure 18 A linear weld relative position relationship acquisition device is provided for an embodiment of the present application. Optionally, the linear weld relative position relationship acquisition device is applied to the electronic device described above.
[0114] The linear weld relative position relationship acquisition device comprises a first processing unit 501 and a second processing unit 502.
[0115] The first processing unit 501 is configured to acquire a projection distance of an end point of a current linear weld to a reference linear weld, wherein the reference linear weld is any one of the repeated linear welds corresponding to the current linear weld, and the projection distance comprises a start point projection distance and an end point projection distance. The second processing unit 502 is configured to determine a relative position relationship of the current linear weld and the reference linear weld based on the projection distance.
[0116] Optionally, the first processing unit 501 can execute S11 described above, and the second processing unit 502 can execute other steps in the method embodiment described above.
[0117] It should be noted that the relative position relationship acquisition device between straight weld seams provided in the embodiment can execute the method processes shown in the method process embodiment to achieve the corresponding technical effects. For brevity, the part not mentioned in the embodiment can be referred to the corresponding content in the above embodiment.
[0118] The embodiment of the present application further provides a storage medium which stores computer instructions and programs, and the computer instructions and programs execute the relative position relationship acquisition method between straight weld seams in the above embodiment when being read and run. The storage medium can include a memory, a flash memory, a register or a combination thereof.
[0119] The following provides an electronic device, which can be any one of a computer device, a mobile phone device and a server device, and the electronic device can implement the relative position relationship acquisition method between straight weld seams as shown in the Figure 3 The electronic device includes a processor 10, a memory 11 and a bus 12. The processor 10 can be a CPU. The memory 11 is used to store one or more programs, and when the one or more programs are executed by the processor 10, the relative position relationship acquisition method between straight weld seams in the above embodiment is executed.
[0120] In summary, the embodiment of the present application provides a relative position relationship acquisition method between straight weld seams and related equipment. The projection distance of the end point of the current straight weld seam to the reference straight weld seam is obtained, wherein the reference straight weld seam is any one of the repeated straight weld seams corresponding to the current straight weld seam, and the projection distance includes a start point projection distance and a terminal point projection distance. The relative position relationship between the current straight weld seam and the reference straight weld seam is determined based on the projection distance. The projection distance of the start point and the terminal point of the current straight weld seam to the reference straight weld seam is obtained, and the relative position relationship between the current straight weld seam and the reference straight weld seam is determined through the obtained projection distance, so as to quickly and accurately obtain the relative position relationship between the weld seams.
[0121] The above only describes the preferred embodiments of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0122] It will be apparent to those skilled in the art that the application is not limited to the details of the above-exemplified embodiments and that the present application can be implemented in other particular forms without departing from the spirit or essential characteristics of the present application. The embodiments should therefore be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the above description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. No reference signs in the claims should be considered as limiting the scope of the claims with respect to the figures of the patent document.
Claims
1. A method of acquiring relative positional relationship between linear weld seams, characterized by, The method comprises: acquiring a projection distance of an end point of a current straight seam to a reference straight seam, wherein the reference straight seam is any one of the repeated straight seams corresponding to the current straight seam, and the projection distance comprises a start point projection distance and an end point projection distance; determining a relative position relationship between the current straight seam and the reference straight seam based on the projection distance.
2. The method of claim 1, wherein The determination of the relative position relationship between the current straight seam and the reference straight seam based on the projection distance comprises: when both the start point projection distance and the end point projection distance are less than a distance threshold, determining that the current straight seam and the reference straight seam are collinear; when only one of the start point projection distance and the end point projection distance is less than the distance threshold, determining that the current straight seam and the reference straight seam are irrelevant; when both the start point projection distance and the end point projection distance are greater than the distance threshold, determining that the current straight seam and the reference straight seam are parallel.
3. The method of claim 2, wherein When it is determined that the current straight seam and the reference straight seam are collinear, the method further comprises: acquiring a set of included angle information according to the end points of the current straight seam and the reference straight seam, wherein the set of included angle information comprises a first included angle, a second included angle, a third included angle, and a fourth included angle, the first included angle is an included angle between a first direction vector and the current straight seam, the start point of the first direction vector is the start point of the current straight seam, and the end point of the first direction vector is the start point of the reference straight seam, the start point of a second direction vector is the start point of the current straight seam, the end point of the second direction vector is the end point of the reference straight seam, the start point of a third direction vector is the end point of the current straight seam, the end point of the third direction vector is the start point of the reference straight seam, the start point of a fourth direction vector is the end point of the current straight seam, and the end point of the fourth direction vector is the end point of the reference straight seam; if the first included angle, the second included angle, the third included angle, and the fourth included angle are all less than or equal to 90°, it is determined that the reference straight seam is located on the right side of the current straight seam; if the first included angle, the second included angle, the third included angle, and the fourth included angle are all greater than 90°, it is determined that the reference straight seam is located on the left side of the current straight seam; if the first included angle, the second included angle, and the fourth included angle are all less than or equal to 90°, and the third included angle is greater than 90°, it is determined that the reference straight seam partially overlaps the current straight seam and is located on the positive extension line of the current straight seam; if the first included angle, the third included angle, and the fourth included angle are all greater than 90°, and the second included angle is less than or equal to 90°, it is determined that the reference straight seam partially overlaps the current straight seam and is located on the negative extension line of the current straight seam; if the first included angle and the second included angle are both less than or equal to 90°, and the third included angle and the fourth included angle are both greater than 90°, it is determined that the reference straight seam is covered by the current straight seam. If the second and fourth angles are both less than or equal to 90°, and the first and third angles are both greater than 90°, it is determined that the current straight weld is covered by the reference straight weld.
4. The method of claim 2, wherein When it is determined that the current straight weld is parallel to the reference straight weld, the method further comprises: a coordinate reference plane is constructed according to a coordinate connecting line and the current straight weld, and a plane normal vector of the coordinate reference plane is obtained, wherein the coordinate connecting line is a connecting line between a camera coordinate used when the point cloud is photographed and an end point of the current straight weld; a reference projection vector is obtained, wherein the reference projection vector is a vector from a projection point of an end point of the reference straight weld on the coordinate reference plane to the end point of the reference straight weld; a first reference angle between the reference projection vector and the plane normal vector of the coordinate reference plane is obtained; in a case where the first reference angle is not equal to 90°, an end point projection vector of the end point of the current straight weld projected onto the reference straight weld is obtained, and an angle between the end point projection vector and a plane normal vector of a plane constituted by the current straight weld is calculated, including a second reference angle and a third reference angle; if the second reference angle and the third reference angle are both greater than 90°, a normal vector of a straight reference plane is determined according to the end point projection vector and a direction of the current straight weld; if the second reference angle and the third reference angle are both less than 90°, a normal vector of a straight reference plane is determined according to a reverse direction of the end point projection vector and the direction of the current straight weld; a coordinate projection vector is obtained by projecting the camera coordinate onto the straight reference plane, wherein a starting point of the coordinate projection vector is a projection point of the camera coordinate on the straight reference plane, and an end point of the coordinate projection vector is the camera coordinate; a relative positional relationship between the current straight weld and the reference straight weld in a parallel state is determined according to the first reference angle, the coordinate projection vector and the normal vector of the straight reference plane.
5. The method of claim 4, wherein The determination of the relative positional relationship between the current straight weld and the reference straight weld in the parallel state according to the first reference angle, the coordinate projection vector and the normal vector of the straight reference plane comprises: in a case where the coordinate projection vector and the normal vector of the straight reference plane are in the same direction, if the first reference angle is less than 90°, it is determined that the reference straight weld is located on an upper side of the current straight weld; if the first reference angle is greater than 90°, it is determined that the reference straight weld is located on a lower side of the current straight weld; in a case where the coordinate projection vector and the normal vector of the straight reference plane are in opposite directions, if the first reference angle is less than 90°, it is determined that the reference straight weld is located on the lower side of the current straight weld; if the first reference angle is greater than 90°, it is determined that the reference straight weld is located on the upper side of the current straight weld.
6. The method of claim 4, wherein In a case where the second reference angle and the third reference angle do not satisfy both being greater than 90°, and the second reference angle and the third reference angle do not satisfy both being less than 90°, the method further comprises: If the first reference angle is less than 90°, it is determined that the reference straight weld is located on the upper side of the current straight weld; if the first reference angle is greater than 90°, it is determined that the reference straight weld is located on the lower side of the current straight weld.
7. The method of claim 4, wherein the method further comprises: determining a relative position relationship between the first straight weld and the second straight weld based on the first straight weld and the second straight weld. The method further comprises: In the case that the first reference angle is equal to 90°, a first projection vector and a first projection distance of the camera coordinate to the current straight weld are obtained; A second projection vector and a second projection distance of the camera coordinate to the reference straight weld are obtained; In the case that the angle between the first projection vector and the second projection vector is less than 90°, if the first projection distance is greater than the second projection distance, it is determined that the reference straight weld is located on the near side of the current straight weld relative to the camera coordinate, and if the second projection distance is greater than the first projection distance, it is determined that the reference straight weld is located on the far side of the current straight weld relative to the camera coordinate.
8. A device for obtaining the relative positional relationship between straight welds, characterized in that, The apparatus comprises: A first processing unit configured to obtain a projection distance of an endpoint of a current straight weld to a reference straight weld, wherein the reference straight weld is any one of the repeated straight welds corresponding to the current straight weld, and the projection distance comprises a start point projection distance and an end point projection distance; A second processing unit configured to determine a relative position relationship between the current straight weld and the reference straight weld based on the projection distance.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the method of any one of claims 1-7.
10. An electronic device, comprising: Comprise: A processor and a memory for storing one or more programs; When the one or more programs are executed by the processor, the method of any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Image geometric correction method based on straight line segments
CN103177441A
Robot synchronous positioning and map construction method and system
CN108090958A
Line segment sequence detection method for expressing surface feature edge
CN112862847A
Projection method and system based on horizontal correction of distance sensor, and storage medium
CN113163186A
Method, system and device for determining position of welding starting point
CN113770533A
Cited By
Welded part point cloud normal vector direction correction and weld joint identification method
CN121998986A