Method and device for constructing three-dimensional model of pointed rail
By acquiring multi-angle measured point clouds on the pointed rails and registering and reconstruction, the problems of low measurement efficiency and insufficient accuracy in the construction of the pointed rail three-dimensional model are solved, and more accurate measurement of the pointed rail dimensions are achieved.
Patent Information
- Application Number
- CN202311489699.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-09
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2043-11-09
AI Technical Summary
The existing three-dimensional model construction method of pointed rail is inefficient in measurement and depends on the accuracy of model data, resulting in inaccurate dimensional measurement.
By obtaining the measured point cloud of the pointed rail at multiple preset angles, performing two registrations (coarse registration and precise registration), and then using the target point cloud for three-dimensional reconstruction, the three-dimensional model of the pointed rail is constructed.
The accuracy of the three-dimensional model of the pointed rail is improved, thereby improving the accuracy of the pointed rail dimension measurement and ensuring the comprehensiveness and accuracy of the model data.
Smart Images

Figure CN117392325B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of point cloud image processing, and in particular to a method and device for constructing a three-dimensional model of a pointed rail. Background Art
[0002] After the production and processing of the point rail, it is usually necessary to measure its size. At present, the three-dimensional model of the point rail is usually constructed by workers using a vernier caliper to measure the actual object, which has low measurement efficiency. To this end, in the related technology, the model data of the point rail, such as the image of the point rail, can be obtained to measure the point rail based on the model data of the point rail to obtain the size of the point rail. However, this method relies on the accuracy of the acquired model data of the point rail. Therefore, how to improve the accuracy of the acquired model data of the point rail to improve the accuracy of the subsequent measurement of the size of the point rail is a problem that needs to be solved urgently. Summary of the invention
[0003] The present application aims to solve at least one of the technical problems existing in the related art. To this end, the present application proposes a method for constructing a three-dimensional model of a point rail, which can improve the accuracy of the acquired model data of the point rail.
[0004] The present application also proposes a device for constructing a three-dimensional model of a pointed rail.
[0005] The application also provides an electronic device.
[0006] The present application also proposes a computer-readable storage medium.
[0007] A method for constructing a three-dimensional model of a pointed rail according to an embodiment of the first aspect of the present application includes:
[0008] Obtain the measured point cloud of the point rail at each preset angle;
[0009] According to the standard point cloud corresponding to the pointed rail, any of the measured point clouds is registered twice to obtain a target point cloud;
[0010] Performing three-dimensional reconstruction according to each of the target point clouds to obtain a three-dimensional model of the pointed rail;
[0011] The two registrations include coarse registration and fine registration of the measured point cloud.
[0012] The method for constructing a three-dimensional model of the pointed rail provided in the embodiment of the present application obtains the measured point clouds of the pointed rail at various preset angles, and aligns any measured point cloud twice according to the standard point cloud corresponding to the pointed rail. After obtaining the target point cloud, each target point cloud is used for three-dimensional reconstruction to obtain the three-dimensional model of the pointed rail. Point clouds at different angles are taken into account when constructing the model of the pointed rail, so that the point cloud data used to construct the three-dimensional model of the pointed rail is more comprehensive, and the measured point cloud is aligned twice by the standard point cloud corresponding to the pointed rail, so that the point cloud data used to construct the three-dimensional model of the pointed rail is more accurate, so that the obtained three-dimensional model of the pointed rail can be made more precise, thereby improving the accuracy of subsequent measurement of the size of the pointed rail using the model of the pointed rail.
[0013] According to one embodiment of the present application, obtaining the measured point cloud of the point rail at each preset angle includes:
[0014] Obtain the original point cloud of the point rail at each preset angle;
[0015] The original point cloud is simplified to obtain the measured point cloud.
[0016] According to an embodiment of the present application, performing point cloud simplification on the original point cloud to obtain the measured point cloud includes:
[0017] According to any scan line, acquiring data of each point located on the scan line from the original point cloud;
[0018] According to the order of each point data on the scan line, each point data is simplified, and each simplification process obtains the current angle corresponding to the current point data, and obtains the current distance between the vector formed by the current point data and the first point data and the second point data, so that when the current angle is greater than a preset angle and the current distance is greater than a preset distance, the first point data is iterated as the current point data to perform the next simplification process, and when the current angle is not greater than the preset angle or the current distance is not greater than the current distance, the first point data is deleted, and then the second point data is iterated as the first point data to perform the next simplification process, until the simplification process of each point data is completed;
[0019] The first point data is the next point data of the current point data, and the second point data is the next point data of the first point data;
[0020] The current angle corresponding to the current point data is determined according to a vector between the current point data and the first point data, and a vector between the first point data and the second point data.
[0021] According to one embodiment of the present application, according to the standard point cloud corresponding to the point rail, any of the measured point clouds is registered twice to obtain a target point cloud, including:
[0022] Roughly aligning the measured point cloud with the standard point cloud to obtain an adjusted measured point cloud;
[0023] The adjusted measured point cloud is precisely aligned with the standard point cloud to obtain the target point cloud.
[0024] According to one embodiment of the present application, the coarse registration is performed using a 4PCS coarse registration algorithm; and the fine registration is performed using a LM-I CP fine registration algorithm.
[0025] According to an embodiment of the present application, three-dimensional reconstruction is performed according to each of the target point clouds to obtain a three-dimensional model of the point rail, including:
[0026] According to the greedy projection algorithm, each target point cloud is three-dimensionally reconstructed to obtain a three-dimensional model of the pointed rail.
[0027] According to an embodiment of the present application, three-dimensional reconstruction is performed according to each of the target point clouds to obtain a three-dimensional model of the point rail, including:
[0028] Obtain any target point from the target point cloud;
[0029] Determine, according to the normal information of the target point cloud, a plane projection of a domain composed of data of each point within a domain radius of the target point on a tangent plane of the target point;
[0030] According to the plane projection, projecting each of the point data in the field onto the same plane to obtain a projection area;
[0031] According to the greedy projection algorithm, three-dimensional reconstruction is performed on each of the projection areas to obtain a three-dimensional model of the pointed rail.
[0032] A three-dimensional model construction device for a pointed rail according to an embodiment of the second aspect of the present application includes:
[0033] A data acquisition module is used to obtain the measured point cloud of the switch rail at each preset angle;
[0034] A data adjustment module, used for performing two registrations on any of the measured point clouds according to the standard point cloud corresponding to the pointed rail to obtain a target point cloud;
[0035] A model building module, used for performing three-dimensional reconstruction according to each of the target point clouds to obtain a three-dimensional model of the pointed rail;
[0036] The two registrations include coarse registration and fine registration of the measured point cloud.
[0037] According to an electronic device of an embodiment of the third aspect of the present application, the electronic device includes a processor and a memory storing a computer program, and when the processor executes the computer program, the method for constructing a three-dimensional model of a pointed rail described in any of the above embodiments is implemented.
[0038] According to the computer-readable storage medium of the fourth aspect of the present application, a computer program is stored thereon, and when the computer program is executed by a processor, the method for constructing a three-dimensional model of a pointed rail described in any of the above embodiments is implemented.
[0039] According to the computer program product of the fifth aspect of the present application, the computer program product includes: when the computer program is executed by a processor, the method for constructing a three-dimensional model of a pointed rail as described in any of the above embodiments is implemented.
[0040] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:
[0041] By obtaining the measured point clouds of the sharp rail at various preset angles, and performing two registrations on any measured point cloud according to the standard point cloud corresponding to the sharp rail, after obtaining the target point cloud, each target point cloud is used for three-dimensional reconstruction to obtain a three-dimensional model of the sharp rail, so that point clouds at different angles are considered when constructing the model of the sharp rail, so that the point cloud data used to construct the three-dimensional model of the sharp rail is more comprehensive, and the measured point cloud is registered twice by the standard point cloud corresponding to the sharp rail, so that the point cloud data used to construct the three-dimensional model of the sharp rail is more accurate, so that the obtained three-dimensional model of the sharp rail can be made more precise, thereby improving the accuracy of subsequent measurement of the size of the sharp rail using the model of the sharp rail. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are 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.
[0043] Figure 1 It is a first flow chart of the method for constructing a three-dimensional model of a pointed rail provided in an embodiment of the present application;
[0044] Figure 2 It is a second flow diagram of the method for constructing a three-dimensional model of a pointed rail provided in an embodiment of the present application;
[0045] Figure 3 It is a schematic diagram of the projection principle provided by an embodiment of the present application;
[0046] Figure 4is a schematic diagram of a three-dimensional model of a constructed point rail provided in an embodiment of the present application;
[0047] Figure 5 It is a structural schematic diagram of a three-dimensional model building device of a pointed rail provided in an embodiment of the present application;
[0048] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] Below, the three-dimensional model construction method and device of the pointed rail provided in the embodiments of the present application will be introduced and explained in detail through several specific embodiments.
[0051] In one embodiment, a method for constructing a three-dimensional model of a pointed rail is provided, and the method is applied to a server to construct a three-dimensional model of the pointed rail. The server may be an independent server or a server cluster composed of multiple servers, or 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 sampling point devices.
[0052] like Figure 1 As shown, the method for constructing a three-dimensional model of a pointed rail provided in this embodiment includes:
[0053] Step 101, obtaining the measured point cloud of the switch rail at each preset angle;
[0054] Step 102, performing two registrations on any of the measured point clouds according to the standard point cloud corresponding to the point rail to obtain a target point cloud;
[0055] Step 103, performing three-dimensional reconstruction according to each of the target point clouds to obtain a three-dimensional model of the point rail;
[0056] The two registrations include coarse registration and fine registration of the measured point cloud.
[0057] In some embodiments, the server may use a laser sensor to obtain the original point cloud of the pointed rail at multiple preset angles in advance along the length direction of the pointed rail. The original point cloud is the measured point cloud measured by the laser sensor. Among them, laser sensor is the abbreviation of laser detection and ranging system, which is the product of the combination of laser technology and radar technology. Laser sensor is a radar system that works in the infrared to ultraviolet spectrum, and its principle and structure are very similar to those of a laser rangefinder. The function of the laser sensor is to accurately measure the target position (distance and angle), motion state (speed, vibration and posture) and shape, detect, identify, distinguish and track the target. Each preset angle can be set according to the actual situation, such as 15°, 30° or 45°. In this way, each original point cloud corresponding to each preset angle can be obtained.
[0058] After obtaining the original point cloud, the original point cloud can be directly processed as the measured point cloud. In order to improve the accuracy of the subsequently constructed 3D model, the original point cloud can also be pre-processed by smoothing and denoising, so that the pre-processed original point cloud can be used as the measured point cloud. For example, for any original point cloud, the curve inspection method and / or Gaussian filtering can be used to denoise and smooth the original point cloud to remove outliers and mixed early points in the original point cloud, so as to obtain the measured point cloud.
[0059] After all the measured point clouds of the point rail are obtained, for any measured point cloud, the measured point cloud can be coarsely and finely registered with the standard point cloud of the point rail, so as to obtain the target point cloud by performing two registrations on the measured point cloud using the standard point cloud. The standard point cloud is a theoretical point cloud constructed in advance based on the point rail.
[0060] After all measured point clouds are roughly and precisely registered with the standard point clouds, target point clouds corresponding to each measured point cloud can be obtained. After each target point cloud is obtained, each target point cloud can be used to reconstruct the surface of the point rail, thereby obtaining a three-dimensional model of the point rail.
[0061] By obtaining the measured point clouds of the sharp rail at various preset angles, and performing two registrations on any measured point cloud according to the standard point cloud corresponding to the sharp rail, after obtaining the target point cloud, each target point cloud is used for three-dimensional reconstruction to obtain a three-dimensional model of the sharp rail, so that point clouds at different angles are considered when constructing the model of the sharp rail, so that the point cloud data used to construct the three-dimensional model of the sharp rail is more comprehensive, and the measured point cloud is registered twice by the standard point cloud corresponding to the sharp rail, so that the point cloud data used to construct the three-dimensional model of the sharp rail is more accurate, so that the obtained three-dimensional model of the sharp rail can be made more precise, thereby improving the accuracy of subsequent measurement of the size of the sharp rail using the model of the sharp rail.
[0062] In order to improve the efficiency of constructing the three-dimensional model of the point rail, in some embodiments, obtaining the measured point cloud of the point rail at each preset angle includes:
[0063] Obtain the original point cloud of the point rail at each preset angle;
[0064] The original point cloud is simplified to obtain the measured point cloud.
[0065] In some embodiments, after obtaining the original point cloud of the pointed rail at each preset angle, the curve inspection method can be used to remove the discrete noise points of the original point cloud, and then the Gaussian filter can be used to restore the mixed noise points in the original point cloud to the correct position, and then the denoised original point cloud can be simplified, such as using random sampling or maximum allowable deviation method, to simplify the original point cloud to obtain the measured point cloud. In this way, the amount of data that needs to be processed later can be reduced, thereby improving the efficiency of model construction of the pointed rail.
[0066] In order to improve the efficiency of constructing the three-dimensional model of the point rail and the accuracy of the constructed three-dimensional model, in some embodiments, the original point cloud is simplified to obtain the measured point cloud, including:
[0067] According to any scan line, acquiring data of each point located on the scan line from the original point cloud;
[0068] According to the order of each point data on the scan line, each point data is simplified, and each simplification process obtains the current angle corresponding to the current point data, and obtains the current distance between the vector formed by the current point data and the first point data and the second point data, so that when the current angle is greater than a preset angle and the current distance is greater than a preset distance, the first point data is iterated as the current point data to perform the next simplification process, and when the current angle is not greater than the preset angle or the current distance is not greater than the current distance, the first point data is deleted, and then the second point data is iterated as the first point data to perform the next simplification process, until the simplification process of each point data is completed;
[0069] The first point data is the next point data of the current point data, and the second point data is the next point data of the first point data;
[0070] The current angle corresponding to the current point data is determined according to a vector between the current point data and the first point data, and a vector between the first point data and the second point data.
[0071] In some embodiments, after denoising each original point cloud, multiple scan lines may be set based on the outline of the original point cloud, each scan line includes multiple point data, and the two ends of the scan line are point data on the boundary of the original point cloud. For any scan line, the point cloud data may be streamlined according to the order of the point data on the scan line, from left to right, from right to left, from top to bottom, or from bottom to top.
[0072] For example, the server may set a preset angle θ according to actual conditions. T and preset distance d T . Assuming that the point data on a scan line needs to be simplified, from left to right, the first point P1 on the scan line can be used as the current point data, P1 and the second point P2 after P1 can be connected, and the second point P2 is the first point data. At the same time, P2 and the third point P3 can be connected, and the third point P3 is the second point data. Then, according to the vector of P1 and P2 and the vectors of P2 and P3 The angle between the two vectors can be obtained as the current angle corresponding to the current point data P1 And the second point data P3 to The current distance d2, After obtaining the current angle θ2 and the current distance d2, if θ2>θ T And d2>d T , it means that P2 is a reserved point. In this case, P2 is retained and P2 is iterated as the current point data, and the above process continues. T or d2≤d T , it means that P2 is the removal point. In this case, P2 is deleted, and then P3 is iterated as the first point data. At this time, P1 is still the current point data, P3 is the first point data, and the next point data of P3, P4, is the second point data. In this way, when the next simplification process is performed, P1 and P3 are connected, and P3 and P4 are connected at the same time to calculate the vector and The current angle θ3 and P4 to The distance d3 is used to determine whether P3 is a reserved point, and so on. In this way, after completing the simplified processing of the point data of all scan lines of the original point cloud, the corresponding measured point cloud can be obtained.
[0073] Through the above method, the data of each point in the obtained measured point cloud can meet the allowable error value, thereby improving the efficiency of constructing the three-dimensional model of the pointed rail and improving the accuracy of the constructed three-dimensional model.
[0074] After obtaining each measured point cloud, the standard point cloud corresponding to the pointed rail can be used to perform a second registration on each measured point cloud, thereby obtaining each target point cloud corresponding to each measured point cloud one by one. In order to improve the efficiency and accuracy of acquiring the target point cloud, in some embodiments, when performing a second registration of the measured point cloud with the standard point cloud of the pointed rail, a sequential registration method can be adopted. Specifically, the measured point cloud and the standard point cloud can be coarsely registered first to obtain an adjusted measured point cloud, and then the adjusted measured point cloud and the standard point cloud can be finely registered to obtain the target point cloud. Among them, the coarse registration can be performed using the 4PCS coarse registration algorithm; the fine registration is performed using the LM-ICP fine registration algorithm.
[0075] For example, after obtaining the measured point cloud, 4 points can be selected in the measured point cloud P according to the principle of coplanarity and non-collinearity to form a coplanar 4-point basis B, and a 4-point subset approximately congruent with the 4-point basis B can be extracted from the standard point cloud Q. Then, two affine invariants r1 and r2 of the selected point basis B in this plane are calculated, namely:
[0076] r1=||ae|| / ||ab||, r2=||ce|| / ||cd||.
[0077] After obtaining the two affine invariants r1 and r2, we can determine the number of points in O(n 2 +k) time, all point sets that are close to the point basis B can be extracted from the standard point cloud Q. Finally, the optimal transformation matrix in the sense of least squares is calculated through the 4 point sets B and the remaining subsets in the standard point cloud Q, and the optimal transformation matrix is applied to the measured point cloud P to achieve rough registration of the measured point cloud.
[0078] After completing the rough alignment of the measured point cloud, the LM-ICP method can be used to accurately align the point cloud. Specifically, an initial transformation matrix is selected as the initial alignment state of the measured point cloud and the standard point cloud, and then for each point in the measured point cloud, its nearest neighbor point is found in the standard point cloud to associate each point in the measured point cloud with the nearest leading point in the target point cloud. Then, the rigid transformation matrix is calculated using the associated point pairs, such as using SVD or singular value decomposition. After calculating the rigid transformation matrix, it can be determined whether the calculation result meets the convergence condition. If not, each point in the measured point cloud is re-associated with the nearest leading point in the target point cloud until the convergence condition is met, indicating that the precise alignment is completed.
[0079] For example, given an initial value x o , set the parameter λ and the iteration termination parameter δ, and calculate For the kth iteration, solve the current Jacobian matrix J i (xk ) and error f i (x k ), substitute it into (J i (x k ) T J i (x k )+λI)Δx k =-J i (x k ) T f i (x k ) Solve for Δx k If F(x k +Δx k ) <F(x k ), and ||Δx k ||<δ, then stop the iteration and output the precise registration result. Otherwise, let x k+1 =x k +Δx k , reduce λ, and solve the incremental equation again; if F(x k +Δx k )>F(x k ), then increase λ and let x k+1 =x k +Δx k , and solve the increment equation again.
[0080] The measured point cloud is roughly registered with the standard point cloud through the 4PCS coarse registration algorithm, and then the measured point cloud after coarse registration is finely registered with the standard point cloud through the LM-ICP fine registration algorithm to obtain the target point cloud, thereby making the obtained target point cloud more accurate, thereby improving the accuracy of the three-dimensional model of the pointed rail constructed subsequently using the target point cloud.
[0081] After obtaining each target point cloud, the three-dimensional reconstruction of the point rail can be performed using each target point cloud to obtain a three-dimensional model of the point rail. In order to further improve the accuracy of the acquired three-dimensional model, in some embodiments, the three-dimensional reconstruction is performed based on each target point cloud to obtain the three-dimensional model of the point rail, including:
[0082] According to the greedy projection algorithm, each target point cloud is three-dimensionally reconstructed to obtain a three-dimensional model of the pointed rail.
[0083] In some embodiments, after obtaining each target point cloud, a greedy projection algorithm can be used to triangulate the projection points of the target point cloud, and then the topological relationship established on the projection plane is mapped back to the space, and the cycle is repeated continuously to eventually complete the construction of the three-dimensional model of the pointed rail.
[0084] Specifically, Figure 2As shown, three-dimensional reconstruction is performed according to each of the target point clouds to obtain a three-dimensional model of the pointed rail, including:
[0085] Step 201, obtaining any target point from the target point cloud;
[0086] Step 202, determining, based on the normal information of the target point cloud, a plane projection of a domain consisting of point data within a preset radius of the target point on a tangent plane of the target point;
[0087] Step 203, projecting each of the point data in the field onto the same plane according to the plane projection to obtain a projection area;
[0088] Step 204 , performing three-dimensional reconstruction on each of the projection areas according to a greedy projection algorithm to obtain a three-dimensional model of the pointed rail.
[0089] In some embodiments, the server is pre-set with a neighborhood radius r. After obtaining the target point cloud, any point data can be selected from the target point cloud as the target point. After determining the target point, the KD tree structure can be used to select k point data within the neighborhood radius r from the target point from the target point cloud as neighboring points, so that the domain is formed by these k neighboring points.
[0090] After determining the domain, the normal information of the target point cloud is used to project the domain onto a plane that is approximately tangent to the surface formed by the neighborhood. The projection of any point in the neighborhood onto the tangent plane of the target point can be obtained. By projecting the domain of the target point, the K neighboring points in the domain are projected onto the tangent plane of the target point, so that the plane projection of the domain on the tangent plane can be obtained. After obtaining the plane projection of the domain on the tangent plane, the greedy projection algorithm is used to triangulate the projection points of each neighboring point in the plane projection, and then the topological relationship established on the projection plane is mapped back to space. The cycle is repeated continuously, and finally the reconstruction of the curved surface of the pointed rail can be completed. Among them, when all the topological relationships of a point in the point cloud are determined by the triangulation method, the point is defined as a completed state. If a point is missing some triangles due to setting parameters such as the maximum allowable angle of the triangle, the point is defined as a boundary point. The principle is as follows Figure 3 In this way, after processing each target point cloud, the triangular mesh model of the point rail can be obtained, thereby obtaining the three-dimensional model of the point rail, as shown in Figure 4 shown.
[0091] By reconstructing each target point cloud in the above manner, the point cloud data finally obtained can be made more accurate, thereby further improving the accuracy of the three-dimensional model of the pointed rail.
[0092] The three-dimensional model construction device of the pointed rail provided in the present application is described below. The three-dimensional model construction device of the pointed rail described below and the three-dimensional model construction method of the pointed rail described above can be referenced to each other.
[0093] In one embodiment, if Figure 5 As shown, a three-dimensional model construction device of a pointed rail is provided, comprising:
[0094] The data acquisition module 210 is used to obtain the measured point cloud of the point rail at each preset angle;
[0095] A data adjustment module 220 is used to perform two registrations on any of the measured point clouds according to the standard point cloud corresponding to the point rail to obtain a target point cloud;
[0096] A model building module 230 is used to perform three-dimensional reconstruction according to each of the target point clouds to obtain a three-dimensional model of the point rail;
[0097] The two registrations include coarse registration and fine registration of the measured point cloud.
[0098] By obtaining the measured point clouds of the sharp rail at various preset angles, and performing two registrations on any measured point cloud according to the standard point cloud corresponding to the sharp rail, after obtaining the target point cloud, each target point cloud is used for three-dimensional reconstruction to obtain a three-dimensional model of the sharp rail, so that point clouds at different angles are considered when constructing the model of the sharp rail, so that the point cloud data used to construct the three-dimensional model of the sharp rail is more comprehensive, and the measured point cloud is registered twice by the standard point cloud corresponding to the sharp rail, so that the point cloud data used to construct the three-dimensional model of the sharp rail is more accurate, so that the obtained three-dimensional model of the sharp rail can be made more precise, thereby improving the accuracy of subsequent measurement of the size of the sharp rail using the model of the sharp rail.
[0099] In one embodiment, the data acquisition module 210 is specifically used for:
[0100] Obtain the original point cloud of the point rail at each preset angle;
[0101] The original point cloud is simplified to obtain the measured point cloud.
[0102] In one embodiment, the data acquisition module 210 is specifically used for:
[0103] According to any scan line, acquiring data of each point located on the scan line from the original point cloud;
[0104] According to the order of each point data on the scan line, each point data is simplified, and each simplification process obtains the current angle corresponding to the current point data, and obtains the current distance between the vector formed by the current point data and the first point data and the second point data, so that when the current angle is greater than a preset angle and the current distance is greater than a preset distance, the first point data is iterated as the current point data to perform the next simplification process, and when the current angle is not greater than the preset angle or the current distance is not greater than the current distance, the first point data is deleted, and then the second point data is iterated as the first point data to perform the next simplification process, until the simplification process of each point data is completed;
[0105] The first point data is the next point data of the current point data, and the second point data is the next point data of the first point data;
[0106] The current angle corresponding to the current point data is determined according to a vector between the current point data and the first point data, and a vector between the first point data and the second point data.
[0107] In one embodiment, the data adjustment module 220 is specifically used for:
[0108] Roughly aligning the measured point cloud with the standard point cloud to obtain an adjusted measured point cloud;
[0109] The adjusted measured point cloud is precisely aligned with the standard point cloud to obtain the target point cloud.
[0110] In one embodiment, the coarse registration is performed using a 4PCS coarse registration algorithm; and the fine registration is performed using a LM-I CP fine registration algorithm.
[0111] In one embodiment, the model building module 230 is specifically used to:
[0112] According to the greedy projection algorithm, each target point cloud is three-dimensionally reconstructed to obtain a three-dimensional model of the pointed rail.
[0113] In one embodiment, the model building module 230 is specifically used to:
[0114] Obtain any target point from the target point cloud;
[0115] Determine, according to the normal information of the target point cloud, a plane projection of a domain composed of data of each point within a domain radius of the target point on a tangent plane of the target point;
[0116] According to the plane projection, projecting each of the point data in the field onto the same plane to obtain a projection area;
[0117] According to the greedy projection algorithm, three-dimensional reconstruction is performed on each of the projection areas to obtain a three-dimensional model of the pointed rail.
[0118] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call a computer program in the memory 830 to execute a method for constructing a three-dimensional model of a pointed rail, for example, including:
[0119] Obtain the measured point cloud of the point rail at each preset angle;
[0120] According to the standard point cloud corresponding to the pointed rail, any of the measured point clouds is registered twice to obtain a target point cloud;
[0121] Performing three-dimensional reconstruction according to each of the target point clouds to obtain a three-dimensional model of the pointed rail;
[0122] The two registrations include coarse registration and fine registration of the measured point cloud.
[0123] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0124] On the other hand, an embodiment of the present application further provides a processor-readable storage medium, the processor-readable storage medium storing a computer program, the computer program is used to enable the processor to execute the methods provided in the above embodiments, for example, including:
[0125] Obtain the measured point cloud of the point rail at each preset angle;
[0126] According to the standard point cloud corresponding to the pointed rail, any of the measured point clouds is registered twice to obtain a target point cloud;
[0127] Performing three-dimensional reconstruction according to each of the target point clouds to obtain a three-dimensional model of the pointed rail;
[0128] The two registrations include coarse registration and fine registration of the measured point cloud.
[0129] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drives (SSDs)), etc.
[0130] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0131] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for constructing a three-dimensional model of a pointed rail, characterized in that: include: Obtain the measured point cloud of the point rail at each preset angle; According to the standard point cloud corresponding to the pointed rail, any of the measured point clouds is registered twice to obtain a target point cloud; Performing three-dimensional reconstruction according to each of the target point clouds to obtain a three-dimensional model of the pointed rail; The two registrations include coarse registration and fine registration of the measured point cloud, and the standard point cloud is a theoretical point cloud pre-constructed according to the point track; The step of obtaining the measured point cloud of the pointed rail at each preset angle includes: Obtain the original point cloud of the point rail at each preset angle; According to any scan line, acquiring data of each point located on the scan line from the original point cloud; According to the order of each point data on the scan line, each point data is simplified, and each simplification process obtains the current angle corresponding to the current point data, and obtains the current distance between the vector formed by the current point data and the first point data and the second point data, so that when the current angle is greater than a preset angle and the current distance is greater than a preset distance, the first point data is iterated as the current point data to perform the next simplification process, and when the current angle is not greater than the preset angle or the current distance is not greater than the preset distance, the first point data is deleted, and then the second point data is iterated as the first point data to perform the next simplification process, until the simplification process of each point data is completed; The first point data is the next point data of the current point data, and the second point data is the next point data of the first point data; The current angle corresponding to the current point data is the angle between the vector between the current point data and the first point data, and the angle between the vector between the first point data and the second point data.
2. The method for constructing a three-dimensional model of a pointed rail according to claim 1, characterized in that: According to the standard point cloud corresponding to the pointed rail, any of the measured point clouds is registered twice to obtain a target point cloud, including: Roughly aligning the measured point cloud with the standard point cloud to obtain an adjusted measured point cloud; The adjusted measured point cloud is precisely aligned with the standard point cloud to obtain the target point cloud.
3. The method for constructing a three-dimensional model of a pointed rail according to claim 2, characterized in that: The coarse registration is performed using the 4PCS coarse registration algorithm; the fine registration is performed using the LM-ICP fine registration algorithm.
4. The method for constructing a three-dimensional model of a pointed rail according to claim 1, characterized in that: Performing three-dimensional reconstruction according to each of the target point clouds to obtain a three-dimensional model of the pointed rail includes: According to the greedy projection algorithm, each target point cloud is three-dimensionally reconstructed to obtain a three-dimensional model of the pointed rail.
5. The method for constructing a three-dimensional model of a pointed rail according to claim 4, characterized in that: Performing three-dimensional reconstruction according to each of the target point clouds to obtain a three-dimensional model of the pointed rail includes: Obtain any target point from the target point cloud; Determine, according to the normal information of the target point cloud, a plane projection of a domain composed of data of each point within a domain radius of the target point on a tangent plane of the target point; According to the plane projection, projecting each of the point data in the field onto the same plane to obtain a projection area; According to the greedy projection algorithm, three-dimensional reconstruction is performed on each of the projection areas to obtain a three-dimensional model of the pointed rail.
6. A device for constructing a three-dimensional model of a pointed rail, characterized in that: include: A data acquisition module is used to obtain the measured point cloud of the switch rail at each preset angle; A data adjustment module, used for performing two registrations on any of the measured point clouds according to the standard point cloud corresponding to the pointed rail to obtain a target point cloud; A model building module, used for performing three-dimensional reconstruction according to each of the target point clouds to obtain a three-dimensional model of the pointed rail; The two registrations include coarse registration and fine registration of the measured point cloud, and the standard point cloud is a theoretical point cloud pre-constructed according to the point track; The data acquisition module is specifically used for: Obtain the original point cloud of the point rail at each preset angle; According to any scan line, acquiring data of each point located on the scan line from the original point cloud; According to the order of each point data on the scan line, each point data is simplified, and each simplification process obtains the current angle corresponding to the current point data, and obtains the current distance between the vector formed by the current point data and the first point data and the second point data, so that when the current angle is greater than a preset angle and the current distance is greater than a preset distance, the first point data is iterated as the current point data to perform the next simplification process, and when the current angle is not greater than the preset angle or the current distance is not greater than the preset distance, the first point data is deleted, and then the second point data is iterated as the first point data to perform the next simplification process, until the simplification process of each point data is completed; The first point data is the next point data of the current point data, and the second point data is the next point data of the first point data; The current angle corresponding to the current point data is the angle between the vector between the current point data and the first point data, and the angle between the vector between the first point data and the second point data.
7. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the method for constructing a three-dimensional model of a pointed rail according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for constructing a three-dimensional model of a pointed rail according to any one of claims 1 to 5 is implemented.
