A cross-section extraction and measurement method and system based on point cloud slices
By using a point cloud slicing method to obtain the contour of a part model through a reference plane, the method of obtaining the part and the technical problem of obtaining the contour of the part are addressed. The cross-sectional contour of the part is obtained through the reference plane and the vertical cutting plane, which solves the problem that the spatial data of the part contour cannot be obtained in the existing technology, and achieves more efficient data acquisition.
Patent Information
- Application Number
- CN202211559577.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2042-12-06
AI Technical Summary
Existing 3D scanning technology cannot directly obtain the contour space data of high-performance parts from the point cloud data of 3D modeling, resulting in uncertainties and deformation effects during production and assembly.
By using a point cloud slicing method, the reference plane of the part model is obtained, the vertical cross-section and target point cloud data are determined, the amount of point cloud data is reduced, and the cross-sectional contour of the part is obtained using the reference plane and the vertical cross-section, which is then converted into a two-dimensional image to obtain spatial data.
It effectively reduces the amount of point cloud data, improves the efficiency of acquiring spatial data of part contours, solves the problem of the accuracy and precision of part contours that cannot be directly obtained in the existing technology, and provides a more effective solution to the problem of the inability to acquire spatial data of part contours in the existing technology.
Smart Images

Figure CN116255930B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of two-dimensional measurement, in particular to a cross section extraction and measurement method and system based on point cloud slices. BACKGROUND
[0002] With the rapid development of industry, high-performance parts as the key of high-end industrial equipment, its production, assembly and measurement and other represent a company and even the level of scientific and technological development of the country, and measurement and data analysis as the most important of high-end industrial equipment, is an important indicator to measure whether a product is qualified. The current high-performance parts due to its size and shape and other complex, so the existing geometric parameter model and measurement mode of over-idealization; and in the process of parts processing production uncertainty factors and inevitable deformation, resulting in the final product geometric parameter performance indicators and expectations do not match, even seriously affect the subsequent product development, therefore, to the production and assembly of complex high-performance parts with great distress.
[0003] The existing three-dimensional scanning technology can reconstruct the surface of the object and collect point cloud data, but the data volume of the point cloud data is huge, and the spatial data of the part contour cannot be directly obtained from the three-dimensional modeling point cloud data. SUMMARY
[0004] In order to overcome the problem that the data volume of the point cloud data is huge and the spatial data of the part contour cannot be directly obtained from the three-dimensional modeling point cloud data, the present application provides a cross section extraction and measurement method and system based on point cloud slices.
[0005] In the first aspect, in order to solve the above technical problems, the present application provides a cross section extraction and measurement method based on point cloud slices, which comprises the following steps:
[0006] Obtaining a first point cloud set corresponding to a part model, the first point cloud set being a collection of point cloud data obtained by three-dimensional reconstruction of the part model;
[0007] Determining a reference surface according to the first point cloud set, the reference surface being a plane formed by the point cloud data in the first point cloud set located on the same plane;
[0008] Determining a vertical section according to the reference surface, the vertical section being a plane perpendicular to the reference surface;
[0009] Determining target point cloud data in the first point cloud set according to the vertical section and the first point cloud set, and determining a second point cloud set according to each target point cloud data, the target point cloud data being the point cloud data in the first point cloud set having a distance to the vertical section within a preset range;
[0010] Determining a cross section contour of the part model according to the second point cloud set.
[0011] The cross section extraction and measurement method based on point cloud slices has the beneficial effect that since the spatial data of the profile of the part cannot be directly obtained from the three-dimensional modeled point cloud data, one cross section of the part is obtained through the reference surface, and the target point cloud data is obtained through the perpendicular section and the reference surface, which greatly reduces the number of point cloud data of the first point cloud data set, and finally the second point cloud set can be obtained through the target point cloud data, and the cross section profile of the part model is determined according to the second point cloud set, so that the spatial data of the cross section profile can be obtained, and the spatial data of the entire part model can be obtained by obtaining the spatial data of multiple cross section profiles through the above method, thereby solving the problems of large amount of point cloud data and inability to directly obtain the spatial data of the part profile from the three-dimensional modeled point cloud data.
[0012] On the basis of the above technical solution, the cross section extraction and measurement method based on point cloud slices can be further improved as follows.
[0013] Further, the method further comprises:
[0014] According to the reference surface, a straight line on the reference surface and a first normal vector corresponding to the reference surface are obtained;
[0015] According to the straight line, a direction vector corresponding to the straight line and a point on the straight line are determined;
[0016] According to the first normal vector and the direction vector, a second normal vector corresponding to the perpendicular section is determined;
[0017] According to the reference surface, the perpendicular section is determined, comprising:
[0018] The perpendicular section is determined according to the point and the second normal vector.
[0019] The beneficial effect of the above further scheme is that the second normal vector is determined through the direction vector of the line on the reference surface and the first normal vector, and the perpendicular section is determined through the second normal vector and the point on the line, so as to subsequently determine the target point cloud data.
[0020] Further, the above determining, according to the first normal vector and the direction vector, of the second normal vector corresponding to the perpendicular section comprises:
[0021] According to the first normal vector and the direction vector, the second normal vector corresponding to the perpendicular section is determined through a first formula, wherein the first formula is:
[0022] N Π =N Γ ×N l
[0023] =(n y *l-n z *n,n z*m-n x *l,n x *n-n y *m)
[0024] = (n.x, n.y, n.z) ;
[0025] wherein N Π represents the second normal vector N Π = (n.x, n.y, n.z), N Γ represents the first normal vector, and N Γ = (n x , n y , n z ), N l represents the direction vector, and N l = (m, n, l).
[0026] The beneficial effect of the above further solution is that the second vector is determined by the first formula, so as to determine the perpendicular tangent plane subsequently.
[0027] Further, the above determining the target point cloud data in the first point cloud set according to the perpendicular tangent plane and the first point cloud set, and determining the second point cloud set according to each target point cloud data, comprises:
[0028] determining the target point cloud data in the first point cloud set according to the perpendicular tangent plane and the first point cloud set by a third formula, wherein the third formula is:
[0029] n.x (x-x l ) + n.y (y-y l ) + n.z (z-z l ) = 0;
[0030] wherein the third formula represents the perpendicular tangent plane, (x l , y l , z l ) represents the point, and N Π = (n.x, n.y, n.z) represents the second normal vector.
[0031] The beneficial effect of the above further solution is that the second vector is determined by the first formula, so as to determine the perpendicular tangent plane subsequently.
[0032] Further, the above determining the target point cloud data in the first point cloud set according to the perpendicular tangent plane and the first point cloud set, and determining the second point cloud set according to each target point cloud data, comprises:
[0033] determining the target point cloud data in the first point cloud set according to the perpendicular tangent plane and the first point cloud set by a third formula, wherein the third formula is:
[0034]
[0035] Wherein, a, b, c, d represent the plane parameters of the vertical section, (x i ,y i ,z i ) represents the i-th point cloud data in the first point cloud set, Ψ + represents the set of target point cloud data in the first point cloud set located in the first preset direction of the vertical section, Ψ - represents the set of target point cloud data in the first point cloud set located in the second preset direction of the vertical section, dis represents the distance of each point cloud data in the first point cloud set to the vertical section, represents the preset range;
[0036] According to each target point cloud data, the second point cloud set is determined, comprising:
[0037] According to each target point cloud data, the second point cloud set is determined by a fourth formula, wherein the fourth formula is:
[0038] Ψ=Ψ + +Ψ - ;
[0039] Wherein, Ψ represents the second point cloud set.
[0040] The beneficial effects of the above further scheme are: the target point cloud data is determined from the first target point cloud set by the third formula, and the second point cloud set is determined according to each target point cloud data by the fourth formula.
[0041] Further, the method further comprises:
[0042] According to the second point cloud set, the projection coordinates of each point cloud data in the second point cloud set projected onto the section are determined;
[0043] According to the second point cloud set, the section profile of the part model is determined, comprising:
[0044] According to each projection coordinate, the section profile of the part model is determined.
[0045] The beneficial effects of the above further scheme are: the second point cloud set is projected onto the section, so that the three-dimensional image can be converted into a two-dimensional image, and the spatial data of any one section of the part profile can be obtained through the two-dimensional image.
[0046] Further, the above determining the projection coordinates of each point cloud data in the second point cloud set projected onto the section according to the second point cloud set, the point and the second normal vector comprises:
[0047] According to the second point cloud set, the point and the second normal vector, the projection coordinates of each point cloud data in the second point cloud set projected onto the section are determined by a fifth formula, wherein the fifth formula is:
[0048]
[0049] d = -(n.x*x l +n.y*y l +n.z*z l );
[0050] wherein (x p ,y p ,z p ) represents the projection coordinates corresponding to the i-th point cloud data, (x l , y l , z l ) represents the point, N Π =(n.x, n.y, n.z) represents the second normal vector, and (x i , y i , z i ) represents the i-th point cloud data in the first point cloud set.
[0051] The beneficial effects of the above further scheme are that: by the fifth formula, the second point cloud set is projected onto the cross section to form the projection coordinates, so that the three-dimensional image can be converted into a two-dimensional image, thereby obtaining the spatial information of any one cross section of the part contour.
[0052] In a second aspect, the present application provides a cross section extraction and measurement system based on point cloud slicing, comprising:
[0053] A first point cloud set acquisition module is configured to acquire a first point cloud set corresponding to a part model, wherein the first point cloud set is a collection of point cloud data obtained by three-dimensional reconstruction of the part model;
[0054] A reference surface acquisition module is configured to determine a reference surface according to the first point cloud set, wherein the reference surface is a plane formed by point cloud data in the first point cloud set located on the same plane;
[0055] A perpendicular cross section acquisition module is configured to determine a perpendicular cross section according to the reference surface, wherein the perpendicular cross section is a plane perpendicular to the reference surface;
[0056] A second point cloud set acquisition module is configured to determine target point cloud data in the first point cloud set according to the perpendicular cross section and the first point cloud set, and determine a second point cloud set according to each target point cloud data, wherein the target point cloud data is point cloud data with a distance to the perpendicular cross section within a preset range;
[0057] A cross section contour acquisition module is configured to determine a cross section contour of the part model according to the second point cloud set.
[0058] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a program stored in the memory and running on the processor, and the processor implements the steps of the cross section extraction and measurement method based on point cloud slices when running the program.
[0059] In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores instructions, and the instructions, when running on a terminal device, cause the terminal device to perform the steps of the cross section extraction and measurement method based on point cloud slices. BRIEF DESCRIPTION OF DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the present application will be further described below with reference to the drawings and embodiments.
[0061] Figure 1 A flowchart of a cross section extraction and measurement method based on point cloud slices according to an embodiment of the present application;
[0062] Figure 2 An image corresponding to the second point cloud set;
[0063] Figure 3 A cross section profile of the part model;
[0064] Figure 4 A structural diagram of a cross section extraction and measurement system based on point cloud slices according to an embodiment of the present application. DETAILED DESCRIPTION
[0065] The following embodiments are further explanations and supplements of the present application and do not constitute any limitation on the present application.
[0066] The following describes a cross section extraction and measurement method and system based on point cloud slices according to an embodiment of the present application.
[0067] As shown in the drawings, Figure 1 A cross section extraction and measurement method based on point cloud slices according to an embodiment of the present application, which can be applied to a terminal device, and the present application scheme is described taking the terminal device as the execution subject, wherein the terminal device is in communication connection with a three-dimensional scanner, and the terminal device can be a computer, a server, etc., and is used to execute a cross section extraction and measurement method based on point cloud slices, and the three-dimensional scanner is used to scan parts to obtain point cloud data.
[0068] Specifically, a cross section extraction and measurement method based on point cloud slices comprises the following steps:
[0069] S1, obtaining a first point cloud set corresponding to a part model, the first point cloud set being a collection of point cloud data obtained by three-dimensional reconstruction of the part model;
[0070] The point cloud data is obtained by scanning a part model by a three-dimensional scanner, and the first point cloud set is obtained by three-dimensional reconstruction of the point cloud data. The three-dimensional reconstruction of the point cloud data can be achieved by a scheme in the prior art, and will not be described here.
[0071] S2, determining a reference surface according to the first point cloud set, the reference surface being a plane formed by the point cloud data in the first point cloud set located in the same plane;
[0072] S3, determining a vertical section according to the reference surface, the vertical section being a plane perpendicular to the reference surface;
[0073] S4, determining target point cloud data in the first point cloud set according to the vertical section and the first point cloud set, and determining a second point cloud set according to each target point cloud data, the target point cloud data being the point cloud data in the first point cloud set having a distance to the vertical section within a preset range;
[0074] The distribution of the point cloud data in the first cloud set is discrete. After the vertical section is determined, the point cloud data contained in the vertical section cannot completely reflect the profile of the section. Therefore, the distance of each point cloud data in the first point cloud set to the vertical section is calculated, more point cloud data is included, so that the target point cloud data is determined, and the second point cloud set can completely reflect the profile of the section.
[0075] S5, determining the cross-sectional profile of the part model according to the second point cloud set.
[0076] Optionally, any plane in the first point cloud set can be used as the reference surface. The reference surface can be used to obtain the spatial data of the part in the cross-sectional direction parallel to the cross section. The vertical section is made based on the reference surface. The vertical section can be used to obtain the spatial data of the part in the cross-sectional direction perpendicular to the cross section. Finally, the point cloud data of the reference surface and the point cloud data of the vertical section are integrated, so that the spatial data of the part in the cross section is obtained. Based on this, the method further comprises:
[0077] S12, obtaining a straight line on the reference surface and a first normal vector corresponding to the reference surface according to the reference surface;
[0078] S13, determining a direction vector corresponding to the straight line and a point on the straight line according to the straight line;
[0079] S14, determining a second normal vector corresponding to the vertical section according to the first normal vector and the direction vector.
[0080] Optionally, the determination of the vertical section according to the reference surface comprises:
[0081] determining the vertical section according to the point and the second normal vector.
[0082] Optionally, in S12, a plurality of points or a circle on the reference plane can also be determined instead of a straight line, and in the embodiment, a straight line is selected for illustration.
[0083] Optionally, if a vertical section perpendicular to the reference plane is needed, a second normal vector of the reference plane needs to be determined first, and after the second normal vector is determined, a point on the reference plane can be selected to determine the vertical section along the second normal vector based on the point. Based on this, the second normal vector corresponding to the vertical section is determined according to the first normal vector and the direction vector, including:
[0084] The second normal vector corresponding to the vertical section is determined according to the first normal vector and the direction vector through a first formula, wherein the first formula is:
[0085] N Π =N Γ ×N l
[0086] =(n y *l-n z *n,n z *m-n x *l,n x *n-n y *m)
[0087] =(n.x,n.y,n.z);
[0088] wherein N Π represents the second normal vector N Π =(n.x, n.y, n.z), N Γ represents the first normal vector, and N Γ =(n x , n y , n z ), N l represents the direction vector, and N l =(m, n, l).
[0089] The vertical section is determined according to the point and the second normal vector, including:
[0090] The vertical section is determined according to the point and the second normal vector through a second formula, wherein the second formula is:
[0091] n.x(x-x l )+n.y(y-y l )+n.z(z-z l )=0;
[0092] wherein the second formula represents the vertical section, (x l ,y l ,z l) represents a point, N Π = (nx, ny, nz) represents the second normal vector.
[0093] Optionally, the above-mentioned method determines the target point cloud data in the first point cloud based on the vertical cross-section and the first point cloud set, and determines the second point cloud set based on each target point cloud data set, including:
[0094] Based on the vertical cross-section and the first point cloud set, the target point cloud data in the first point cloud set is determined using the third formula, whereby:
[0095]
[0096] Where a, b, c, and d represent the planar parameters of the perpendicular tangent plane, (x i ,y i ,z i ) represents the i-th point cloud data in the first point cloud set, Ψ + Ψ represents the set of target point cloud data located in the first preset direction of the vertical sectional plane within the first point cloud set. - This represents the set of target point cloud data located in the second preset direction of the vertical tangent plane within the first point cloud set, where dis represents the distance from each point cloud data in the first point cloud set to the vertical tangent plane. Indicates a preset range;
[0097] Based on the target point cloud data, the second point cloud set is determined, including:
[0098] Based on the target point cloud data, the second point cloud set is determined using the fourth formula, which is:
[0099] Ψ=Ψ + +Ψ - ;
[0100] Here, Ψ represents the second point cluster.
[0101] like Figure 2 As shown, α represents the reference plane, β represents the vertical tangent plane, if a represents the first preset direction, then b represents the second preset direction, and vice versa, if a represents the second preset direction, then b represents the first preset direction.
[0102] Optionally, the preset range can be set according to the actual situation.
[0103] like Figure 3 The image shown represents the convergence of the second point obtained through the reference plane and the perpendicular section of the part. Figure 3 It can be seen that the image formed by the second point aggregation has low precision and accuracy. Therefore, it is necessary to project the second point aggregation onto the cross section to obtain a clear two-dimensional image, thereby obtaining the spatial data of the cross section of the part contour through the two-dimensional image.
[0104] Optionally, the method further comprises:
[0105] According to the second point cloud set, determining a projection coordinate of each point cloud data in the second point cloud set projected onto the cross section;
[0106] According to the second point cloud set, determining a cross section profile of the part model, comprising:
[0107] According to each projection coordinate, determining the cross section profile of the part model.
[0108] Optionally, the above determining a projection coordinate of each point cloud data in the second point cloud set projected onto the cross section according to the second point cloud set, the point and the second normal vector comprises:
[0109] According to the second point cloud set, the point and the second normal vector, determining a projection coordinate of each point cloud data in the second point cloud set projected onto the cross section through a fifth formula, wherein the fifth formula is:
[0110]
[0111] d = -(n.x*x l +n.y*y l +n.z*z l );
[0112] Wherein, (x p ,y p ,z p ) represents the projection coordinate corresponding to the i-th point cloud data, (x l ,y l ,z l ) represents the point, N Π =(n.x, n.y, n.z) represents the second normal vector, (x i ,y i ,z i ) represents the i-th point cloud data in the first point cloud set.
[0113] Optionally, if the results of some projection coordinates are the same when projecting the point cloud data in the second point cloud set through the fifth formula, the same projection coordinates can be removed to obtain a more accurate cross section profile of the part model.
[0114] Optionally, since the spatial data of the entire part model profile cannot be obtained through a single cross section, a kind of cross section extraction and measurement method based on point cloud slicing can be repeated to obtain multiple cross section profiles of the part model, and then the spatial data of the multiple cross section profiles can be combined to obtain the spatial data of the entire part model profile.
[0115] As Figure 4As shown, the cross section extraction and measurement system based on point cloud slices according to an embodiment of the application comprises:
[0116] The first point cloud set acquisition module 201 is configured to acquire a first point cloud set corresponding to the part model, the first point cloud set being a set of point cloud data obtained by three-dimensional reconstruction of the part model;
[0117] The reference surface acquisition module 202 is configured to determine a reference surface according to the first point cloud set, the reference surface being a plane formed by point cloud data in the first point cloud set located on the same plane;
[0118] The perpendicular cross section acquisition module 203 is configured to determine a perpendicular cross section according to the reference surface, the perpendicular cross section being a plane perpendicular to the reference surface;
[0119] The second point cloud set acquisition module 204 is configured to determine target point cloud data in the first point cloud set according to the perpendicular cross section and the first point cloud set, and determine a second point cloud set according to each target point cloud data, the target point cloud data being point cloud data having a distance to the perpendicular cross section within a preset range;
[0120] The cross section contour acquisition module 205 is configured to determine a cross section contour of the part model according to the second point cloud set.
[0121] Optionally, the system further comprises:
[0122] The first acquisition module is configured to acquire a straight line on the reference surface and a first normal vector corresponding to the reference surface according to the reference surface;
[0123] The second acquisition module is configured to determine a direction vector corresponding to the straight line and a point on the straight line according to the straight line.
[0124] The third acquisition module is configured to determine a second normal vector corresponding to the perpendicular cross section according to the first normal vector and the direction vector;
[0125] The perpendicular cross section acquisition module 203 is further configured to:
[0126] determine the perpendicular cross section according to the point and the second normal vector.
[0127] Optionally, the third acquisition module is further configured to:
[0128] determine the second normal vector corresponding to the perpendicular cross section according to the first normal vector and the direction vector through a first formula, wherein the first formula is:
[0129] N Π =N Γ ×N l
[0130] =(n y *l-n z *n,nz *mn x *l,n x *nn y *m)
[0131] = (nx, ny, nz);
[0132] Where, N Π Represents the second normal vector N Π = (nx, ny, nz), N Γ Let N represent the first normal vector, and N = 1. Γ =(n x n y n z ), N l N represents the direction vector, and N l = (m,n,l).
[0133] Optionally, the vertical section acquisition module 203 is also used for:
[0134] Based on the point and the second normal vector, the perpendicular tangent is determined using the second formula, which is:
[0135] nx(xx l )+ny(yy l )+nz(zz l ) = 0;
[0136] The second formula represents the perpendicular tangent, (x) l y l , z l ) represents a point, N Π = (nx, ny, nz) represents the second normal vector.
[0137] Optionally, the cloud acquisition module 204 mentioned in the second point above also includes:
[0138] The target point cloud data acquisition module is used to determine the target point cloud data in the first point cloud set based on the vertical cross-section and the first point cloud set, using a third formula, whereby:
[0139]
[0140] Where a, b, c, and d represent the planar parameters of the perpendicular tangent plane, (x i ,y i ,z i ) represents the i-th point cloud data in the first point cloud set, Ψ + Ψ represents the set of target point cloud data located in the first preset direction of the vertical sectional plane within the first point cloud set. -dis represents distances from each point cloud data in the first point cloud set to the vertical section, and represents a preset range;
[0141] The fourth acquisition module is configured to determine the second point cloud set according to each target point cloud data by using a fourth formula, wherein the fourth formula is:
[0142] Ψ = Ψ + + Ψ - .
[0143] Ψ represents the second point cloud set.
[0144] Optionally, the system further comprises:
[0145] The projection coordinate acquisition module is configured to determine, according to the second point cloud set, a projection coordinate of each point cloud data in the second point cloud set on the section.
[0146] The section contour acquisition module 205 is further configured to:
[0147] determine a section contour of the part model according to each projection coordinate.
[0148] Optionally, the projection coordinate acquisition module is further configured to:
[0149] determine, according to the second point cloud set, the point and the second normal vector, a projection coordinate of each point cloud data in the second point cloud set on the section by using a fifth formula, wherein the fifth formula is:
[0150]
[0151] d = -(n.x*x l +n.y*+y l +n.z*z l ).
[0152] wherein (x p ,y p ,z p ) represents the projection coordinate corresponding to the i th point cloud data, (x l ,y l ,z l ) represents the point, N Π =(n.x,n.y,n.z) represents the second normal vector, and (x i ,y i ,z i ) represents the i th point cloud data in the first point cloud set.
[0153] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this disclosure can be embodied in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the invention can also be implemented as a computer program product contained in one or more computer-readable media, which contains computer-readable program code. Computer-readable storage media can be, for example, but not limited to—electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof.
[0154] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0155] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for cross-section extraction and measurement based on point cloud slices, characterized in that, The method comprises the following steps: Obtaining a first point cloud set corresponding to a part model, the first point cloud set being a set of point cloud data obtained by three-dimensional reconstruction of the part model; Determining a reference surface according to the first point cloud set, the reference surface being a plane formed by point cloud data in the first point cloud set located on the same plane; Determining a vertical section according to the reference surface, the vertical section being a plane perpendicular to the reference surface; Determining target point cloud data in the first point cloud set according to the vertical section and the first point cloud set, and determining a second point cloud set according to the target point cloud data, the target point cloud data being point cloud data in the first point cloud set having a distance to the vertical section within a preset range; Determining a cross-sectional profile of the part model according to the second point cloud set; Further comprising: Obtaining a straight line on the reference surface and a first normal vector corresponding to the reference surface according to the reference surface; Determining a direction vector corresponding to the straight line and a point on the straight line according to the straight line; Determining a second normal vector corresponding to the vertical section according to the first normal vector and the direction vector; The determining of the vertical section according to the reference surface comprises: Determining the vertical section according to the point and the second normal vector; The determining of the second normal vector corresponding to the vertical section according to the first normal vector and the direction vector comprises: Determining the second normal vector corresponding to the vertical section according to the first normal vector and the direction vector through a first formula, wherein the first formula is: ; wherein denotes a second normal vector , denotes a first normal vector, and , denotes a direction vector, and ; The determining of the vertical section according to the point and the second normal vector comprises: Determining the vertical section according to the point and the second normal vector through a second formula, wherein the second formula is: ; wherein the second equation represents a normal section, denotes a point, denotes a second normal vector.
2. The method of claim 1, wherein, The determining of the target point cloud data in the first point cloud set according to the vertical section and the first point cloud set, and the determining of the second point cloud set according to each target point cloud data comprise: Determining the target point cloud data in the first point cloud set according to the vertical section and the first point cloud set through a third formula, wherein the third formula is: ; wherein a, b, c, d represent plane parameters of the vertical tangent plane, represents the i-th point cloud data in the first point cloud set, represents a set of target point cloud data in the first point cloud set located in the first preset direction of the vertical tangent plane, represents a set of target point cloud data in the first point cloud set located in the second preset direction of the vertical tangent plane, and dis represents the distance of each point cloud data in the first point cloud set to the vertical tangent plane, , represents a preset range. The determining of the second point cloud set according to each target point cloud data comprises: Determining the second point cloud set according to each target point cloud data through a fourth formula, wherein the fourth formula is: ; wherein denotes a second point cloud set.
3. The method according to any of claims 1-2, characterized in that, Further comprising: Determining projection coordinates of each point cloud data in the second point cloud set projected onto the cross section according to the second point cloud set; The determining of the cross-sectional profile of the part model according to the second point cloud set comprises: Determining the cross-sectional profile of the part model according to each projection coordinate.
4. The method of claim 3, wherein, The determining of the projection coordinates of each point cloud data in the second point cloud set projected onto the cross section according to the second point cloud set, the point and the second normal vector comprises: Determining the projection coordinates of each point cloud data in the second point cloud set projected onto the cross section according to the second point cloud set, the point and the second normal vector through a fifth formula, wherein the fifth formula is: ; wherein, denotes a projection coordinate corresponding to the i-th point cloud data, denotes a point, denotes a second normal vector, denotes the i-th point cloud data in the first point cloud set.
5. A cross-section extraction and measurement system based on point cloud slices, characterized in that, Comprising: The first point cloud set acquisition module is configured to acquire a first point cloud set corresponding to the part model, the first point cloud set being a set of point cloud data obtained by three-dimensional reconstruction of the part model; The reference surface acquisition module is configured to determine a reference surface according to the first point cloud set, the reference surface being a plane formed by point cloud data in the first point cloud set located on the same plane; The perpendicular section acquisition module is configured to determine a perpendicular section according to the reference surface, the perpendicular section being a plane perpendicular to the reference surface; The second point cloud set acquisition module is configured to determine target point cloud data in the first point cloud set according to the perpendicular section and the first point cloud set, and determine a second point cloud set according to each target point cloud data, the target point cloud data being the point cloud data having a distance to the perpendicular section within a preset range; The cross-sectional profile acquisition module is configured to determine a cross-sectional profile of the part model according to the second point cloud set; Further comprising: The first acquisition module is configured to acquire a straight line on the reference surface and a first normal vector corresponding to the reference surface according to the reference surface; The second acquisition module is configured to determine a direction vector corresponding to the straight line and a point on the straight line according to the straight line; The third acquisition module is configured to determine a second normal vector corresponding to the perpendicular section according to the first normal vector and the direction vector; The perpendicular section acquisition module is further configured to: Determine the perpendicular section according to the point and the second normal vector; The third acquisition module is further configured to: Determine the second normal vector corresponding to the perpendicular section according to the first normal vector and the direction vector through a first formula, wherein the first formula is: ; wherein denotes a second normal vector , denotes a first normal vector, and , denotes a direction vector, and ; The perpendicular section acquisition module is further configured to: Determine the perpendicular section according to the point and the second normal vector through a second formula, wherein the second formula is: ; wherein the second equation represents a normal section, denotes a point, denotes a second normal vector.
6. An electronic device comprising a memory, a processor, and a program stored on the memory and running on the processor, characterized in that, The processor implements the steps of the point cloud slicing-based cross section extraction and measurement method according to any one of claims 1 to 4 when executing the program.
7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores instructions, and when the instructions run on the terminal device, the terminal device executes the steps of the point cloud slicing-based cross section extraction and measurement method according to any one of claims 1 to 4.
Citation Information
Patent Citations
3D point cloud-based characteristic face construction method and device
CN105184855A
Point cloud multi-contour generation method, device and system
CN111179297A