Processing method and device for ship workpiece point cloud, equipment and computer medium

Through slicing processing and key point screening in the ship workpiece point cloud, the problem of large amount of point cloud data and the influence of noise is solved, and the precise determination of the weld seam and the improvement of welding accuracy are achieved.

CN118279250BActive Publication Date: 2024-09-06SHEN ZHEN QIAN HAI RUI JI TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410328288.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-21
Publication Date
2024-09-06
Estimated Expiration
2044-03-21

AI Technical Summary

Technical Problem

When the existing technology uses point cloud technology to determine welds, due to the large amount of point cloud data and the presence of noise, the weld accuracy is insufficient, which affects the welding effect of ship workpieces and may damage the welding equipment.

Method used

By selecting points on the same horizontal plane in the ship workpiece point cloud as points, determine the frame selection space, perform slicing processing, sort the data points from large to small according to the depth, determine the key points, and determine the welding points through the height difference between the key points. seam position, reduce the amount of point cloud data, and avoid noise.

Benefits of technology

It achieves accurate determination of weld seams, improves welding accuracy, avoids damage to welding equipment, and improves point cloud processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118279250B
    Figure CN118279250B
Patent Text Reader

Abstract

The present application provides a method and device for processing a ship workpiece point cloud, an apparatus, a device and a computer medium, the method comprising: in the workpiece point cloud acquired by collecting ship workpiece data, two points in the same horizontal plane are selected as selected points, and the straight line where the selected points are located is the first straight line; the frame selection space is determined by the first straight line and the selected points, and the workpiece point cloud in the frame selection space is the groove point cloud; the groove point cloud is sliced ​​according to the length of the groove point cloud to obtain a slice point cloud, and a data point in each slice point cloud is used as a key point according to the order of the data point depth from large to small: according to the height difference between the key points, the slice point cloud corresponding to the weld in the groove is determined. The present application uses point cloud technology to accurately determine the weld.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of workpiece processing, and in particular to a method and device for processing a point cloud of a ship workpiece, equipment and computer medium. Background Art

[0002] With the development of ship workpiece processing technology, the processing technology of ship workpieces has been continuously updated and improved, and has gradually evolved from simple manual processing to ship workpiece processing technology characterized by automation and intelligence. The scope of processing objects and technical level have been significantly improved.

[0003] Visual robot automated welding technology is widely used in many industries. With the development of the industry, the requirements for welding technology are getting higher and higher. In order to ensure the welding effect between different ship workpieces or between different parts of the same ship workpiece, grooves will be made at the location of the weld, also known as grooves. For the weld points, holes and other non-weldable parts in the groove, the weld in the groove is no longer continuous and needs to be re-determined.

[0004] At present, point cloud technology is used to determine the weld in the process of determining the weld. However, when using point cloud technology to confirm the weld, due to the large amount of point cloud data and the influence of noise, the accuracy will deteriorate and the weld accuracy will be insufficient, resulting in poor welding effect of ship workpieces and damage to the welding equipment.

[0005] Therefore, how to use point cloud technology to accurately determine welds is a technical problem that needs to be solved urgently. Summary of the invention

[0006] The purpose of this application is to solve the technical problem of how to use point cloud technology to accurately determine the weld.

[0007] According to one aspect of an embodiment of the present application, the present application provides a method for processing a point cloud of a ship workpiece, the method comprising:

[0008] In the workpiece point cloud acquired by collecting ship workpiece data, two points on the same horizontal plane are selected as selected points, and the straight line where the selected points are located is the first straight line;

[0009] A frame selection space is determined by the first straight line and the selected points, wherein the workpiece point cloud in the frame selection space is a groove point cloud;

[0010] The groove point cloud is sliced ​​according to the length of the groove point cloud to obtain a slice point cloud, and a data point in each slice point cloud is used as a key point according to the order of data point depth from large to small:

[0011] According to the height differences between the key points, the slice point cloud corresponding to the weld in the groove is determined.

[0012] According to one aspect of an embodiment of the present application, the frame selection space is determined by the first straight line and the selected point, and the workpiece point cloud in the frame selection space is a groove point cloud, including:

[0013] On the horizontal plane where the first straight line is located, the first straight line is parallelly mapped to both sides of the first straight line to obtain a second straight line and a third straight line;

[0014] On the horizontal plane where the selected point is located, straight lines perpendicular to the first straight line are drawn through the selected point, which are the fourth straight line and the fifth straight line;

[0015] A closed figure enclosed by the second straight line, the third straight line, the fourth straight line and the fifth straight line is used as a frame selection figure;

[0016] The prism determined by taking the frame selection figure as the cross section is the frame selection space, and the workpiece point cloud in the frame selection space is the groove point cloud.

[0017] According to one aspect of an embodiment of the present application, the step of taking a data point in each of the slice point clouds as a key point in descending order of data point depths includes:

[0018] According to each data point in each of the slice point clouds, plane fitting is performed on each of the slice point clouds to obtain a two-dimensional slice point cloud;

[0019] The data point with the largest depth in each of the two-dimensional slice point clouds is taken as a key point.

[0020] According to one aspect of an embodiment of the present application, performing plane fitting on each of the slice point clouds according to each data point in each of the slice point clouds to obtain a two-dimensional slice point cloud includes:

[0021] For the slice point cloud, determine a set number of data point sets, and use the planes determined by each data point set as initial planes, wherein the data point set is composed of any three data points in the slice point cloud that are not in the same straight line;

[0022] Taking the data points in the slice point cloud whose distance from the initial plane is less than a length threshold as the target points of the initial plane;

[0023] The initial plane with the largest number of target points is optimized to obtain the two-dimensional slice point cloud.

[0024] According to one aspect of an embodiment of the present application, the optimizing the initial plane with the largest number of target points as the two-dimensional slice point cloud includes:

[0025] In the slice point cloud, each data point outside the initial plane with the largest number of target points is projected into the initial plane to obtain the two-dimensional slice point cloud.

[0026] According to one aspect of an embodiment of the present application, taking the data point with the largest depth in each of the two-dimensional slice point clouds as a key point includes:

[0027] For each of the two-dimensional slice point clouds, a set number of data point pairs are determined, and a straight line determined by each data point pair is used as an initial straight line;

[0028] Taking data points in the two-dimensional slice point cloud whose distance from the initial straight line is less than a threshold as the inner points of the initial straight line;

[0029] Taking the initial straight line with the largest number of interior points, and mapping each interior point of the initial straight line to the initial straight line to obtain a fitting line segment;

[0030] In the two-dimensional slicing point cloud, the inner points of the fitting line segment are removed, and straight line fitting is performed again to determine other fitting line segments in the two-dimensional slicing point cloud until all data points in the two-dimensional slicing point cloud are inner points of the fitting line segment;

[0031] The data point with the largest depth among the intersection points of the fitted line segments is used as the key point of the slice point cloud.

[0032] According to one aspect of an embodiment of the present application, determining a slice point cloud corresponding to a weld in a groove according to the height difference between the key points includes:

[0033] According to the depth of the key straight line obtained by performing straight line fitting on the key points, a depth threshold interval is set, and the key points with depths within the depth threshold interval are used as weld key points;

[0034] The position of the weld in the groove is determined according to the position information of the slice point cloud where the key point of the weld is located.

[0035] According to one aspect of an embodiment of the present application, the device includes:

[0036] The point selection module is configured to select two points on the same horizontal plane as selected points in the workpiece point cloud acquired by collecting ship workpiece data, and the straight line where the selected points are located is the first straight line;

[0037] A frame selection module is configured to determine a frame selection space through the first straight line and the selected point, wherein the workpiece point cloud in the frame selection space is a groove point cloud;

[0038] The slicing module is configured to slice the groove point cloud according to the length of the groove point cloud to obtain a slice point cloud, and according to the order of data point depth from large to small, a data point in each of the slice point clouds is used as a key point:

[0039] The determination module is configured to determine the slice point cloud corresponding to the weld in the groove according to the height difference between the key points.

[0040] According to one aspect of an embodiment of the present application, the present application provides an electronic device, including:

[0041] Processor; and

[0042] a memory having computer-readable instructions stored thereon;

[0043] Wherein, the processor is configured to perform any of the above methods by executing the computer-readable instructions.

[0044] According to one aspect of an embodiment of the present application, the present application provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor of a computer, the computer executes any of the above methods.

[0045] In the embodiment of the present application, first, in the workpiece point cloud acquired by the data collection of the ship workpiece, two points in the same horizontal plane are selected as the selected points, the straight line where the selected points are located is the first straight line, and the frame selection space is determined by the first straight line and the selected points, and the workpiece point cloud in the frame selection space is the groove point cloud; the groove point cloud is sliced ​​according to the length of the groove point cloud to obtain the sliced ​​point cloud, and according to the order of the data point depth from large to small, a data point in each slice point cloud is used as a key point, and the sliced ​​point cloud corresponding to the weld in the groove is determined according to the height difference between the key points. On the one hand, by separating the groove point cloud in the workpiece point cloud, the amount of point cloud data is reduced and the efficiency of point cloud processing is improved. On the other hand, by slicing the groove point cloud, the amount of point cloud data during point cloud processing is further reduced, the efficiency of point cloud processing is improved, and the noise is avoided by confirming the key points, and then the sliced ​​point cloud corresponding to the weld in the groove is determined. In this way, the weld can be accurately determined by point cloud technology to avoid damage to the welding equipment.

[0046] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0047] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.

[0049] Figure 1 A flow chart of a method for processing a ship workpiece point cloud according to an embodiment of the present application is shown.

[0050] Figure 2 A flow chart of determining a frame selection space by using a first straight line and selected points according to an embodiment of the present application is shown.

[0051] Figure 3 A flow chart is shown of using a data point in each slice point cloud as a key point according to the order of data point depth from large to small according to an embodiment of the present application.

[0052] Figure 4 A flow chart is shown for performing plane fitting on each slice point cloud according to each data point in the slice point cloud to obtain a two-dimensional slice point cloud according to an embodiment of the present application.

[0053] Figure 5 A flow chart is shown for taking the data point with the largest depth in each two-dimensional slice point cloud as a key point.

[0054] Figure 6 A flow chart is shown for determining a slice point cloud corresponding to a weld in a groove according to height differences between key points according to an embodiment of the present application.

[0055] Figure 7 A flow chart of smoothing key points before performing straight line fitting on the key points according to an embodiment of the present application is shown.

[0056] Figure 8 A schematic diagram of a device for processing a point cloud of a ship workpiece according to an embodiment of the present application is shown.

[0057] Fig. 9 A hardware structure diagram of a method for processing a ship workpiece point cloud according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0058] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0059] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.

[0060] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0061] See also Figure 1 , Figure 1 A flowchart of a method for processing a point cloud of a ship workpiece according to an embodiment of the present application is shown. The present application embodiment provides a method for processing a point cloud of a ship workpiece, including:

[0062] Step S110, in the workpiece point cloud acquired by collecting ship workpiece data, two points on the same horizontal plane are selected as selected points, and the straight line where the selected points are located is the first straight line;

[0063] Step S120, determining a frame selection space by using the first straight line and the selected points, wherein the workpiece point cloud in the frame selection space is a groove point cloud;

[0064] Step S130, slicing the groove point cloud according to the length of the groove point cloud to obtain a sliced ​​point cloud, and according to the order of data point depth from large to small, taking a data point in each sliced ​​point cloud as a key point:

[0065] Step S140, determining the slice point cloud corresponding to the weld in the groove according to the height difference between the key points.

[0066] The above four steps are described in detail below.

[0067] Before describing the above four steps in detail, it should be made clear that before welding the ship workpiece, the part to be welded of the ship workpiece is processed into a certain shape. The groove formed after the assembly is called a groove, that is, the groove is a weld to be welded. The main purpose of the groove is to achieve complete penetration. In addition, it can also improve the composition and performance of the weld, improve the crystallization conditions, and improve the performance of the joint. For example, the two parts to be welded are chamfered separately so that the welding point of the two parts changes from flat and matching to a groove shape.

[0068] In order to simply connect and fix the workpieces or different parts of the workpieces, so as to avoid the movement of the workpieces or different parts of the workpieces during the subsequent formal welding, resulting in excessive welding errors, several positions are selected in the groove for welding to form welds. The weld points in the groove or the holes in the groove do not need to be welded, so the welds in the groove will be divided into several sections by the welds and holes and are no longer continuous. Therefore, when welding the grooves in ship workpieces, it is necessary to determine the weld position to ensure the welding effect of the workpiece.

[0069] In step S110, data is collected on the side of the workpiece where the groove is located, and a number of sampling points are selected on the side of the workpiece where the groove is located. The number of sampling points or the density of the sampling points can be set according to the user's instruction information, and the instruction information refers to the program instructions generated according to the user's operating behavior.

[0070] It is further necessary to clarify that, for the convenience of describing the method provided in the present application, the side of the workpiece where the groove is located is taken as the reference horizontal plane, and the plane parallel to the reference plane is taken as the horizontal plane. The direction of the groove depression is taken as the downward direction, the opposite direction of the groove depression is taken as the upward direction, and the extending direction of the groove is taken as the left-right direction, also referred to as the longitudinal direction. Similarly, the direction perpendicular to the left-right direction is taken as the front-back direction, also referred to as the transverse direction.

[0071] Taking any point or set point as the origin reference, the three-dimensional coordinates of each sampling point are obtained. At this time, the three-dimensional coordinates of each sampling point are called point cloud data. Point cloud refers to the image formed after the three-dimensional coordinates of each point contained in the point cloud data are visualized in the virtual three-dimensional space. Because the number of "points" is large and dense, it is called "point cloud".

[0072] In one embodiment of the present application, data is collected by a data acquisition device, which forms a light spot on the side of the workpiece where the groove is located by sending a ranging beam to the workpiece, and the location of the light spot is the sampling point selected on the workpiece. The ranging beams can be emitted one by one, or several beams can be emitted in parallel.

[0073] It should be made clear that in this process, in order to better collect data at each position in the groove, a ranging beam is emitted to the side of the groove in a direction perpendicular to the reference horizontal plane, and then the sampling point is determined. Finally, the three-dimensional coordinates corresponding to each sampling point are obtained according to the measurement results of the data acquisition device, that is, the point cloud data is obtained. The point cloud data is materialized in the virtual three-dimensional space to obtain the workpiece point cloud.

[0074] Since the purpose of this application is to segment the weld in the groove by segmenting the groove, this application needs to be analyzed based on the groove. Only a part of the workpiece point cloud is used to describe the groove. If the workpiece point cloud is analyzed directly, it will result in too much point cloud data to be analyzed, which greatly wastes computing resources. Therefore, the part representing the groove in the workpiece point cloud is separated, and only the point cloud representing the groove is analyzed, which greatly reduces the consumption of computing resources.

[0075] If there are still too many point clouds representing the groove, then a part or several parts of the point clouds representing the groove are intercepted from all the point clouds representing the groove as the groove point clouds to be analyzed. Specifically, at least two points are determined as selected points in the workpiece point cloud, and the workpiece point cloud representing the groove between the selected points is intercepted as the groove point cloud. It should be clear that the selected point can be a data point constituting the workpiece point cloud, or it can be any point on the workpiece point cloud that is not a data point.

[0076] It should be further clarified that if more than two points are selected as selection points, two parts of point clouds representing the groove are obtained, and these groove point clouds can be analyzed in parallel. It is also possible to analyze each part of the groove point cloud representing the groove one by one according to the user's instruction information or the preset working mode. According to the user's instruction information, two points are determined as selection points in the same horizontal plane of the workpiece point cloud. It should be clarified that the selection point can be a data point in the workpiece point cloud or any point in the virtual space where the workpiece point cloud is located.

[0077] It should be clear that the groove generally appears as a rectangular groove on the horizontal plane. In one embodiment of the present application, in response to the user's command information, the selected point will usually be located on the same side or the opposite side edge of the point cloud representing the groove part in the workpiece point cloud, and the straight line where the selected point is located is the first straight line.

[0078] In step S120, each selected point is horizontally mapped to obtain mapping points, and a frame selection figure is determined with reference to the mapping points and the first straight line. A prism determined by a cross section of the frame selection figure is a frame selection space, and the workpiece point cloud in the frame selection space is a groove point cloud.

[0079] Specifically, when horizontal mapping is performed on each selected point, the mapping direction is perpendicular to the first straight line. Each selected point is synchronously mapped in the horizontal direction, that is, each selected point is synchronously translated in the horizontal plane where the selected point is located, and each selected point is horizontally mapped at the same distance and direction to obtain the mapping point corresponding to each selected point. The mapping point is obtained by horizontal translation of the selected point, that is, the plane where the mapping point and the selected point are located is parallel to the horizontal plane, and the frame selection figure formed by connecting the mapping point and the selected point as nodes is also parallel to the horizontal plane. Horizontal mapping is performed by selecting points, so that the prism determined by the frame selection figure as the cross section is the frame selection space, and the workpiece point cloud in the frame selection space is the point cloud representing the groove part in the workpiece point cloud, which is the groove point cloud.

[0080] It should be further explained that when determining the groove point cloud, all point clouds representing the groove in the workpiece point cloud can be separated as the groove point cloud. Point clouds representing a portion of the groove can also be separated as the groove point cloud. By determining groove point clouds of different sizes, different computing resources can be adapted. The above method realizes the separation of the point cloud representing the groove, or the separation of the point cloud representing a portion of the groove.

[0081] It should be clear that, for determining the frame selection figure, the mapping point and the selected point can be directly connected to form a closed figure as the frame selection figure, or the selected point can be transformed in other ways to obtain the frame selection figure.

[0082] In another embodiment of the present application, in response to the user's instruction information, at least two points are determined in the workpiece point cloud as selected points, and the surface passing through the selected points and perpendicular to the horizontal plane is used as a cross section, and at least two cross sections can be obtained. In the workpiece point cloud intercepted in the middle of the cross section, the part representing the groove is the groove point cloud.

[0083] Specifically, taking one side of the workpiece where the groove is located as the reference horizontal plane, the point cloud of the part of the workpiece point cloud intercepted by the cross section where the depth change is more obvious is the groove point cloud. Because during data collection, only the side of the workpiece where the groove is located is used as the reference plane for data collection, so in the obtained workpiece point cloud, only the depth change of the part representing the groove is more obvious, and most of the data points of the non-groove part are located in the same horizontal plane. Even if the data points of the non-groove part are not located in the same horizontal plane due to the collection accuracy and the unevenness of the workpiece, the depth change of the data points of the non-groove part will not be too obvious. Based on the above principle, in one embodiment of the present application, taking one side of the workpiece where the groove is located as the reference horizontal plane, the point cloud formed by the data points whose depth change exceeds the set change amount in the workpiece point cloud intercepted by the cross section is the groove point cloud.

[0084] In one embodiment of the present application, two points are determined as selected points in the same horizontal plane of the workpiece point cloud according to the user's instruction information. It should be clear that the selected point can be a data point in the workpiece point cloud, or it can be any point in the virtual space where the workpiece point cloud is located, as long as it is selected according to the user's instruction information. The selected point will be located at the same side edge of the point cloud representing the groove part in the workpiece point cloud. That is, at this time, the first straight line is in the left and right direction.

[0085] The two selected points are synchronously mapped in the front-to-back direction on the horizontal plane where they are located, that is, each selected point is synchronously translated in the front-to-back direction on the horizontal plane where the selected point is located to obtain the mapping point corresponding to each selected point.

[0086] The straight line where the mapping point is located is the mapping straight line, and the first straight line is the opposite side to form a frame selection figure parallel to the horizontal plane. The prism determined by the cross section of the frame selection figure is the frame selection space, and the workpiece point cloud in the frame selection space is the point cloud representing the groove part in the workpiece point cloud, which is the groove point cloud.

[0087] See also Figure 2 , Figure 2 A flowchart of determining a frame selection space by using a first straight line and a selected point according to an embodiment of the present application is shown. The present application embodiment provides a step S120 of determining a frame selection space by using a first straight line and a selected point, including:

[0088] Step S121, in the horizontal plane where the first straight line is located, the first straight line is parallel mapped to both sides of the first straight line to obtain a second straight line and a third straight line;

[0089] Step S122, on the horizontal plane where the selected point is located, draw straight lines passing through the selected point and perpendicular to the first straight line, which are the fourth straight line and the fifth straight line;

[0090] Step S123, taking a closed figure enclosed by the second straight line, the third straight line, the fourth straight line and the fifth straight line as a frame selection figure;

[0091] Step S124, taking the framed graphic as the prism determined by the cross section as the framed space, and the workpiece point cloud in the framed space as the groove point cloud.

[0092] The above four steps are described in detail below.

[0093] In response to the user's instruction information, two selected points are determined in the same horizontal plane of the workpiece point cloud, and the straight line where the two selected points are located is the first straight line. In response to the user's instruction information, the two selected points are usually located at the edges of the opposite sides of the point cloud representing the groove part in the workpiece point cloud. The line segment formed by the two selected points as endpoints spans the point cloud representing the groove part, that is, the first straight line is in the front-back direction at this time,

[0094] In step S121, the first straight line is mapped parallel to both sides of the first straight line in the horizontal plane where the first straight line is located to obtain the second straight line and the third straight line. That is, the first straight line is moved to the left and right by a certain distance in the horizontal plane where the first straight line is located to obtain the second straight line and the third straight line.

[0095] In step S122, on the horizontal plane where the selected point is located, straight lines perpendicular to the first straight line are drawn through the selected point, which are the fourth straight line and the fifth straight line.

[0096] In step S123, a closed figure enclosed by the second straight line, the third straight line, the fourth straight line and the fifth straight line is used as a frame selection figure. The second straight line and the fourth straight line, the second straight line and the fifth straight line, the third straight line and the fourth straight line, and the third straight line and the fifth straight line are intersected in pairs to determine four intersection points, and a closed figure determined with the four intersection points as vertices is the frame selection figure.

[0097] In step S124, a prism determined by taking the framed figure as the cross section is used as the framed space, and the workpiece point cloud in the framed space is the groove point cloud.

[0098] In step S130, the groove point cloud is sliced ​​to obtain a slice point cloud. In one embodiment of the present application, in order to better determine the location of the weld in the groove point cloud, the groove point cloud is equidistantly cut in a direction perpendicular to the left and right directions of the groove to obtain a slice point cloud.

[0099] When the groove is curved, the groove point cloud is also curved. After determining the position for slicing the groove point cloud, the groove point cloud is sliced ​​along a direction perpendicular to the tangent of the position.

[0100] The essence of the groove is a groove-shaped weld that needs to be welded. The positions of the weld points and holes in the groove are non-weldable parts. Taking the side of the workpiece where the groove is located as the reference horizontal plane, if there is a weld point in the groove, the weld point will cover the bottom of the groove, which will also cause the lowest point of the weld point to be higher than the lowest point of the weld in the groove, that is, the lowest point of the weld point in the groove will be higher than the lowest point of the weld. At the same time, for the holes in the groove, the lowest point of the hole in the groove will be much lower than the lowest point of the weld.

[0101] Therefore, we only need to take the lowest point in the slice point cloud as the key point, and then by analyzing the height difference between each key point, we can determine whether the key point corresponds to a welding point, a hole or a weld, and then determine whether the slice point cloud to which the key point belongs belongs to the weld in the groove.

[0102] See also Figure 3 , Figure 3 A flowchart of taking a data point in each slice point cloud as a key point according to an order of data point depth from large to small according to an embodiment of the present application is shown. The embodiment of the present application provides a step S130 of taking a data point in each slice point cloud as a key point according to an order of data point depth from large to small, including:

[0103] Step S131, performing plane fitting on each slice point cloud according to each data point in the slice point cloud to obtain a two-dimensional slice point cloud;

[0104] Step S132: taking the data point with the largest depth in each two-dimensional slice point cloud as a key point.

[0105] The above two steps are described in detail below.

[0106] In step S131, for the acquired slice point cloud, each slice point cloud contains several data points. And because the slice point cloud is derived from the groove point cloud, the groove point cloud is in a three-dimensional state, and correspondingly, the slice point cloud is also in a three-dimensional state. When the lowest point is determined as the key point for the slice point cloud in a three-dimensional state, the accuracy will be low when finding the lowest point due to the presence of many noise points, and when the lowest point is determined for the slice point cloud in a three-dimensional state, the use of computing resources will also be greater than that of the slice point cloud in a two-dimensional state. Therefore, according to each data point in each slice point cloud, each slice point cloud is plane-fitted, a plane is determined in the slice point cloud, and each data point is mapped to the plane to obtain a two-dimensional slice point cloud.

[0107] See also Figure 4 , Figure 4 A flow chart of performing plane fitting on each slice point cloud according to each data point in the slice point cloud to obtain a two-dimensional slice point cloud according to an embodiment of the present application is shown. The embodiment of the present application provides a step S131 of performing plane fitting on each slice point cloud according to each data point in the slice point cloud to obtain a two-dimensional slice point cloud, including:

[0108] Step S201, for the slice point cloud, determine a set number of data point sets, and use the planes determined by each data point set as the initial plane, wherein the data point set is composed of any three data points in the slice point cloud that are not in the same straight line;

[0109] Step S202, taking a point in the slice point cloud whose distance from the initial plane is less than a length threshold as a target point of the initial plane;

[0110] Step S203, optimizing the initial plane with the largest number of target points to obtain a two-dimensional slice point cloud.

[0111] The above three steps are described in detail below.

[0112] In step S201, for each slice point cloud, a set number of data point sets are determined based on the data points contained therein. A data point set refers to any three data points that are not in the same straight line. Each data point set can determine a plane, and these planes are used as initial planes.

[0113] The determination of the set number is based on the currently available computer resources. If the current computer resources are more, the set number will be set larger until all data points are exhausted. If the current computer resources are less, the set number will be set smaller within the preset number range, and the lowest is the minimum value within the preset number range. If the current computer resources are very small, in order to ensure processing accuracy, the minimum value within the preset number range will be used as the set number to generate a data point set, and then point cloud processing will be performed, and the user will be reminded that the process is slow.

[0114] It should be clear that for the preset number range, the upper limit is the number of data point sets obtained by exhausting each data point in the sliced ​​point cloud, and the lower limit is the number that ensures the accuracy of point cloud processing.

[0115] In step S202, it can be known from step S201 that there are several initial planes in each slice point cloud, and the data points whose distance to the initial plane is less than the length threshold are taken as the target points of the initial plane, and the number of target points of each initial plane in the slice point cloud is calculated.

[0116] In step S203, the initial plane with the largest number of target points in the slice point cloud is used as the fitting plane, and the data points with a distance less than the length threshold from the fitting plane are mapped to the fitting plane to obtain the two-dimensional slice plane to which the fitting plane belongs. This enables the two-dimensional slice point cloud to more comprehensively represent the slice point cloud corresponding to the two-dimensional slice point cloud.

[0117] In one embodiment of the present application, if the number of target points in the slice point cloud is greater than or equal to the number threshold, it means that the number of target points is sufficient to fully represent the slice point cloud, and the error of the obtained two-dimensional slice point cloud is too large due to too few target points to fully represent the slice point cloud, resulting in the method of the present disclosure being inaccurate. Therefore, when the number of target points in the slice point cloud is greater than or equal to the number threshold, the target points can be mapped to the initial plane with the largest number of target points as the two-dimensional slice point cloud of the slice point cloud to which the initial plane belongs.

[0118] If the number of target points in the slice point cloud is less than the number threshold, it means that the number of target points is not enough to fully represent the slice point cloud. Since there are too few target points to fully represent the slice point cloud, the error of the obtained two-dimensional slice point cloud is too large, resulting in the inaccuracy of the disclosed method. Therefore, if the number of target points in the initial plane with the largest number of target points is less than the number threshold, the length threshold range is expanded until the number of target points is greater than or equal to the number threshold, and then the target points outside the initial plane are projected into the initial plane to obtain a two-dimensional slice point cloud.

[0119] In another embodiment of the present application, in order to allow the two-dimensional slice point cloud to represent the corresponding slice point cloud to the maximum extent, each data point outside the initial plane is projected into the initial plane to obtain a two-dimensional slice point cloud.

[0120] In step S132, the lowest two-dimensional data point in the two-dimensional slice point cloud, that is, the two-dimensional data point with the maximum depth, is determined as a key point.

[0121] See also Figure 5 , Figure 5 The flowchart of taking the data point with the largest depth in each two-dimensional slice point cloud as a key point is shown. The embodiment of the present application provides a step S132 of taking the data point with the largest depth in each two-dimensional slice point cloud as a key point, including:

[0122] Step S301, for each two-dimensional slice point cloud, a set number of data point pairs are determined, and the straight lines determined by each data point pair are respectively used as initial straight lines;

[0123] Step S302, taking data points in the two-dimensional slice point cloud whose distance from the initial straight line is less than a threshold as the inner points of the initial straight line;

[0124] Step S303, taking the initial straight line with the largest number of inliers, and mapping each inlier of the initial straight line to the initial straight line to obtain a fitting line segment;

[0125] Step S304, removing the inner points of the fitting line segment in the two-dimensional slice point cloud, performing straight line fitting again, and determining other fitting line segments in the two-dimensional slice point cloud until all data points in the two-dimensional slice point cloud are inner points of the fitting line segment;

[0126] Step S305: taking the data point with the largest depth among the intersections of the fitted line segments as the key point of the slicing point cloud.

[0127] The above five steps are described in detail below.

[0128] Groove point cloud refers to a set of data points that represent several sampling points of the groove in virtual space. The sampling points are distributed on the surface of the groove. The groove point cloud is sliced ​​in a direction perpendicular to the left and right directions of the groove. The obtained sliced ​​point cloud represents the outline of the groove cross section and reflects the outline of the groove.

[0129] However, when determining the key points in the two-dimensional slice point cloud, the shape of the two-dimensional slice point cloud and the groove cross section may be greatly different due to the influence of some noise points, and the contour of the two-dimensional slice point cloud does not completely match the edge of the groove cross section.

[0130] At the same time, due to errors in data collection and data distortion when fitting the slice point cloud, the two-dimensional slice point cloud cannot well represent the contour of the groove cross section. There will be some discrete points scattered throughout the two-dimensional slice point cloud, which makes it possible that the lowest point in the two-dimensional slice point cloud, that is, the point with the greatest depth, may be a noise point, which will lead to errors in the determination of key points.

[0131] Therefore, after determining the two-dimensional slice point cloud, a straight line is fitted to each data point in the two-dimensional slice point cloud, and then the trajectories of multiple fitted straight lines in the two-dimensional slice point cloud are determined. Finally, each data point in the two-dimensional slice point cloud is mapped to the trajectory of each fitted straight line, and a figure similar to the cross-sectional shape of the groove is obtained. The figure composed of these fitted straight lines is the shape of the cross-sectional shape of the groove. At this time, the intersection between the fitted straight lines is taken as the initial key point, among which the initial key point with the largest depth is the key point, which represents the lowest point of the slice point cloud corresponding to the two-dimensional slice point cloud, and represents the lowest point of the groove corresponding to this part of the groove point cloud.

[0132] Specifically, in step S301, a set number of point pairs are determined for each two-dimensional slice point cloud, and the straight lines determined by each point pair are respectively used as initial straight lines.

[0133] The determination of the set number is based on the currently available computer resources. If the current computer resources are more, the set number will be set larger until all data points are exhausted. If the current computer resources are less, the set number will be set smaller within the preset number range, and the lowest value is the minimum value within the preset number range. If the current computer resources are very small, in order to ensure processing accuracy, the minimum value within the preset number range will be used as the set number to generate point pairs, and then point cloud processing will be performed, and at the same time the user will be reminded that the process is slow.

[0134] In step S302, points in the two-dimensional slice point cloud that are less than a distance threshold from the initial straight line (including points on the initial straight line) are taken as inner points of the initial straight line.

[0135] In step S303, according to the number of inliers of each initial straight line, the initial straight line with the largest number of inliers is selected as the fitting straight line, and the inliers of the initial straight line are aggregated (mapped) onto the initial straight line, so as to obtain a fitting line segment.

[0136] In step S304, the data points distributed on the fitting line and the inner points of the fitting line are removed or ignored in the two-dimensional slice point cloud where the fitting line is located, and the straight line fitting described in steps S301 to S303 is continued until all the data in the two-dimensional slice point cloud where the fitting line is located is mapped to the initial straight line as an inner point, and a number of fitting line segments can be obtained.

[0137] The figure formed by the combination of these fitting line segments is the shape of the groove cross section corresponding to the two-dimensional slice point cloud where the fitting line segments are located.

[0138] In step S305, the intersection points of the fitting line segments are taken as initial key points, and the initial key points with the largest depth are taken as key points.

[0139] In step S140, as described in step S130, the essence of the groove is a groove-shaped weld that needs to be welded. The position of the weld point in the groove and the position of the hole are both non-weldable parts. Taking the side of the groove in the workpiece as the reference horizontal plane, if there is a weld point in the groove, the weld point will cover the bottom of the groove, which will also cause the lowest point of the weld point to be higher than the lowest point of the weld in the groove, that is, the lowest point (the deepest point) of the weld point in the groove will be higher than the lowest point (the deepest point) of the weld. At the same time, for the hole in the groove, the lowest point of the hole in the groove will be much lower than the lowest point of the weld.

[0140] Therefore, it is only necessary to take the lowest point in the slice point cloud as the key point, sort the depths of the key points, and take the average value of the depths of some key points ranked in the middle, such as the depths of key points ranked 20%-80%, and take the average value as the standard value. The depth threshold is set with the standard value as a reference. For example, the depth where the standard value is located is taken as the middle value, and the depth threshold interval is 5mm above and below. For key points with obvious depths greater than the depth threshold interval, their corresponding holes can be directly determined. For key points with obvious depths less than the depth threshold interval, their corresponding welds can be directly determined. The key points corresponding to the parts of the groove that do not need to be welded are determined, and these key points are excluded. The slice point cloud to which the remaining key points belong is the slice point cloud corresponding to the weldable parts of the groove.

[0141] See also Figure 6 , Figure 6 A flowchart of determining a slice point cloud corresponding to a weld in a groove according to the height difference between key points according to an embodiment of the present application is shown. The present application embodiment provides a step S140 of determining a slice point cloud corresponding to a weld in a groove according to the height difference between key points, including:

[0142] Step S141, according to the depth of the key straight line obtained by performing straight line fitting on the key points, a depth threshold interval is set, and the key points with depths within the depth threshold interval are used as weld key points;

[0143] Step S142, determining the position of the weld in the groove according to the position information of the slice point cloud where the key points of the weld are located.

[0144] The above two steps are described in detail below.

[0145] In step S141, the present application eliminates the influence by performing straight line fitting on all key points, and can screen the key points representing the weld. Specifically, among all key points, a set number of key point pairs are determined, and the straight lines where each key point is located are respectively used as the initial key straight line, and the key points with a distance less than the set distance from the initial key straight line are used as the corresponding points of the initial key straight line, and the initial key straight line with the largest number of corresponding points is taken as the key straight line. In the groove point cloud, the key straight line is the initial key straight line with the most key points around it. The part representing the weld and the hole is much less than the part representing the weld, so the key points representing the corresponding weld are also more than the key points corresponding to the weld part, so the corresponding points of the key straight line are the key points used to represent the weld. As the key points corresponding to the key straight line, the key points are closer to the key straight line, indicating that these corresponding points are all corresponding to the weld part like the key line segment. The key points outside the corresponding points of the key line segment and higher than the key straight line depth threshold interval are the weld key points, and the slice point cloud where the weld key points are located is the location of the weld. The key points below the key line depth threshold interval are hole key points, and the slice point cloud where the hole key points are located is the location of the hole.

[0146] With the depth of the key straight line as a reference, a depth threshold interval is set. For example, the depth of the key straight line is taken as the middle value, and the depth threshold interval is 5 mm above and below. For key points whose depth is obviously greater than the depth threshold interval, their corresponding holes can be directly determined. For key points whose depth is obviously less than the depth threshold interval, their corresponding welds can be directly determined, thereby determining the parts of the groove that do not need to be welded.

[0147] See also Figure 7 , Figure 7 A flow chart of smoothing key points before performing straight line fitting on the key points according to an embodiment of the present application is shown. The embodiment of the present application provides steps of smoothing key points before performing straight line fitting on the key points, including:

[0148] Step S401, according to the relative position relationship of each key point, a key point having two adjacent key points is used as a key point to be smoothed;

[0149] Step S402: If the position deviation between the key point to be smoothed and the adjacent key points is less than or equal to the deviation threshold, the key point to be smoothed is moved to the middle position between the adjacent key points to perform smoothing processing on the key point to be smoothed.

[0150] The above two steps are described in detail below.

[0151] The reason for smoothing each key point before performing straight line fitting on the key points is that the depth threshold interval is set with reference to the depth of the key line. For example, the depth of the key line is used as the middle value, and the depth threshold interval is 5mm above and below. For key points whose depth is obviously greater than the depth threshold interval, their corresponding holes can be directly determined. For key points whose depth is obviously less than the depth threshold interval, their corresponding welds can be directly determined, and then the parts of the groove that do not need to be welded can be determined. However, for each key point adjacent to the depth threshold interval, considering that each key point may be affected by light, groove flatness, and precision, it is impossible to accurately determine whether they are key points corresponding to welds or holes for each key point adjacent to the depth threshold interval. Therefore, by smoothing each key point, the judgment of whether each key point is greater than or less than the depth threshold interval is more accurate.

[0152] In step S401, for the key points determined in the two-dimensional slice point cloud, according to the transformation relationship between the two-dimensional slice point cloud and the slice point cloud, the three-dimensional coordinates of the key points in the slice point cloud, that is, the three-dimensional coordinates of the key points in the groove point cloud, can be determined. Among them, the transformation relationship between the two-dimensional slice point cloud and the slice point cloud refers to the coordinate transformation generated when each data point (when clustered) is mapped when the slice point cloud is fitted with a surface.

[0153] The three-dimensional coordinates of each key point are determined according to the two-dimensional coordinates of each key point in the two-dimensional slice point cloud and the transformation relationship between the slice point cloud and the two-dimensional slice point cloud.

[0154] Since each key point is the lowest data point of each slice point cloud, that is, the data point distributed at the bottom of the groove. According to the relative position relationship between each key point, the key points adjacent to each key point can be determined. Since the grooves are mostly straight or regular lines, the distribution of key points in the groove point cloud will also show a line pattern. Each key point has one or two adjacent key points. The outermost key point has only one adjacent key point, and the other key points have two adjacent key points. If only one adjacent key point is used as a reference, the smoothing of the key point will be easily affected by noise points due to too few references, and the smoothing effect will be poor. Therefore, only key points with two adjacent key points are used as key points to be smoothed.

[0155] In step S402, the smoothing order is determined according to the three-dimensional coordinates of each key point to be smoothed. Each key point to be smoothed is smoothed in sequence. Specifically, when the key point to be smoothed is smoothed, the position deviation of the key point to be smoothed and its adjacent key points is first calculated. The position deviation refers to the height difference between the key point to be smoothed and its adjacent key points. If the position deviation of the key point to be smoothed and any of its adjacent key points is greater than the deviation threshold, that is, at this time, there are key points with obviously larger depth or smaller depth in the key point to be smoothed and its adjacent key points. If smoothing is still performed, it will affect the subsequent determination of whether these key points belong to weld key points, so there is no need to perform smoothing again.

[0156] If the position deviation between the key point to be smoothed and the adjacent key point is less than or equal to the deviation threshold, the midpoint coordinates between the adjacent key points are obtained according to the three-dimensional coordinates of the key points adjacent to the key point to be smoothed, and the key point to be smoothed is moved to the above midpoint coordinates to complete the smoothing of the key point to be smoothed. The above technical means are used to smooth all the key points to be smoothed, so that it is more accurate to judge whether the key point corresponds to the weld.

[0157] In step S142, the slice point cloud where the key points of the weld are located is used as the weld point cloud, that is, the slice point cloud corresponds to the weld, and the part of the groove point cloud representing the weld is determined according to the position of the weld point cloud in the groove point cloud, and then the weld position of the workpiece is determined according to the position of the point cloud representing the weld in the groove point cloud. The weld skips the weld points and holes, avoiding damage to the welding device and the workpiece.

[0158] See also Figure 8 , Figure 8 A schematic diagram of a device for processing a point cloud of a ship workpiece according to an embodiment of the present application is shown.

[0159] The point selection module 810 is configured to select two points on the same horizontal plane as selected points in the workpiece point cloud acquired by collecting ship workpiece data, and the straight line where the selected points are located is the first straight line;

[0160] A frame selection module 820 is configured to determine a frame selection space through the first straight line and the selected point, wherein the workpiece point cloud in the frame selection space is a groove point cloud;

[0161] The slicing module 830 is configured to slice the groove point cloud according to the length of the groove point cloud to obtain a slice point cloud, and according to the order of data point depth from large to small, respectively use a data point in each of the slice point clouds as a key point:

[0162] The determination module 840 is configured to determine the slice point cloud corresponding to the weld in the groove according to the height difference between the key points.

[0163] The method for processing the ship workpiece point cloud of the embodiment of the present application can be performed by Fig. 9 The hardware device shown is implemented. Fig. 9 To describe the hardware device according to the embodiment of the present application. Fig. 9 The hardware device shown is only an example and should not bring any limitation to the functions and scope of application of the embodiments of the present application.

[0164] like Fig. 9 As shown, the hardware device may be in the form of a general computing device. The components of the hardware device may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810).

[0165] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present invention described in the description of the exemplary method described above in this specification. For example, the processing unit 810 can perform the following steps: Figure 1 The steps shown in .

[0166] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .

[0167] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0168] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0169] The hardware device may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may communicate with one or more devices that enable a user to interact with the hardware device, and / or may communicate with any device that enables the hardware device to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the hardware device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the hardware device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0170] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0171] In an exemplary embodiment of the present application, a computer program medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the method described in the above method embodiment.

[0172] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0173] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0174] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0175] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0176] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0177] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0178] In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0179] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0180] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the inventions applied for herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that the present application does not apply for. The specification and embodiments are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.

Claims

1. A method for processing a point cloud of a ship workpiece, characterized in that: The method comprises: In the workpiece point cloud acquired by collecting ship workpiece data, two points on the same horizontal plane are selected as selected points, and the straight line where the selected points are located is the first straight line; On the horizontal plane where the first straight line is located, the first straight line is parallelly mapped to both sides of the first straight line to obtain a second straight line and a third straight line; On the horizontal plane where the selected point is located, straight lines perpendicular to the first straight line are drawn through the selected point, which are the fourth straight line and the fifth straight line; A closed figure enclosed by the second straight line, the third straight line, the fourth straight line and the fifth straight line is used as a frame selection figure; A prism determined by taking the frame selection figure as a cross section is a frame selection space, and a workpiece point cloud in the frame selection space is a groove point cloud; Slicing the groove point cloud according to the length of the groove point cloud to obtain a slice point cloud, and performing plane fitting on the slice point cloud according to each data point in each slice point cloud to obtain a two-dimensional slice point cloud; Taking the data point with the largest depth in each of the two-dimensional slice point clouds as a key point; According to the height differences between the key points, the slice point cloud corresponding to the weld in the groove is determined.

2. The method according to claim 1, characterized in that According to each data point in each slice point cloud, plane fitting is performed on each slice point cloud to obtain a two-dimensional slice point cloud, including: For the slice point cloud, determine a set number of data point sets, and use planes determined by each data point set as initial planes, wherein the data point set is composed of any three data points in the slice point cloud that are not in the same straight line; Taking the data points in the slice point cloud whose distance from the initial plane is less than a length threshold as the target points of the initial plane; The initial plane with the largest number of target points is optimized to obtain the two-dimensional slice point cloud.

3. The method according to claim 2, characterized in that The step of optimizing the initial plane with the largest number of target points as the two-dimensional slice point cloud includes: In the slice point cloud, each data point outside the initial plane with the largest number of target points is projected into the initial plane to obtain the two-dimensional slice point cloud.

4. The method according to claim 1, characterized in that: The step of taking the data point with the largest depth in each of the two-dimensional slice point clouds as a key point includes: For each of the two-dimensional slice point clouds, a set number of data point pairs are determined, and a straight line determined by each data point pair is used as an initial straight line; Taking data points in the two-dimensional slice point cloud whose distance from the initial straight line is less than a threshold as the inner points of the initial straight line; Taking the initial straight line with the largest number of interior points, and mapping each interior point of the initial straight line to the initial straight line to obtain a fitting line segment; In the two-dimensional slicing point cloud, the inner points of the fitting line segment are removed, and straight line fitting is performed again to determine other fitting line segments in the two-dimensional slicing point cloud until all data points in the two-dimensional slicing point cloud are inner points of the fitting line segment; The data point with the largest depth among the intersection points of the fitted line segments is used as the key point of the slice point cloud.

5. The method according to claim 1, characterized in that Determining the slice point cloud corresponding to the weld in the groove according to the height difference between the key points includes: According to the depth of the key straight line obtained by performing straight line fitting on the key points, a depth threshold interval is set, and the key points with depths within the depth threshold interval are used as weld key points; The position of the weld in the groove is determined according to the position information of the slice point cloud where the key point of the weld is located.

6. A device for processing point clouds of ship workpieces, characterized in that: The device comprises: The point selection module is configured to select two points on the same horizontal plane as selected points in the workpiece point cloud acquired by collecting ship workpiece data, and the straight line where the selected points are located is the first straight line; The frame selection module is configured to map the first straight line to both sides of the first straight line in parallel on the horizontal plane where the first straight line is located, so as to obtain a second straight line and a third straight line; draw straight lines perpendicular to the first straight line through the selected point on the horizontal plane where the selected point is located, so as to obtain a fourth straight line and a fifth straight line; use a closed figure surrounded by the second straight line, the third straight line, the fourth straight line and the fifth straight line as a frame selection figure; use a prism determined by taking the frame selection figure as a cross section as a frame selection space, and the workpiece point cloud in the frame selection space is a groove point cloud; The slicing module is configured to slice the groove point cloud according to the length of the groove point cloud to obtain a slice point cloud, and perform plane fitting on the slice point cloud according to each data point in each slice point cloud to obtain a two-dimensional slice point cloud; and take the data point with the largest depth in each two-dimensional slice point cloud as a key point; The determination module is configured to determine the slice point cloud corresponding to the weld in the groove according to the height difference between the key points.

7. An electronic device, characterized in that: include: processor; as well as a memory having computer-readable instructions stored thereon; The processor is configured to perform the method of any one of claims 1 to 5 by executing the computer-readable instructions.

8. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 5.