Linear welding seam recognition method and device, electronic equipment and readable storage medium

By calculating plane intersection lines and analyzing concave and convexity, the error problem caused by ignoring concave and convexity in linear weld recognition is solved, and the accuracy of identification is improved.

CN119048422APending Publication Date: 2024-11-29FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410949229.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The prior art is prone to identification errors due to neglecting concaveness and convexity in linear weld recognition, and the accuracy rate is not high.

Method used

By calculating the plane intersection line, the position of the suspected linear weld is obtained, and its concaveness is analyzed to determine whether it is a linear weld.

Benefits of technology

The accuracy of linear weld recognition is improved and erroneous recognition is avoided due to ignoring concave and convexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048422A_ABST
    Figure CN119048422A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a linear welding seam recognition method and device, electronic equipment and a readable storage medium, and relates to the technical field of computers. The method comprises the steps that the position of a suspected linear welding seam is calculated according to a first target plane equation and a second target plane equation, the first target plane equation and the second target plane equation are obtained by conducting plane detection on a point cloud to be detected, and the position of the suspected linear welding seam is expressed through a linear equation; according to the position of the suspected linear welding seam, the type of the suspected linear welding seam is determined through analysis, and the type is a concave welding seam or a convex welding seam; and according to the type of the suspected linear welding seam, whether the suspected linear welding seam is a linear welding seam is judged. In this way, the situation that due to neglecting of concavity and convexity, linear welding seam recognition is wrong can be avoided, and the linear welding seam recognition accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a linear weld recognition method, device, electronic device and readable storage medium. Background Art

[0002] Linear weld recognition is mainly used in the fields of automatic welding and weld tracking to identify and locate the position of linear welds. Vision-based weld recognition is one of the most common methods, in which linear weld recognition is generally performed in the following way: using a 3D camera to capture a point cloud image, performing plane detection on the point cloud image to obtain a plane equation, calculating the line intersection equation based on the plane equation, and then using the position represented by the line intersection equation as the identified linear weld position. However, some linear intersections are not actually the required linear welds, which means that linear weld recognition errors may occur. Summary of the invention

[0003] The embodiments of the present application provide a method, device, electronic device and readable storage medium for recognizing a straight line weld, which determines whether the suspected straight line weld is a straight line weld based on the position and convexity of the suspected straight line weld obtained by calculating the intersection of planes, thereby avoiding the situation where the straight line weld is incorrectly recognized due to ignoring the convexity and concavity, and improving the accuracy of straight line weld recognition.

[0004] The embodiments of the present application can be implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a linear weld recognition method, the method comprising:

[0006] The position of the suspected straight weld is calculated according to the first target plane equation and the second target plane equation, wherein the first target plane equation and the second target plane equation are obtained by performing plane detection on the point cloud to be detected, and the position of the suspected straight weld is represented by a straight line equation;

[0007] Determining the type of the suspected straight weld by analysis according to the position of the suspected straight weld, wherein the type is a concave weld or a convex weld;

[0008] According to the type of the suspected straight line weld, it is determined whether the suspected straight line weld is a straight line weld.

[0009] In a second aspect, an embodiment of the present application provides a linear weld recognition device, the device comprising:

[0010] A calculation module, used for calculating the position of the suspected straight line weld according to the first target plane equation and the second target plane equation, wherein the first target plane equation and the second target plane equation are obtained by performing plane detection on the point cloud to be detected, and the position of the suspected straight line weld is represented by a straight line equation;

[0011] An analysis module, configured to determine the type of the suspected straight weld by analysis according to the position of the suspected straight weld, wherein the type is a concave weld or a convex weld;

[0012] The judging module is used to judge whether the suspected straight line weld is a straight line weld according to the type of the suspected straight line weld.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the linear weld identification method described in the aforementioned embodiment.

[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the linear weld recognition method as described in the aforementioned embodiment is implemented.

[0015] The linear weld recognition method, device, electronic device and readable storage medium provided by the embodiment of the present application first calculate the position of the suspected linear weld according to two plane equations obtained by plane detection of the point cloud to be detected, and the position of the suspected linear weld is expressed by a linear equation; then, according to the position of the suspected linear weld, the type of the suspected linear weld is determined by analysis as a concave weld or a convex weld; finally, according to the determined type, it is determined whether the suspected linear weld is a linear weld. In this way, based on the position and concavity of the suspected linear weld obtained by calculating the intersection of the planes, it is determined whether the suspected linear weld is a linear weld, thereby avoiding the situation where the linear weld is incorrectly identified due to ignoring the concavity, and improving the accuracy of linear weld identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a schematic diagram of two straight lines with close distance;

[0018] Figure 2Schematic diagram of concave weld and convex weld;

[0019] Figure 3 A block diagram of an electronic device provided in an embodiment of the present application;

[0020] Figure 4 A schematic diagram of a flow chart of a linear weld identification method provided in an embodiment of the present application;

[0021] Figure 5 for Figure 4 A schematic flow chart of the sub-steps included in step S200;

[0022] Figure 6 A schematic diagram of three target planes, a first angle and a second angle provided in an embodiment of the present application;

[0023] Figure 7 for Figure 5 A schematic flow chart of the sub-steps included in sub-step S230;

[0024] Figure 8 A schematic diagram of multiple points to be selected provided in an embodiment of the present application;

[0025] Fig. 9 for Figure 7 A schematic flow chart of the sub-steps included in sub-step S232;

[0026] Fig.10 Schematic diagram of a concave weld under four viewing angles provided in an embodiment of the present application;

[0027] Fig.11 Schematic diagram of a convex weld under four viewing angles provided in an embodiment of the present application;

[0028] Fig.12 for Figure 5 A schematic flow chart of the sub-steps included in sub-step S240;

[0029] Fig.13 A block diagram of a linear weld identification device provided in an embodiment of the application.

[0030] Icon: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication unit; 200 - straight weld seam recognition device; 210 - calculation module; 220 - analysis module; 230 - judgment module. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here 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 accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0033] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0034] At present, when recognizing a linear weld, the linear intersection equation calculated based on two plane equations is generally used as the linear equation of the linear weld. However, the linear intersection obtained in the above manner may not actually be the required linear weld, so there may be errors in recognizing the linear weld.

[0035] For example, in an actual welding scenario, the above recognition method will treat an edge of a rectangular plate as an identified straight weld, but in fact the edge does not need a weld and is not a straight weld. Figure 1 Line 2 in the figure is an edge, not a straight weld.

[0036] In order to reduce misjudgment, the position represented by the equation of the straight line intersection may be combined to determine whether the straight line intersection is a straight line weld. However, this method may also result in errors in the identification of straight line welds.

[0037] For example, Figure 1 As shown, by calculating the line intersection equation based on the plane equation, the intersection of two straight lines can be determined, that is, Figure 2 Line 1 and Line 2 in . Figure 1 The two straight lines in the image are parallel and very close in position, that is, the properties of the two straight lines are very similar. In this case, it is easy to make straight weld seam recognition errors when filtering based on position. For example, in the welding machine scenario, straight line 1 is where two plates are spliced, and straight line 2 is an edge of a rectangular plate. In this scenario, the line 1 that you actually want to identify is the weld, but the recognition method identifies straight line 2. This is a straight weld seam recognition error, which will lead to welding errors, etc.

[0038] In response to the above situation, the embodiments of the present application provide a straight line weld identification method, device, electronic device and readable storage medium, which determine whether the suspected straight line weld is a straight line weld based on the position and convexity of the suspected straight line weld obtained by calculating the intersection of the planes, thereby avoiding the situation where the straight line weld is incorrectly identified due to ignoring the convexity and concavity, and improving the accuracy of straight line weld identification.

[0039] Among them, the convex weld is raised on the surface of the workpiece, and the concave weld is sunken on the surface of the workpiece. Figure 2 As shown, in the camera coordinate system, the concave weld is the intersection line of two surfaces, and the intersection angle is between 0° and 180° in the camera perspective; the convex weld is the intersection line of two surfaces, and the intersection angle is between 180° and 360° in the camera perspective. It can be understood that the above intersection angle refers to the angle of the angle facing the origin of the camera coordinate system when the two surfaces intersect.

[0040] From this we can see that Figure 1 In the middle, straight line 1 is the weld, and straight line 2 is the convex weld. When identifying a straight weld, you can use the convexity to accurately determine which of the two straight line intersections is the straight weld.

[0041] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0042] Please refer to Figure 3 , Figure 3 A block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may be, but is not limited to, a computer, a server, etc. The electronic device 100 includes a memory 110, a processor 120, and a communication unit 130. The memory 110, the processor 120, and the communication unit 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.

[0043] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0044] The processor 120 is used to read / write data or programs stored in the memory 110 and execute corresponding functions. For example, the memory 110 stores a linear weld recognition device 200, and the linear weld recognition device 200 includes at least one software function module that can be stored in the memory 110 in the form of software or firmware. The processor 120 executes various functional applications and data processing by running software programs and modules stored in the memory 110, such as the linear weld recognition device 200 in the embodiment of the present application, that is, realizing the linear weld recognition method in the embodiment of the present application.

[0045] The communication unit 130 is used to establish a communication connection between the electronic device 100 and other communication terminals through a network, and to send and receive data through the network.

[0046] It should be understood that Figure 3 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0047] Please refer to Figure 4 , Figure 4 The following is a flow chart of a linear weld recognition method provided in an embodiment of the present application. The method can be applied to the electronic device 100. The specific flow of the linear weld recognition method is described in detail below. In this embodiment, the method can include steps S100 to S300.

[0048] Step S100, calculating the position of the suspected straight weld according to the first target plane equation and the second target plane equation.

[0049] In this embodiment, the first target plane equation and the second target plane equation are two plane equations obtained by plane detection of the point cloud to be detected, and the first target plane corresponding to the first target plane equation intersects with the second target plane corresponding to the second target plane equation. The point cloud to be detected is a collected point cloud that needs to be plane-detected to detect a straight weld. For example, a workpiece that needs to be welded is point cloud collected, and the collected point cloud is used as the point cloud to be detected. The point cloud collection device used in point cloud collection can be, but is not limited to, a 3D camera, a laser radar, etc.

[0050] The first target plane and the second target plane are specifically determined by actual conditions and are not specifically limited here.

[0051] As a possible implementation method, the electronic device performs plane detection on the point cloud N to be detected in advance to obtain a plane detection result. Alternatively, other devices can perform plane detection on the point cloud N to be detected to obtain a plane detection result, and send the plane detection result to the electronic device. Among them, a shape detection algorithm, such as RANSAC (RAndom SAmple Consensus) algorithm, hough algorithm, etc., can be used to perform plane detection on the point cloud N to be detected. The electronic device traverses the planes in the plane detection result, and uses the two intersecting planes traversed as the first target plane and the second target plane, so as to facilitate the detection of all straight welds in the point cloud to be detected.

[0052] In this embodiment, a straight line equation can be calculated based on the first target plane equation and the second target plane equation. The straight line equation represents the straight line intersection between the first target plane and the second target plane. The straight line equation is used to indicate the position of a suspected straight line weld. That is, the straight line equation may be the straight line equation of a straight line weld, or may not be the straight line equation of a straight line weld.

[0053] For example, assuming that the equation of the first target plane is: a1x+b1y+c1z+d1=0, the equation of the second target plane is: a2x+b2y+c2z+d2=0, and the first normal vector of the first target plane is The second normal vector of the second target plane is Wherein, d1 represents the distance between the first target plane and the coordinate origin, and d2 represents the distance between the second target plane and the coordinate origin. According to the above-mentioned first target plane equation and second target plane equation, the straight line intersection l of the first target plane and the second target plane can be calculated, and the straight line intersection l can be obtained by using the direction vector l The linear equation of the straight line intersection line l is the linear equation of the suspected straight line weld, that is, the position of the suspected straight line weld is represented by the linear equation of the straight line intersection line l.

[0054] Step S200, determining the type of the suspected straight line weld by analysis according to the position of the suspected straight line weld.

[0055] In this embodiment, when the linear equation of the suspected linear weld is obtained, the linear equation can be combined to analyze and determine whether the suspected linear weld is a concave weld or a convex weld, thereby determining the type of the suspected linear weld. Optionally, the type of the suspected linear weld can be determined by performing image analysis based on the position indicated by the linear equation of the suspected linear weld and combining the collected two-dimensional image; or, the point cloud analysis to be detected can be combined.

[0056] Step S300, judging whether the suspected straight line weld is a straight line weld according to the type of the suspected straight line weld.

[0057] In the case of determining the type of the suspected straight weld, it is possible to determine whether the suspected straight weld is a straight weld in combination with the preset requirements and the determined type. For example, if the preset requirements indicate that a concave weld is selected as a straight weld, then when the suspected straight weld is a concave weld, the suspected straight weld is determined to be a straight weld, and when the suspected straight weld is a convex weld, the suspected straight weld is determined not to be a straight weld; if the preset requirements indicate that a convex weld is selected as a straight weld, then when the suspected straight weld is a concave weld, the suspected straight weld is determined not to be a straight weld, and when the suspected straight weld is a convex weld, the suspected straight weld is determined to be a straight weld.

[0058] It is also possible to determine whether the suspected linear weld is a linear weld in combination with the preset requirements, the type and position of the suspected linear weld. For example, if the preset requirements indicate the type of the linear weld (a concave weld or a convex weld) and the approximate position, it is possible to determine whether the suspected linear weld is a linear weld based on the preset requirements.

[0059] In this way, whether the suspected straight line weld is a straight line weld can be determined based on the position and convexity of the suspected straight line weld obtained by calculating the plane intersection line, thereby avoiding the situation where the straight line weld is identified incorrectly due to ignoring the convexity and concavity, and improving the accuracy of straight line weld identification.

[0060] As a possible implementation, Figure 5 The type of the suspected straight weld is determined by the method shown. Figure 5 , Figure 5 for Figure 4Schematic diagram of the flow of sub-steps included in step S200. In this embodiment, step S200 may include sub-steps S210 to S240.

[0061] Sub-step S210, determining a point on the suspected straight weld as a first reference point.

[0062] In this embodiment, the first reference point A can be determined in any manner, the first reference point A is located on the suspected linear weld, that is, on the linear intersection line l, and the first reference point A is located within the range of the point cloud to be detected. That is, the first reference point A is located on the linear intersection line segment of two real planes of the object corresponding to the point cloud to be detected.

[0063] As a possible implementation, the first reference point A can be quickly calculated and determined in the following manner: the origin of the coordinate system used by the point cloud data obtained in the process of acquiring the point cloud to be detected is projected onto the suspected linear weld, and the obtained projection point is used as the first reference point A.

[0064] For example, the coordinate system used by the point cloud data obtained in the process of obtaining the point cloud to be detected through point cloud acquisition is the camera coordinate system, and the point cloud to be detected, the straight line equation of the suspected straight weld, the first target plane equation and the second target plane equation are all located in the camera coordinate system. In the camera coordinate system, the center of the camera is the coordinate point of the intersecting coordinate system, which is O=(0, 0, 0), and the vector can be calculated. The direction vector of the line of intersection l The projection length t on : Then, the coordinates of the projection point A of the origin O on the straight line intersection line l (i.e., the first reference point) can be obtained as:

[0065] Sub-step S220, determining a third target plane according to the straight line equation of the suspected straight line weld and the first reference point.

[0066] In this embodiment, the direction vector of the straight line equation l of the suspected straight line weld can be A plane is determined as the third target plane in such a manner that the third normal vector of the third target plane and the first reference point A is a point on the third target plane. Figure 6As shown in a and b of , three target planes are determined. The third target plane is perpendicular to the first target plane and the second target plane and includes the first reference point A. The first reference point A is the intersection point of the first target plane, the second target plane and the third target plane. The third target plane can be represented by a third target plane equation, which is: a3x+b3y+c3z+d3=0.

[0067] The inventor of this application has found through research that Figure 6 As shown in c and d in FIG. , when the first normal vector of the first target plane and the second normal vector of the second target plane When both face the camera (that is, the point cloud acquisition device), the vector and The angle α1, vector and The angle α2 has different size relationships in concave and convex welds. Based on the above findings, the second reference point B can be determined on the second target plane and the third reference point C can be determined on the third target plane in the following way, and then the straight line formed by the above two reference points and the The size relationship of the angle between the weld seams can be used to determine the type of suspected straight line weld.

[0068] Sub-step S230, determining a second reference point and a third reference point according to a first target plane corresponding to the first target plane equation, and a second target plane and a third target plane corresponding to the second target plane equation.

[0069] In this embodiment, if Figure 6 As shown, a second reference point B can be calculated based on the first target plane and the third target plane, and the second reference point B is located on the first intersection line of the first target plane and the third target plane, and is located within the range of the point cloud to be detected. Similarly, a third reference point C can be calculated based on the second target plane and the third target plane, and the third reference point C is located on the second intersection line of the second target plane and the third target plane, and is within the range of the point cloud to be detected.

[0070] As a possible implementation, Figure 7 The second reference point B and the third reference point C are determined as shown. Figure 7 , Figure 7 for Figure 5 Schematic diagram of the flow of sub-steps included in sub-step S230. In this embodiment, sub-step S230 may include sub-steps S231 to S234.

[0071] Sub-step S231, determining a first candidate point and a second candidate point on the first intersection line according to the first reference point and the first preset distance.

[0072] Sub-step S232: according to the position distribution of the first candidate point and the second candidate point, taking the first candidate point or the second candidate point as the second reference point.

[0073] In this embodiment, if Figure 8 As shown, when the first reference point A and the first intersection line are determined, two candidate points can be determined on the first intersection line as the first candidate point B1 and the second candidate point B2 according to the first preset distance and the first reference point A. The distance between the first candidate point B1 and the first reference point A is equal to the distance between the second candidate point B2 and the first reference point A, and the first preset distance can be specifically set in combination with actual needs.

[0074] When the first candidate point B1 and the second candidate point B2 are determined, it is possible to determine which candidate point is within the range of the point cloud to be detected based on the positions of the first candidate point B1 and the second candidate point B2, thereby determining the second reference point B.

[0075] As a possible implementation, Fig. 9 The second reference point is determined accurately by the method shown. Fig. 9 , Fig. 9 for Figure 7 Schematic diagram of the flow of sub-steps included in sub-step S232. In this embodiment, sub-step S232 may include sub-steps S2321 to S2323.

[0076] Sub-step S2321 , obtaining a local point cloud located near the first line segment from the point cloud to be detected as a first local point cloud.

[0077] Sub-step S2322: Calculate and obtain the first centroid of the first local point cloud.

[0078] Sub-step S2323: select the point between the first candidate point and the second candidate point that is closer to the first centroid as the second reference point.

[0079] In this embodiment, the first candidate point B1 and the second candidate point B2 are used as the endpoints of a line segment, thereby determining the first line segment B1B2. Then, the points in the point cloud N to be detected can be traversed, and for the traversed points, the nearest point of the point on the first line segment B1B2 is calculated. Then, the distance d between the traversed point and the corresponding nearest point is calculated. If the distance d is less than the third preset distance, the point is retained; if the distance d is greater than or equal to the third preset distance, the point is not retained. Finally, the first local point cloud N is constructed using the retained points. B , that is, the first local point cloud N B Includes the points B1B2 in the point cloud to be detected that are located near the first line segment.

[0080] The nearest point of a point on the first line segment B1B2 can be obtained in the following manner: For the point, the vertical projection point of the point on the straight line where the first line segment B1B2 is located is calculated; then, it is determined whether the vertical projection point is on the first line segment B1B2, if so, the vertical projection point is used as the nearest point of the point on the first line segment B1B2, if not, the endpoint closest to the projection point among the two endpoints B1 and B2 of the first line segment B1B2 is used as the nearest point of the point on the first line segment B1B2.

[0081] After obtaining the first local point cloud N B In the case of, the first local point cloud N can be calculated B The first center of mass center B Then, the first candidate point B1 and the first centroid center are calculated. B The first distance between the second candidate point B2 and the first centroid center is calculated. B Finally, according to the magnitude relationship between the first distance and the second distance, the candidate point corresponding to the smaller distance is determined as the second reference point B. For example, if the first distance is smaller than the second distance, the first candidate point B1 is used as the second reference point B; if the second distance is smaller than the first distance, the second candidate point B2 is used as the second reference point B.

[0082] Sub-step S233, determining a third candidate point and a fourth candidate point on the second intersection line according to the second reference point and the second preset distance.

[0083] Sub-step S234: according to the position distribution of the third candidate point and the fourth candidate point, taking the third candidate point or the fourth candidate point as the third reference point.

[0084] In this embodiment, if Figure 8As shown, when the first reference point A and the second intersection line are determined, two candidate points can be determined on the second intersection line as the third candidate point C1 and the fourth candidate point C2 according to the second preset distance and the first reference point A. Among them, the distance between the third candidate point C1 and the first reference point A is equal to the distance between the fourth candidate point C2 and the first reference point A, and the second preset distance can be set in combination with actual needs. Optionally, the first preset distance and the second preset distance may be the same or different. As a possible implementation method, the first preset distance is the same as the second preset distance, that is, AB=AC, and the three points ABC form an isosceles triangle, so that the difference between the two angles obtained by subsequent calculation is large.

[0085] When the third candidate point C1 and the fourth candidate point C2 are determined, it is possible to determine which candidate point is within the range of the point cloud to be detected based on the positions of the third candidate point C1 and the fourth candidate point C2, thereby determining the third reference point C.

[0086] In this embodiment, the third candidate point C1 and the fourth candidate point C2 are used as the endpoints of a line segment, thereby determining the second line segment C1C2. Then, the points in the point cloud N to be detected can be traversed, and for the traversed points, the nearest point of the point on the second line segment C1C2 is calculated. Then, the distance d between the traversed point and the corresponding nearest point is calculated. If the distance d is less than the third preset distance, the point is retained; if the distance d is greater than or equal to the third preset distance, the point is not retained. Finally, the retained points are used to construct the second local point cloud N. C , that is, the second local point cloud N C The nearest point includes the points in the point cloud to be detected that are located near the second line segment C1C2. The description of how to obtain the nearest point can be referred to the above description, which will not be repeated here.

[0087] After obtaining the second local point cloud N C In the case of, the second local point cloud N can be calculated C The second center of mass C Then, the third candidate point C1 and the second centroid center are calculated. C The third distance between the fourth candidate point C2 and the second centroid center is calculated. C Finally, the candidate point corresponding to the smaller distance between the third distance and the fourth distance is taken as the third candidate point C.

[0088] Sub-step S240, calculating a first angle based on the first normal vector and the reference vector, calculating a second angle based on the second normal vector and the reference vector, and obtaining the type of the suspected straight line weld based on the first angle and the second angle.

[0089] In this embodiment, a reference vector can be determined based on the second reference point B and the third reference point C, wherein the second reference point and the third reference point are located on the straight line where the reference vector is located. A first angle can be obtained by analysis based on the first normal vector and the reference vector; and a second angle can be obtained by analysis based on the second normal vector and the reference vector. Finally, based on the magnitude relationship between the first angle and the second angle, it is determined whether the suspected linear weld is a concave weld or a convex weld.

[0090] The inventor of this application has only found that Fig.10 and Fig.11 As shown, when the first normal vector of the first target plane and the second normal vector of the second target plane When both face the camera (that is, the point cloud acquisition device), the vector and The angle α1, vector and The angle α2 has different size relationships in concave and convex welds. In concave welds, Fig.10 As shown, even at different viewing angles, as long as the first normal vector Second normal vector is toward the camera, then α2>α1; in a convex weld, if Fig.11 As shown, even at different viewing angles, as long as the first normal vector Second normal vector is facing the camera, then α1>α2. Based on the above findings, we can Fig.12 The two angles are calculated in the manner shown and the type is determined. Fig.12 , Fig.12 for Figure 5 Schematic diagram of the flow of sub-steps included in sub-step S240. In this embodiment, sub-step S240 may include sub-steps S241 to S242.

[0091] Sub-step S241, calculating and obtaining the reference vector according to the second reference point and the third reference point.

[0092] In this embodiment, a reference vector is determined based on the second reference point B and the third reference point C. Among them, the reference vector The starting point is the second reference point B, and the reference vector The direction represented is the direction from the second reference point B to the third reference point C.

[0093] Sub-step S242, obtaining a first target normal vector toward a point cloud acquisition device according to the first normal vector, and obtaining a second target normal vector toward the point cloud acquisition device according to the second normal vector.

[0094] In order to ensure that the plane normal vector used in calculating the angle is oriented toward the point cloud acquisition device, before calculating the angle, a first target normal vector oriented toward the point cloud acquisition device may be obtained according to the first normal vector, and a second target normal vector oriented toward the point cloud acquisition device may be obtained according to the second normal vector. The first target normal vector is in the same direction or in the opposite direction to the first normal vector, and the second target normal vector is in the same direction or in the opposite direction to the second normal vector.

[0095] Assume that the origin of the coordinate system used by the point cloud data obtained in the process of obtaining the point cloud to be detected through point cloud acquisition is O. For example, when the point cloud to be detected is obtained using 3D, the origin is the origin of the camera coordinate system. Then calculate the first normal vector and If the dot product is less than 0, the first normal vector Steering, that is, the first normal vector Flip 180° to get the first target normal vector. Similarly, we can first calculate Then calculate the second normal vector and If the dot product is less than 0, the second normal vector Steering, that is, the second normal vector Flip 180° to get the second target normal vector.

[0096] Sub-step S243, calculating the angle between the reference vector and the first target normal vector as the first angle, and calculating the angle between the reference vector and the second target normal vector as the second angle.

[0097] In determining the reference vector, the first target normal vector and the second target normal vector In the case of, the first angle and the second angle can be calculated according to the following formula:

[0098]

[0099] Sub-step S244, obtaining the type of the suspected straight line weld according to the magnitude relationship between the first angle and the second angle.

[0100] In this embodiment, when the first angle is greater than the second angle, that is, when α1>α2, the suspected straight weld is determined to be a convex weld. When the first angle is less than the second angle, that is, when α2>α1, the straight weld is determined to be a concave weld.

[0101] In this embodiment, when the position of the suspected straight weld is obtained by calculating the plane intersection line, the convexity of the suspected straight weld is analyzed, and then whether the suspected straight weld is a straight weld is determined based on the analysis result, so as to avoid the situation where the straight weld is incorrectly identified due to ignoring the convexity, thereby obtaining a more accurate weld equation and improving the accuracy of straight weld identification. For example, when a straight weld to be welded is a concave weld, a convex weld will not be mistakenly determined as a straight weld to be welded.

[0102] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a linear weld recognition device 200 is provided below. Optionally, the linear weld recognition device 200 can adopt the above Figure 3 The device structure of the electronic device 100 is shown. Fig.13 , Fig.13 The block diagram of the linear weld recognition device 200 provided in the application embodiment. It should be noted that the basic principle and technical effects of the linear weld recognition device 200 provided in this embodiment are the same as those of the above embodiment. For the sake of brief description, the parts not mentioned in this embodiment can refer to the corresponding contents in the above embodiment. In this embodiment, the linear weld recognition device 200 may include: a calculation module 210, an analysis module 220 and a judgment module 230.

[0103] The calculation module 210 is used to calculate the position of the suspected straight weld according to the first target plane equation and the second target plane equation. The first target plane equation and the second target plane equation are obtained by performing plane detection on the point cloud to be detected, and the position of the suspected straight weld is represented by a straight line equation.

[0104] The analysis module 220 is used to determine the type of the suspected straight weld by analysis according to the position of the suspected straight weld, wherein the type is a concave weld or a convex weld.

[0105] The judgment module 230 is used to judge whether the suspected straight line weld is a straight line weld according to the type of the suspected straight line weld.

[0106] Optionally, the above modules can be stored in the form of software or firmware. Figure 3The memory 110 shown in the figure may be fixed in the operating system (OS) of the electronic device 100 and may be Figure 3 Meanwhile, the data and program codes required for executing the above modules may be stored in the memory 110.

[0107] An embodiment of the present application also provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the linear weld recognition method is implemented.

[0108] In summary, the embodiments of the present application provide a linear weld recognition method, device, electronic device, and readable storage medium. First, the position of the suspected linear weld is calculated based on two plane equations obtained by plane detection of the point cloud to be detected, and the position of the suspected linear weld is expressed by a linear equation; then, according to the position of the suspected linear weld, the type of the suspected linear weld is determined by analysis to be a concave weld or a convex weld; finally, according to the determined type, it is determined whether the suspected linear weld is a linear weld. In this way, based on the position and concavity of the suspected linear weld obtained by calculating the intersection of the planes, it is determined whether the suspected linear weld is a linear weld, thereby avoiding the situation where the linear weld is incorrectly identified due to ignoring the concavity, and improving the accuracy of linear weld identification.

[0109] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0110] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0111] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0112] The above description is only an optional embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A linear weld recognition method, It is characterized in that The method comprises: The position of the suspected straight weld is calculated according to the first target plane equation and the second target plane equation, wherein the first target plane equation and the second target plane equation are obtained by performing plane detection on the point cloud to be detected, and the position of the suspected straight weld is represented by a straight line equation; Determining the type of the suspected straight weld by analysis according to the position of the suspected straight weld, wherein the type is a concave weld or a convex weld; According to the type of the suspected straight line weld, it is determined whether the suspected straight line weld is a straight line weld.

2. The method according to claim 1, It is characterized in that Determining the type of the suspected straight line weld by analyzing the position of the suspected straight line weld includes: Determine a point on the suspected straight weld as a first reference point, wherein the first reference point is located within the range of the point cloud to be detected; Determine a third target plane according to the straight line equation of the suspected straight line weld and the first reference point, wherein a third normal vector of the third target plane is a direction vector of the suspected straight line weld, and the first reference point is on the third target plane; Determine a second reference point and a third reference point according to a first target plane corresponding to the first target plane equation, a second target plane and a third target plane corresponding to the second target plane equation, wherein the second reference point is located on a first intersection line of the first target plane and the third target plane, the third reference point is located on a second intersection line of the second target plane and the third target plane, and the second reference point and the third reference point are located within the range of the point cloud to be detected; A first angle is calculated based on the first normal vector and the reference vector, a second angle is calculated based on the second normal vector and the reference vector, and based on the first angle and the second angle, the type of the suspected straight line weld is obtained, wherein the second reference point and the third reference point are located on the straight line where the reference vector is located.

3. The method according to claim 2, It is characterized in that The determining of the second reference point and the third reference point according to the first target plane corresponding to the first target plane equation, the second target plane and the third target plane corresponding to the second target plane equation includes: Determine a first candidate point and a second candidate point on the first intersection line according to the first reference point and the first preset distance; According to the position distribution of the first candidate point and the second candidate point, taking the first candidate point or the second candidate point as the second reference point; Determine a third candidate point and a fourth candidate point on the second intersection line according to the second reference point and the second preset distance; According to the position distribution of the third candidate point and the fourth candidate point, the third candidate point or the fourth candidate point is used as the third reference point.

4. The method according to claim 3, It is characterized in that The first preset distance is equal to the second preset distance, and / or, according to the position distribution of the first candidate point and the second candidate point, the first candidate point or the second candidate point is used as the second reference point, including: Obtaining a local point cloud located near the first line segment from the to-be-detected point cloud as a first local point cloud, wherein the first to-be-selected point and the second to-be-selected point are two endpoints of the first line segment; Calculate and obtain a first centroid of the first local point cloud; The point that is closer to the first centroid between the first and second candidate points is used as the second reference point.

5. The method according to any one of claims 2 to 4, It is characterized in that The first angle is calculated according to the first normal vector and the reference vector, the second angle is calculated according to the second normal vector and the reference vector, and the type of the suspected straight line weld is obtained according to the first angle and the second angle, including: The reference vector is calculated based on the second reference point and the third reference point, wherein the starting point of the reference vector is the second reference point, and the direction represented by the reference vector is the direction from the second reference point to the third reference point; Obtaining a first target normal vector toward a point cloud acquisition device according to the first normal vector, and obtaining a second target normal vector toward the point cloud acquisition device according to the second normal vector, wherein the first target normal vector is in the same direction or in the opposite direction as the first normal vector, and the second target normal vector is in the same direction or in the opposite direction as the second normal vector; Calculating an angle between the reference vector and the first target normal vector as the first angle, and calculating an angle between the reference vector and the second target normal vector as the second angle; The type of the suspected straight line weld is obtained according to the magnitude relationship between the first angle and the second angle.

6. The method according to claim 5, It is characterized in that The obtaining the type of the suspected straight line weld according to the magnitude relationship between the first angle and the second angle includes: When the first angle is greater than the second angle, determining that the suspected straight weld is a convex weld; When the first angle is smaller than the second angle, the straight weld is determined to be a concave weld.

7. The method according to any one of claims 2 to 4, It is characterized in that The step of determining a point on the suspected straight weld as a first reference point comprises: The origin of the coordinate system used for the point cloud data obtained in the process of obtaining the point cloud to be detected through point cloud acquisition is projected onto the suspected straight weld, and the obtained projection point is used as the first reference point.

8. A linear weld identification device, It is characterized in that The device comprises: A calculation module, used for calculating the position of the suspected straight line weld according to the first target plane equation and the second target plane equation, wherein the first target plane equation and the second target plane equation are obtained by performing plane detection on the point cloud to be detected, and the position of the suspected straight line weld is represented by a straight line equation; An analysis module, configured to determine the type of the suspected straight weld by analysis according to the position of the suspected straight weld, wherein the type is a concave weld or a convex weld; The judging module is used to judge whether the suspected straight line weld is a straight line weld according to the type of the suspected straight line weld.

9. An electronic device, It is characterized in that It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the linear weld recognition method described in any one of claims 1-7.

10. A readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the linear weld recognition method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Concave-convex surface feature intersection line identification method and carriage welding seam identification method using same

    CN120598858A