Welded object surface protrusion recognition and processing method and device and storage medium
By performing three-dimensional scanning and data processing on metal 3D printed welds, we identify and remove the raised welds on the surface of the weld, the identification problems caused by errors during welding are solved, and the identification accuracy and production efficiency are improved.
Patent Information
- Application Number
- CN202411106073.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-27
AI Technical Summary
During the metal 3D printing process, due to parameter control errors during welding, it is difficult to accurately identify and remove the raised welds on the surface of the weld. Traditional methods rely on design drawing comparison and have low accuracy.
By performing three-dimensional scanning of the initial weld, the point cloud curve and the ideal curve are extracted, and the convex surface of the weld is combined with the convex threshold is calculated, and the preset bump processing is used for grinding and processing is achieved to achieve welding Accurate identification and removal of object surface protrusions.
It improves the accuracy of identifying the surface bumps of the welded object, realizes the automatic removal of the surface bumps of the welded object, and improves production efficiency and product quality.
Smart Images

Figure CN119205622A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of welding technology, and in particular to a method, device and storage medium for identifying and processing protrusions on the surface of a weld. Background Art
[0002] In the process of metal 3D printing, due to the characteristics of layer-by-layer welding, the surface of the printed object will present a unique texture. However, parameter control errors in the welding process may cause the generation of surface protrusions. Traditional recognition methods rely on comparing the 3D scanning data after printing with the design drawings, but due to the inherent precision errors in the printing process, the 3D scanning data of the weld nodules will be submerged in the inherent precision errors and difficult to identify, making it difficult to remove the weld nodules and having low accuracy.
[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention
[0004] The embodiment of the present invention provides a method, device and storage medium for identifying and processing protrusions on the surface of a weld, which effectively improves the accuracy.
[0005] On the one hand, an embodiment of the present invention provides a method for identifying and processing protrusions on the surface of a weld, comprising the following steps:
[0006] Scanning the initial weld to obtain three-dimensional scanning data of the weld surface;
[0007] Preprocessing the three-dimensional scanning data of the welding object surface to obtain rasterized point cloud data;
[0008] Extracting a first point cloud curve from the rasterized point cloud data;
[0009] Extracting a plurality of second point cloud curves from the rasterized point cloud data according to a preset curve calculation number, wherein a measurement order of the plurality of second point cloud curves is in a sequential relationship with a measurement order of the first point cloud curve;
[0010] Calculating an ideal curve corresponding to the first point cloud curve according to the first point cloud curve and a plurality of the second point cloud curves;
[0011] Combining a plurality of the ideal curves to obtain an ideal surface;
[0012] Calculating the raised area on the surface of the weld according to the measured curved surface, the ideal curved surface and the raised threshold;
[0013] Calculating a starting layer curved surface according to the raised area on the surface of the weld;
[0014] According to the starting layer curved surface, a preset convex processing method is used to grind the convex area on the surface of the weld in the initial weld to obtain a target weld.
[0015] In some embodiments, the scanning of the initial weld to obtain three-dimensional scanning data of the weld surface includes:
[0016] Constructing a three-dimensional space coordinate system according to the initial welded object;
[0017] According to the three-dimensional space coordinate system, a scanning signal is generated, wherein the scanning signal is used to control the laser scanning device to perform measurement operations on multiple vertical coordinates respectively, wherein the measurement operation is used to perform measurement along the horizontal axis on the same vertical coordinate to obtain a measurement curve, wherein the measurement curve includes a plurality of measurement points;
[0018] A plurality of measurement curves are combined to obtain three-dimensional scanning data of the surface of the weld.
[0019] In some embodiments, the preprocessing of the three-dimensional scanning data of the welding object surface to obtain rasterized point cloud data includes:
[0020] rasterizing the three-dimensional scanning data of the welding object surface to obtain first point cloud data;
[0021] Performing peak elimination processing on the first point cloud data to obtain second point cloud data;
[0022] Hole elimination processing is performed on the second point cloud data to obtain the rasterized point cloud data.
[0023] In some embodiments, calculating the ideal curve corresponding to the first point cloud curve according to the first point cloud curve and the plurality of the second point cloud curves includes:
[0024] Initialize the sliding coefficient;
[0025] Selecting a measurement point from the second point cloud curve as a first measurement point;
[0026] Calculating the distance between the first measurement point and each second measurement point in the first point cloud curve respectively to obtain the corresponding measurement point-to-measurement point distance;
[0027] Select a minimum value from the plurality of measurement point-to-measurement point distances as the measurement point-to-curve distance between the first measurement point and the first point cloud curve;
[0028] Calculating an average distance between curves according to the second point cloud curve and the distances from the plurality of measurement points to the curve;
[0029] performing an offset process on the second point cloud curve according to the sliding coefficient and the sliding interval;
[0030] updating the sliding coefficient according to the second point cloud curve after the offset processing until the average distance between the curves reaches a minimum within a preset offset range;
[0031] The ideal curve is calculated according to the first point cloud curve, the updated sliding coefficient and the second point cloud curve after the offset processing.
[0032] In some embodiments, the step of calculating the raised area on the surface of the weld according to the measured curved surface, the ideal curved surface and the raised threshold value comprises:
[0033] If the height value of the third measuring point in the measured curved surface is greater than the height value of the fourth measuring point in the ideal curved surface, the third measuring point is used as a convex point, the abscissa of the third measuring point is equal to the abscissa of the fourth measuring point, and the ordinate of the third measuring point is equal to the ordinate of the fourth measuring point;
[0034] Calculate the distance between the convex point and each fifth measuring point in the ideal surface respectively to obtain the corresponding distance from the convex point to the measuring point;
[0035] Select a minimum value from the distances from the plurality of convex points to the measuring point as the distance from the convex point to the curved surface between the convex point and the ideal curved surface;
[0036] Constructing a distance map according to the distances from the plurality of protrusion points to the curved surface;
[0037] The distance map is binarized according to the convexity threshold to obtain the convexity area on the surface of the weld.
[0038] In some embodiments, the step of calculating the starting layer curved surface according to the raised area on the surface of the weld includes:
[0039] Extracting an ideal area from the ideal curved surface according to the raised area on the surface of the weld;
[0040] According to the distance map, a maximum value is selected from a plurality of distance values within the range of the raised area on the surface of the weld as the starting layer height;
[0041] The starting layer curved surface is calculated according to the starting layer height and the ideal area.
[0042] In some embodiments, calculating the ideal curve according to the first point cloud curve, the updated sliding coefficient and the second point cloud curve after the offset processing includes:
[0043] The ideal curve is calculated according to the first point cloud curve, the updated sliding coefficient and the second point cloud curve after the offset processing by using an ideal curve calculation formula, and the ideal curve calculation formula is:
[0044]
[0045] In the formula, S i (x,z) is the ideal curve of the i-th measurement, is the first point cloud curve or the second point cloud curve after offset processing, is the updated sliding coefficient, Δx is the sliding interval, and w is the total number of measurements.
[0046] On the other hand, an embodiment of the present invention provides a device for identifying and processing protrusions on the surface of a weld, comprising:
[0047] The first module is used to scan the initial weld to obtain three-dimensional scanning data of the weld surface;
[0048] The second module is used to pre-process the three-dimensional scanning data of the welding object surface to obtain rasterized point cloud data;
[0049] A third module is used to extract a first point cloud curve from the rasterized point cloud data;
[0050] A fourth module is used to extract a plurality of second point cloud curves from the rasterized point cloud data according to a preset curve calculation number, wherein the measurement order of the plurality of second point cloud curves is in a sequential relationship with the measurement order of the first point cloud curve;
[0051] A fifth module, configured to calculate an ideal curve corresponding to the first point cloud curve according to the first point cloud curve and a plurality of the second point cloud curves;
[0052] The sixth module is used to combine a plurality of the ideal curves to obtain an ideal surface;
[0053] The seventh module is used to calculate the raised area on the surface of the weld according to the measured curved surface, the ideal curved surface and the raised threshold value;
[0054] An eighth module is used to calculate a starting layer surface according to the raised area on the surface of the weld;
[0055] The ninth module is used to grind the raised area on the surface of the weld in the initial weld using a preset raised processing method according to the starting layer curved surface to obtain a target weld.
[0056] In another aspect, an embodiment of the present invention provides a computer device, comprising:
[0057] at least one processor;
[0058] at least one memory for storing at least one program;
[0059] When the at least one program is executed by the at least one processor, the at least one processor implements the described method.
[0060] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.
[0061] The beneficial effects of the present invention are as follows:
[0062] The embodiment of the present invention first scans the initial weld to obtain three-dimensional scanning data of the weld surface, and pre-processes the three-dimensional scanning data of the weld surface to obtain rasterized point cloud data, then extracts a first point cloud curve and multiple second point cloud curves from the rasterized point cloud data, calculates an ideal curve corresponding to the first point cloud curve, and combines multiple ideal curves to obtain an ideal surface, then calculates the raised area on the weld surface according to the measured surface, the ideal surface and the raised threshold, and calculates the starting layer surface according to the raised area on the weld surface, and finally, according to the starting layer surface, grinds the raised area on the weld surface in the initial weld using a preset raised processing method to obtain a target weld, thereby realizing the recognition and processing of raised areas on the weld surface and improving the accuracy.
[0063] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0065] Figure 1 This is a flow chart of a method for identifying and processing protrusions on the surface of a weld according to an embodiment of the present invention;
[0066] Figure 2 A schematic diagram of measuring an initial weld according to an embodiment of the present invention;
[0067] Figure 3A schematic diagram of a rasterized point cloud data image according to an embodiment of the present invention;
[0068] Figure 4 A schematic diagram of a point cloud curve position relationship according to an embodiment of the present invention;
[0069] Figure 5 A schematic diagram of an ideal curve according to an embodiment of the present invention;
[0070] Figure 6 A schematic diagram of an ideal curved surface according to an embodiment of the present invention;
[0071] Figure 7 A distance map according to an embodiment of the present invention;
[0072] Figure 8 A schematic diagram of a reciprocating machining trajectory according to an embodiment of the present invention;
[0073] Fig. 9 A schematic diagram showing the overall process of protrusion recognition and planning of processing paths according to an embodiment of the present invention;
[0074] Fig.10 This is a schematic structural diagram of a device for identifying and processing protrusions on the surface of a weld according to an embodiment of the present invention;
[0075] Fig.11 The figure is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0076] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0077] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0078] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0079] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0080] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0081] Laser scanner: It is an optical distance sensor. Scanning methods include single-line scanning, raster scanning and full-angle scanning.
[0082] In the related art, during the metal 3D printing process, due to the characteristics of layer-by-layer welding, the surface of the printed object will present a unique texture. However, parameter control errors during the welding process may lead to the generation of weld nodules, which not only affect the appearance quality of the finished product, but may also have an adverse effect on the structural strength. Therefore, it is necessary to automatically inspect the surface of the object and remove the weld nodules after printing. The traditional method relies on comparing the three-dimensional scanning data after printing with the design drawings, but due to the inherent precision errors in the printing process, this method is difficult to accurately distinguish the original printing errors and weld nodules. Specifically, the existing three-dimensional surface defect discrimination method is mainly based on the direct comparison of the three-dimensional scanning results of the existing three-dimensional digital model and the actual printed model to judge the bulge. However, the physical object of three-dimensional welding usually has a very obvious weld-like stacking stripe phenomenon on the surface, and its three-dimensional scanning results have a millimeter-level error with the designed three-dimensional digital model in almost every place, and the three-dimensional scanning data of the weld nodules will be submerged in this inherent processing error and difficult to distinguish, difficult to remove the weld nodules, and low accuracy.
[0083] In view of this, the embodiments of the present invention provide a method, device and storage medium for identifying and processing protrusions on the surface of a weld, which do not rely on the original design model, but directly analyze the three-dimensional scanning data, and calculate the ideal surface to distinguish between normal printing textures and abnormal weld nodules, thereby improving the recognition accuracy. In addition, in order to realize the automatic removal of weld nodules, the weld nodules can be accurately located and removed according to the surface protrusion recognition results, thereby improving production efficiency and ensuring product quality.
[0084] A method for identifying and processing protrusions on the surface of a weld provided in an embodiment of the present application relates to the field of welding technology. A method for identifying and processing protrusions on the surface of a weld provided in an embodiment of the present application can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements a method for identifying and processing protrusions on the surface of a weld, etc., but is not limited to the above forms.
[0085] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0086] The following is a detailed explanation of the embodiments of the present application in conjunction with the accompanying drawings:
[0087] Figure 1 This is an optional flow chart of a method for identifying and processing protrusions on the surface of a weld provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S109.
[0088] Step S101, scanning the initial weld to obtain three-dimensional scanning data of the weld surface;
[0089] Step S102, preprocessing the three-dimensional scanning data of the welding object surface to obtain rasterized point cloud data;
[0090] Step S103, extracting a first point cloud curve from the rasterized point cloud data;
[0091] Step S104, extracting a plurality of second point cloud curves from the rasterized point cloud data according to a preset curve calculation number, wherein the measurement order of the plurality of second point cloud curves is in a sequential relationship with the measurement order of the first point cloud curve;
[0092] Step S105, calculating an ideal curve corresponding to the first point cloud curve according to the first point cloud curve and the plurality of second point cloud curves;
[0093] Step S106, combining multiple ideal curves to obtain an ideal surface;
[0094] Step S107, calculating the raised area on the surface of the weld according to the measured curved surface, the ideal curved surface and the raised threshold;
[0095] Step S108, calculating the starting layer surface according to the raised area on the surface of the weld;
[0096] Step S109: According to the starting layer curved surface, a preset convex processing method is used to grind the convex area on the weld surface of the initial weld to obtain a target weld.
[0097] Steps S101 to S109 shown in the embodiment of the present application realize the recognition and processing of protrusions on the surface of the welding object, thereby improving the accuracy.
[0098] In some embodiments, in step S101, scanning the initial weld to obtain three-dimensional scanning data of the weld surface may include but is not limited to the following steps:
[0099] According to the initial welding object, a three-dimensional space coordinate system is constructed;
[0100] According to the three-dimensional space coordinate system, a scanning signal is generated, the scanning signal is used to control the laser scanning device to perform measurement operations on multiple vertical coordinates respectively, the measurement operation is used to measure along the horizontal axis on the same vertical coordinate to obtain a measurement curve, the measurement curve includes a number of measurement points;
[0101] Multiple measurement curves are combined to obtain three-dimensional scanning data of the weld surface.
[0102] In some embodiments, for measurement scenarios requiring high precision, line laser scanning is usually used for measurement. This embodiment uses a laser scanner to obtain three-dimensional scanning data of the weld surface. A three-dimensional space coordinate system can be constructed based on the initial weld, and then a scanning signal can be generated based on the three-dimensional space coordinate system. Among them, the laser scanning device can be controlled by the scanning signal to perform measurement operations on multiple vertical coordinates respectively. The measurement operation is used to measure along the horizontal axis on the same vertical coordinate to obtain a measurement curve. The measurement curve includes several measurement points. The laser scanning device may include a laser scanner. For example, an example of measuring the initial weld is as follows Figure 2 As shown, the initial weld 201 is located in a two-dimensional coordinate system, and line 202 or line 203 is a single measurement process of the line laser, that is, measurement is performed along the X-axis on the same vertical coordinate. Finally, multiple measurement curves are combined to obtain three-dimensional scanning data of the weld surface. It can be understood that the characteristic of line laser scanning data is that in the measurement coordinate system, its data is rasterized and projected on the XY plane. For other types of point cloud data, other rasterization processing methods can be used to rasterize the data, and then surface protrusions can be identified and processed. More importantly, the data of a single measurement of a line laser is used Indicated by, where x is the offset of the laser scanner coordinate system in the x direction, and z is the corresponding measurement value of the laser scanner at point x. When the line laser scans along the Y axis of the laser scanner, the three-dimensional scanning data of the weld surface can be obtained, which is represented by P(x, y, z).
[0103] In some embodiments, in step S102, preprocessing the three-dimensional scanning data of the welding object surface to obtain rasterized point cloud data may include but is not limited to the following steps:
[0104] Rasterizing the three-dimensional scanning data of the welding object surface to obtain first point cloud data;
[0105] Performing peak elimination processing on the first point cloud data to obtain second point cloud data;
[0106] The second point cloud data is processed to eliminate holes, so as to obtain rasterized point cloud data.
[0107] In some embodiments, after obtaining the three-dimensional scanning data of the welding object surface, the three-dimensional scanning data of the welding object surface can be firstly rasterized to obtain the first point cloud data to form a raster data form, and then the first point cloud data is subjected to peak elimination processing to obtain the second point cloud data, and finally the second point cloud data is subjected to hole elimination processing to obtain rasterized point cloud data, thereby eliminating the peaks and holes caused by the system error. Among them, a filtering method or a local fitting method can be used for elimination. Exemplarily, the image result of the rasterized point cloud data is as follows: Figure 3As shown, the initial weld to be scanned may be a cylindrical object, and only one side of the surface is scanned.
[0108] In some embodiments, in step S103-step S104, a first point cloud curve may be first extracted from the rasterized point cloud data, and then a plurality of second point cloud curves may be extracted from the rasterized point cloud data according to a preset curve calculation number. The measurement order of the plurality of second point cloud curves is in a sequential relationship with the measurement order of the first point cloud curve. For example, the position relationship of the point cloud curves is as follows: Figure 4 As shown, it includes a first point cloud curve 202 and a second point cloud curve 203. When the first point cloud curve is the i-th measurement result, the plurality of second point cloud curves may be i±j-th measurement results, i.e., the first j-th or the last j-th measurement results, so that the measurement order of the plurality of second point cloud curves is in a sequential relationship with the measurement order of the first point cloud curve, wherein j is a preset curve calculation number.
[0109] In some embodiments, in step S105, calculating the ideal curve corresponding to the first point cloud curve according to the first point cloud curve and the plurality of second point cloud curves may include but is not limited to the following steps:
[0110] Initialize the sliding coefficient;
[0111] Select a measurement point from the second point cloud curve as the first measurement point;
[0112] Calculate the distance between the first measurement point and each second measurement point in the first point cloud curve respectively to obtain the corresponding measurement point-to-measurement point distance;
[0113] Select a minimum value from the multiple measurement point-to-measurement point distances as the measurement point-to-curve distance between the first measurement point and the first point cloud curve;
[0114] Calculate the average distance between the curves according to the second point cloud curve and the distances from multiple measurement points to the curve;
[0115] Performing offset processing on the second point cloud curve according to the sliding coefficient and the sliding interval;
[0116] According to the second point cloud curve after the offset processing, the sliding coefficient is updated until the average distance between the curves reaches the minimum within the preset offset range;
[0117] An ideal curve is calculated according to the first point cloud curve, the updated sliding coefficient and the second point cloud curve after the offset processing.
[0118] In some embodiments, it is assumed that the laser scanner measures along its Y-axis direction to obtain n measurement results, wherein the data obtained by the i-th measurement is expressed as but represents the i±jth scan data along the Y axis, let j = 1, 2, ..., w. Slide along the x-axis with a sliding interval of Δx, that is, In some embodiments, Figure 4 In the example, the sliding coefficient k can be initialized first, and then a measurement point is selected from the second point cloud curve 203 as the first measurement point, and the first measurement point (x t ,z t ) and the first point cloud curve The distance between each second measurement point in the corresponding measurement point to measurement point distance is obtained. Among them, 0 <t<n x , 0 <s<n x , n x is the number of sampling points in the X direction. Then select a minimum value from the distances between multiple measurement points as the distance between the first measurement point and the first point cloud curve. Right now Then, the average distance between the curves is calculated based on the second point cloud curve and the distances from the multiple measurement points to the curve. For example, another measurement point is selected from the second point cloud curve to calculate the corresponding distance from the measurement point to the curve, until all measurement points in the second point cloud curve are calculated, multiple distances from the measurement point to the curve are obtained, and the average of the multiple distances from the measurement point to the curve is obtained to obtain the average distance D between the curves. k ,Right now Then, according to the sliding coefficient k and the sliding interval Δx, the second point cloud curve is offset. The offset second point cloud curve can be expressed as Then, according to the second point cloud curve after the offset processing, the sliding coefficient is updated until the average distance between the curves reaches the minimum within the preset offset range. Figure 4 As shown, each iteration offsets the second point cloud curve by a sliding interval Δx, and updates the sliding coefficient, which is the number of sliding intervals Δx offset. After the offset, the average distance between the curves is calculated again. After multiple iterations within the preset offset range, when the average distance between the curves is iterated to the minimum value, the iteration ends, and the updated average distance between the curves and the corresponding sliding coefficient k are obtained, that is, the offset is k sliding intervals Δx. It can be understood that within the preset offset range, the second point cloud curve 203 after the offset iteration has the highest degree of overlap with the first point cloud curve 202. Finally, the ideal curve is calculated according to the first point cloud curve, the updated sliding coefficient and the second point cloud curve after the offset processing by the ideal curve calculation formula. When the first point cloud curve is the i-th measurement result, all the i±j-th measurement results (i.e., multiple second point cloud curves) can be offset respectively, and the corresponding average distance between the curves can be calculated. And the corresponding sliding coefficient Then the ideal curve is obtained by averaging. The ideal curve result is shown in the following example: Figure 5 The ideal curve calculation formula is: In the formula, S i (x,z) is the ideal curve for the i-th measurement, is the first point cloud curve or the second point cloud curve after offset processing. is the updated sliding coefficient, Δx is the sliding interval, and w is the total number of measurements.
[0119] In some embodiments, in step S106, multiple ideal curves may be combined to obtain an ideal surface S(x, y, z). i After combining (c,z), the ideal surface result is as follows Figure 6 shown.
[0120] In some embodiments, in step S107, the convex area on the surface of the weld is calculated according to the measured curved surface, the ideal curved surface and the convex threshold, which may include but is not limited to the following steps:
[0121] If the height value of the third measuring point in the measured surface is greater than the height value of the fourth measuring point in the ideal surface, the third measuring point is taken as the convex point, the abscissa of the third measuring point is equal to the abscissa of the fourth measuring point, and the ordinate of the third measuring point is equal to the ordinate of the fourth measuring point;
[0122] Calculate the distance between the convex point and each fifth measuring point in the ideal surface respectively, and obtain the corresponding distance from the convex point to the measuring point;
[0123] Select a minimum value from the distances from multiple convex points to the measuring point as the distance from the convex point to the surface between the convex point and the ideal surface;
[0124] Construct a distance map based on the distances from multiple convex points to the surface;
[0125] According to the convexity threshold, the distance map is binarized to obtain the convexity area on the weld surface.
[0126] In some embodiments, the height of the measured surface and the ideal surface can be determined first. If the height value z of the third measuring point in the measured surface P (x, y, z) is P Greater than the height z of the fourth measurement point in the ideal surface S(x,y,z) S , that is, z P >z S, then the point is determined to be a convexity, otherwise it is a concave, and the third measurement point is taken as the convex point. Among them, the abscissa of the third measurement point is equal to the abscissa of the fourth measurement point, and the ordinate of the third measurement point is equal to the ordinate of the fourth measurement point, that is, the measurement points at the same position on the coordinate system. Then calculate the distance between the convex point and each fifth measurement point in the ideal surface respectively, obtain the corresponding distance from the convex point to the measurement point, and select a minimum value from the multiple distances from the convex point to the measurement point as the distance d from the convex point to the surface between the convex point and the ideal surface z . Then, for each measurement point in the measurement surface, the corresponding convex point to the surface distance is calculated, and a distance map D(x, y, z) is constructed based on multiple convex point to surface distances. The distance map result example is as follows Figure 7 As shown in the figure, it is represented in the form of a heat map, red represents convexity, and blue represents concaveness or no convexity. In the distance map D(x,y,z), the distance value z corresponding to the measurement point (x,y) is the distance d from the convex point of the measurement point to the surface z Finally, the distance map is binarized according to the convexity threshold T to obtain the convexity area on the weld surface. For example, the pixel value of the measurement point whose distance value z is greater than the convexity threshold T can be set to 1, the pixel value of the measurement point whose distance value z is less than or equal to the convexity threshold T can be set to 0, and the area with a pixel value of 1 is regarded as the convexity area on the weld surface.
[0127] In some embodiments, in step S108, the starting layer surface is calculated according to the raised area on the surface of the weld, which may include but is not limited to the following steps:
[0128] According to the raised area on the weld surface, an ideal area is extracted from the ideal curved surface;
[0129] According to the distance diagram, a maximum value is selected from multiple distance values within the convex area of the weld surface as the starting layer height;
[0130] The starting layer surface is calculated based on the starting layer height and the ideal area.
[0131] In some embodiments, the ideal area can be extracted from the ideal surface according to the raised area on the weld surface. For each raised area U on the weld surface, the area on the XY plane corresponding to the ideal surface S (x, y, z) is recorded as the ideal area S loc(x, y, z), which is the part of the ideal surface that needs to be machined into shape. It can be understood that the purpose of machining is to grind off all the raised areas on the weld surface that are actually measured until the surface reaches the ideal surface to be fitted. Then, according to the distance map, a maximum value is selected from multiple distance values within the range of the raised area on the weld surface as the starting layer height. For each raised area U on the weld surface, according to the distance map D(x, y, z), the local maximum distance D(x, y, z) within the range U is found as the starting layer height d max For example, on the distance map, a measurement point with the largest distance value z can be found within the raised area of the weld surface, and the distance value z of the measurement point is used as the starting layer height d max Finally, the starting layer surface is calculated according to the starting layer height and the ideal area. loc (x,y,z)+d max As the starting surface for machining.
[0132] In some embodiments, in step S109, a processing path may be planned layer by layer according to the starting layer surface using a preset convex processing method, and the convex area of the weld surface in the initial weld may be ground to obtain a target weld. The preset convex processing method may include a reciprocating processing method or a rotary processing method. The processing trajectory generated by the reciprocating processing method is as follows: Figure 8 shown.
[0133] In some embodiments, the overall process of protrusion recognition and planning processing path is as follows: Fig. 9 As shown, the three-dimensional scanning data of the welding object surface can be rasterized first, and the data peaks and holes can be repaired. Then, the closest distance kΔx between the point set of the ith line scan and the previous and next w scans can be calculated as an offset. The scanning data of the previous and next w times are offset by kΔx and averaged to obtain the ideal curve of the ith scan. Then, the data of all n scans are calculated to obtain the ideal surface of the entire scanning data. According to the gap between the scanning surface and the ideal surface, the convex area can be judged and obtained as the recognition result. Finally, the processing path can be planned according to the convex area for processing.
[0134] In some embodiments, this embodiment is only based on the three-dimensional scanning data of the weld surface, without relying on the three-dimensional design model, and can estimate the ideal surface of the data, thereby improving applicability. This embodiment calculates the raised area and the raised area distance map based on the ideal surface, which can provide the necessary premise for the subsequent production and processing path. In addition, for welds formed by welding, the welds are quite different from the digital model, and it is difficult to rely on the digital model to identify and plan forming defects. This embodiment only uses the three-dimensional scanning data of the weld to approximately fit the ideal weld surface, and then identifies and determines the weld nodule defects on this basis, thereby improving accuracy.
[0135] The beneficial effects of implementing the embodiments of the present invention include: the embodiments of the present invention first scan and process the initial weld to obtain three-dimensional scanning data of the weld surface, and pre-process the three-dimensional scanning data of the weld surface to obtain rasterized point cloud data, then extract the first point cloud curve and multiple second point cloud curves from the rasterized point cloud data, calculate the ideal curve corresponding to the first point cloud curve, and combine the multiple ideal curves to obtain the ideal surface, then calculate the raised area on the weld surface according to the measured surface, the ideal surface and the raised threshold, and calculate the starting layer surface according to the raised area on the weld surface, and finally, according to the starting layer surface, grind the raised area on the weld surface in the initial weld using a preset raised processing method to obtain the target weld, thereby realizing the recognition and processing of raised areas on the weld surface and improving the accuracy.
[0136] like Fig.10 As shown, an embodiment of the present invention further provides a device for identifying and processing protrusions on the surface of a weld, comprising:
[0137] The first module 801 is used to scan the initial weld to obtain three-dimensional scanning data of the weld surface;
[0138] The second module 802 is used to pre-process the three-dimensional scanning data of the welding object surface to obtain rasterized point cloud data;
[0139] The third module 803 is used to extract a first point cloud curve from the rasterized point cloud data;
[0140] The fourth module 804 is used to extract a plurality of second point cloud curves from the rasterized point cloud data according to a preset curve calculation number, wherein the measurement order of the plurality of second point cloud curves is in a sequential relationship with the measurement order of the first point cloud curve;
[0141] A fifth module 805 is used to calculate an ideal curve corresponding to the first point cloud curve according to the first point cloud curve and a plurality of second point cloud curves;
[0142] The sixth module 806 is used to combine multiple ideal curves to obtain an ideal surface;
[0143] The seventh module 807 is used to calculate the raised area on the surface of the weld according to the measured curved surface, the ideal curved surface and the raised threshold value;
[0144] The eighth module 808 is used to calculate the starting layer surface according to the raised area on the surface of the weld;
[0145] The ninth module 809 is used to grind the raised area on the weld surface of the initial weld using a preset convex processing method according to the starting layer surface to obtain a target weld.
[0146] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0147] like Fig.11 As shown, an embodiment of the present invention further provides a computer device, including:
[0148] at least one processor 901;
[0149] At least one memory 902, used to store at least one program;
[0150] When at least one program is executed by at least one processor, the at least one processor implements Figure 1 The method shown.
[0151] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0152] The embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, Figure 1 The method shown.
[0153] The contents of the above method embodiments are all applicable to the present storage medium embodiments. The functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0154] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for identifying and processing protrusions on the surface of a weld, characterized in that: The following steps are involved: Scanning the initial weld to obtain three-dimensional scanning data of the weld surface; Preprocessing the three-dimensional scanning data of the welding object surface to obtain rasterized point cloud data; Extracting a first point cloud curve from the rasterized point cloud data; Extracting a plurality of second point cloud curves from the rasterized point cloud data according to a preset curve calculation number, wherein a measurement order of the plurality of second point cloud curves is in a sequential relationship with a measurement order of the first point cloud curve; Calculating an ideal curve corresponding to the first point cloud curve according to the first point cloud curve and a plurality of the second point cloud curves; Combining a plurality of the ideal curves to obtain an ideal surface; Calculating the raised area on the surface of the weld according to the measured curved surface, the ideal curved surface and the raised threshold; Calculating a starting layer curved surface according to the raised area on the surface of the weld; According to the starting layer curved surface, a preset convex processing method is used to grind the convex area on the surface of the weld in the initial weld to obtain a target weld.
2. The method according to claim 1, characterized in that The scanning process of the initial welded object to obtain three-dimensional scanning data of the welded object surface includes: Constructing a three-dimensional space coordinate system according to the initial welded object; According to the three-dimensional space coordinate system, a scanning signal is generated, wherein the scanning signal is used to control the laser scanning device to perform measurement operations on multiple vertical coordinates respectively, wherein the measurement operation is used to perform measurement along the horizontal axis on the same vertical coordinate to obtain a measurement curve, wherein the measurement curve includes a plurality of measurement points; A plurality of measurement curves are combined to obtain three-dimensional scanning data of the surface of the weld.
3. The method according to claim 1, characterized in that: The preprocessing of the three-dimensional scanning data of the welding object surface to obtain rasterized point cloud data includes: rasterizing the three-dimensional scanning data of the welding object surface to obtain first point cloud data; Performing peak elimination processing on the first point cloud data to obtain second point cloud data; Hole elimination processing is performed on the second point cloud data to obtain the rasterized point cloud data.
4. The method according to claim 1, characterized in that: The step of calculating an ideal curve corresponding to the first point cloud curve according to the first point cloud curve and the plurality of second point cloud curves includes: Initialize the sliding coefficient; Selecting a measurement point from the second point cloud curve as a first measurement point; Calculating the distance between the first measurement point and each second measurement point in the first point cloud curve respectively to obtain the corresponding measurement point-to-measurement point distance; Select a minimum value from the plurality of measurement point-to-measurement point distances as the measurement point-to-curve distance between the first measurement point and the first point cloud curve; Calculating an average distance between curves according to the second point cloud curve and the distances from the plurality of measurement points to the curve; performing an offset process on the second point cloud curve according to the sliding coefficient and the sliding interval; updating the sliding coefficient according to the second point cloud curve after the offset processing until the average distance between the curves reaches a minimum within a preset offset range; The ideal curve is calculated according to the first point cloud curve, the updated sliding coefficient and the second point cloud curve after the offset processing.
5. The method according to claim 1, characterized in that The step of calculating the raised area on the surface of the weld according to the measured curved surface, the ideal curved surface and the raised threshold value comprises: If the height value of the third measuring point in the measured curved surface is greater than the height value of the fourth measuring point in the ideal curved surface, the third measuring point is used as a convex point, the abscissa of the third measuring point is equal to the abscissa of the fourth measuring point, and the ordinate of the third measuring point is equal to the ordinate of the fourth measuring point; Calculate the distance between the convex point and each fifth measuring point in the ideal surface respectively to obtain the corresponding distance from the convex point to the measuring point; Select a minimum value from the distances from the plurality of convex points to the measuring point as the distance from the convex point to the curved surface between the convex point and the ideal curved surface; Constructing a distance map according to the distances from the plurality of protrusion points to the curved surface; The distance map is binarized according to the convexity threshold to obtain the convexity area on the surface of the weld.
6. The method according to claim 5, characterized in that The step of calculating the starting layer curved surface according to the raised area on the surface of the weld includes: Extracting an ideal area from the ideal curved surface according to the raised area on the surface of the weld; According to the distance map, a maximum value is selected from a plurality of distance values within the range of the raised area on the surface of the weld as the starting layer height; The starting layer curved surface is calculated according to the starting layer height and the ideal area.
7. The method according to claim 4, characterized in that The calculating the ideal curve according to the first point cloud curve, the updated sliding coefficient and the second point cloud curve after the offset processing includes: The ideal curve is calculated according to the first point cloud curve, the updated sliding coefficient and the second point cloud curve after the offset processing by using an ideal curve calculation formula, and the ideal curve calculation formula is: In the formula, S i (x,z) is the ideal curve of the i-th measurement, is the first point cloud curve or the second point cloud curve after offset processing, is the updated sliding coefficient, Δx is the sliding interval, and w is the total number of measurements.
8. A device for identifying and processing protrusions on the surface of a weld, characterized in that: include: The first module is used to scan the initial weld to obtain three-dimensional scanning data of the weld surface; The second module is used to pre-process the three-dimensional scanning data of the welding object surface to obtain rasterized point cloud data; A third module is used to extract a first point cloud curve from the rasterized point cloud data; A fourth module is used to extract a plurality of second point cloud curves from the rasterized point cloud data according to a preset curve calculation number, wherein the measurement order of the plurality of second point cloud curves is in a sequential relationship with the measurement order of the first point cloud curve; A fifth module, configured to calculate an ideal curve corresponding to the first point cloud curve according to the first point cloud curve and a plurality of the second point cloud curves; The sixth module is used to combine a plurality of the ideal curves to obtain an ideal surface; The seventh module is used to calculate the raised area on the surface of the weld according to the measured curved surface, the ideal curved surface and the raised threshold value; An eighth module is used to calculate a starting layer surface according to the raised area on the surface of the weld; The ninth module is used to grind the raised area on the surface of the weld in the initial weld using a preset raised processing method according to the starting layer curved surface to obtain a target weld.
9. A computer device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
