An automobile contour surface model construction method and system
Through the improved normal vector algorithm and curvature streamlining algorithm, the three-dimensional laser scanning point cloud data is processed, and the problem of noise interference in the automotive contour surface model is solved, efficient and accurate automotive contour reconstruction is achieved, and the accuracy and construction efficiency of the model are improved.
Patent Information
- Application Number
- CN202210509490.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-11
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-05-11
AI Technical Summary
When the prior art uses three-dimensional laser scanning to build a car profile surface model, there is severe noise interference, resulting in poor segmentation fitting effect and it is difficult to achieve efficient and accurate automotive profile reconstruction.
The improved normal vector algorithm is used to segment the point cloud data, and data downsampling is combined with the curvature streamlining algorithm. Through point cloud filtering, downsampling and fusion processing, the noise point cloud is removed, the uniform distribution of data points is improved, and the automotive outline surface model is generated using triangular mesh fitting.
It improves the accuracy and construction efficiency of the car profile surface model, effectively removes the influence of vehicle internal and environmental noise, ensures that the reconstruction surface reflects the real vehicle profile, reduces the amount of data while maintaining detailed characteristics.
Smart Images

Figure CN114863064B_ABST
Abstract
Description
Technical Field
[0001] This application is in the field of graphic image processing technology. Specifically, it relates to a method and system for reconstructing an automobile contour surface model using point cloud data obtained by three-dimensional laser scanning. Background Art
[0002] With the continuous development of the automotive industry and its related technologies, the demand for traffic condition investigation work has been continuously expanding. Traditional vehicle detection methods are not only inefficient, but also the detection content is too single, only being able to identify information such as the length, width, and height of vehicles, making it difficult to effectively identify different vehicles and unable to meet the increasing needs of people. Three-dimensional laser scanning technology can perform non-contact scanning on complex scenes to directly obtain the three-dimensional information of the target. In addition, laser measurement also has advantages such as high precision, strong penetration ability, and little influence by weather. The vehicle external shape construction method using a three-dimensional lidar as the data acquisition device changes the traditional method of storing in the database in the form of photos into a three-dimensional model, which can effectively improve the accuracy of vehicle recognition in harsh environments and play a huge role in the field of transportation.
[0003] The core of the vehicle external shape construction method based on laser point cloud is the segmentation processing of each point cloud surface of the vehicle. Through the segmented point cloud, the triangular mesh surface piecewise fitting processing is completed, and then the construction of the entire model is completed. In the specific implementation process, due to the influence of the detection environment, surrounding and internal personnel and objects of the vehicle on the original data of the scanned automobile contour point cloud, there is a lot of noise, which often leads to unsatisfactory segmentation and fitting effects. Therefore, it is necessary to improve the existing vehicle contour surface model construction method. Summary of the Invention
[0004] The purpose of this application is to solve the problems existing in the process of surface reconstruction of the automobile contour in the above-mentioned prior art, and to provide an efficient and accurate method and system for constructing an automobile contour surface model based on laser point cloud data.
[0005] One aspect of this application provides a method for constructing an automobile contour surface model, including the following steps:
[0006] S1: Preprocess the point cloud data set obtained by scanning an automobile with multiple three-dimensional lidars to obtain a preprocessed automobile contour point cloud set;
[0007] S2: Perform point cloud segmentation processing on the preprocessed automobile contour point cloud set based on an improved normal vector algorithm to obtain multiple local automobile contour point cloud sets;
[0008] S3: Perform surface fitting on each local automobile contour point cloud set to obtain the corresponding local automobile contour surface, and splice the multiple local automobile contour surfaces to obtain an automobile contour surface model.
[0009] Furthermore, step S1 specifically includes the following steps:
[0010] S11: Perform point cloud filtering on the point cloud data sets obtained by scanning the vehicle with each 3D lidar;
[0011] S12: Perform data downsampling on each filtered point cloud data set;
[0012] S13: Perform point cloud fusion on the point cloud data sets after multiple data downsamplings to obtain a vehicle contour point cloud set.
[0013] Preferably, the data downsampling is performed using a curvature reduction algorithm, and the number of data points per unit volume of the point cloud data set in different regions increases with the increase of the curvature value.
[0014] Furthermore, step S2 specifically includes the following steps:
[0015] S21: For the vehicle contour point cloud set S = {p1, p2,..., p n}, where n is the number of data points in S, randomly select a data point p i and the point set {p i , p i+1 ,..., p i+K} of its K nearest neighbors in terms of distance and fit to obtain the K-nearest neighbor plane of point p i , and determine the normal vector of the K-nearest neighbor plane of point p i as the normal vector of point p i ;
[0016] S22: Repeat step S21 until the normal vectors of all data points in S are determined;
[0017] S23: Divide the vehicle contour point cloud set S into multiple subsets: S = {U1, U2,...U j ,..., U N}, N is the number of subsets, where each subset contains multiple data points with the same or similar normal vectors;
[0018] S24: For any subset U j , randomly select m data points from the multiple data points it contains for plane fitting to obtain the first fitting plane L, and L satisfies the following plane equation:
[0019] aX + bY + cZ = d,
[0020] where (a, b, c) is the unit normal vector of L and a 2 + b 2 + c 2= 1, where d is the distance from the origin of coordinates to L.
[0021] S25: Count the number k of data points in U j whose distance from L is less than a preset first distance. Determine whether k is greater than a first threshold δ. If the determination result is false, re-execute step S24. If the determination result is true, use the current L as the current plane and execute step S26;
[0022] S26: Randomly select m data points from the k points closest to the current plane for plane fitting to obtain a second fitted plane L′, and L′ satisfies the following plane equation:
[0023] a′X + b′Y + c′Z = d′,
[0024] where (a′, b′, c′) is the unit normal vector of L′ and a′ 2 + b′ 2 + c′ 2 = 1, and d′ is the distance from the origin of coordinates to L′;
[0025] S27: Determine whether the angle between L′ and the current plane is less than a preset second threshold ε. If the determination result is false, use L′ as the new current plane and re-execute step S26. If the determination result is true, execute step S28;
[0026] S28: Filter out the data points in U j whose distance from the current plane is greater than a preset second distance to obtain the local point cloud set U′ of the vehicle contour j ;
[0027] S29: Repeat steps S24 to S28 for each subset U j until all subsets {U1, U2,...U j ,..., U N} of the vehicle contour point cloud set S are traversed, and finally obtain multiple local point cloud sets {U′1, U′2,...U′ j ,..., U′ N} of the vehicle contour.
[0028] Preferably, the following steps are further included between step S23 and step S24:
[0029] Project all the data points in U j onto a preset projection plane. If multiple aggregation areas appear in the projected data points, then further segment U j based on the multiple aggregation areas.
[0030] Preferably, the projection plane is parallel to U jThe overall normal vector, where U j The overall normal vector is based on U j and is determined by the directions of the normal vectors of the respective data points in
[0031] Further, the step S3 further includes the following steps:
[0032] S31: Project the data points included in the local point cloud set U' of the vehicle contour j onto the corresponding current plane;
[0033] S32: Perform triangulation on the projected data points to construct a triangular mesh plane;
[0034] S33: Map the triangular mesh plane back to the three-dimensional space to obtain a triangular mesh distributed in the three-dimensional space;
[0035] S34: Perform spatial surface fitting based on the triangular mesh distributed in the three-dimensional space to obtain a local surface of the vehicle contour corresponding to U' j ;
[0036] S35: For each U' j , j ∈ 1...N, repeat steps S31 to S34, splice the obtained local surfaces of the vehicle contour corresponding to each, and finally obtain a vehicle contour surface model.
[0037] On the other hand, the present application provides a vehicle contour surface model construction system, including a data acquisition unit and a data processing unit. The data acquisition unit includes a three-dimensional lidar array composed of multiple three-dimensional lidars, a ground sensor vehicle detection device, and a GPS clock;
[0038] The data processing unit includes a memory and a processor, where the memory stores a computer program, and when the program is executed by the processor, it can construct a vehicle contour surface model using the above vehicle contour surface model construction method.
[0039] Preferably, the vehicle contour surface model construction system further includes a traffic server for receiving and saving the vehicle contour surface model and identifying and detecting vehicles.
[0040] The vehicle contour surface model construction method and system provided by the embodiments of the present application at least have the following beneficial effects:
[0041] (1) The improved point cloud segmentation method based on the normal vector is used to segment the point cloud data obtained by three-dimensional laser scanning, and further, the rough fitting plane and the fine fitting model of iterative optimization are used to remove the influence of vehicle interior and environmental noise, so that the point cloud data is evenly and regularly distributed on the contour surface of the vehicle, thereby improving the accuracy of the surface model;
[0042] (2) In the case where there is redundancy in the point cloud data obtained by multiple 3D laser scanners, the curvature reduction algorithm is used to downsample the data. More data points are retained in the neighborhood of the sampling points with larger curvature, and fewer data points are retained otherwise, so as to effectively reduce the data volume while ensuring that the reconstructed surface can reflect the true vehicle contour. Description of the Drawings
[0043] Figure 1 It is a flowchart of a method for constructing an automobile contour surface model according to an embodiment of the present application;
[0044] Figure 2 It is a top view of scanning an automobile using a 3D lidar according to an embodiment of the present application;
[0045] Figure 3 It is a specific implementation process for preprocessing a point cloud data set according to an embodiment of the present application;
[0046] Figure 4 It is a specific implementation process of step S2 according to an embodiment of the present application;
[0047] Figure 5 It is a system block diagram of an automobile contour surface model construction system according to an embodiment of the present application. Detailed Description of the Preferred Embodiments
[0048] Hereinafter, the present application will be further described based on the preferred embodiments with reference to the accompanying drawings.
[0049] In addition, for the convenience of understanding, various components in the drawings are enlarged or reduced, but this is not intended to limit the protection scope of the present application.
[0050] Singular terms also include plural meanings, and vice versa.
[0051] In the description of the embodiments of the present application, it should be noted that if terms such as "upper", "lower", "inner", "outer", etc. are used to indicate the orientation or positional relationship, it is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the products in the embodiments of the present application are usually placed during use. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation to the present application. In addition, in the description of the present application, in order to distinguish different units, the first, second, etc. are used in this specification, but these are not limited by the manufacturing order and cannot be understood as indicating or implying relative importance. On the detailed description and claims of the present application, their names may be different.
[0052] The terms used in this specification are for the purpose of describing the embodiments of the present application, but are not intended to limit the present application. It should also be noted that unless otherwise clearly specified and defined, the terms "arranged", "connected", and "coupled" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, or an indirect connection through an intermediate medium, and it can be the communication inside two components. For those skilled in the art, the specific meanings of the above terms in the present application can be specifically understood.
[0053] One aspect of the embodiments of the present application provides a method for constructing an automotive contour surface model. Figure 1 As shown in the flowchart of the method for constructing an automotive contour surface model according to the embodiments of the present application, Figure 1 the method provided by the present application includes the following steps:
[0054] S1: Preprocess the set of point cloud data obtained by scanning an automobile with multiple 3D lidars to obtain a set of preprocessed automotive contour point clouds;
[0055] S2: Perform point cloud segmentation processing on the set of preprocessed automotive contour point clouds based on an improved normal vector algorithm to obtain multiple sets of local automotive contour point clouds;
[0056] S3: Perform surface fitting on each set of local automotive contour point clouds to obtain the corresponding local automotive contour surfaces, and splice the multiple local automotive contour surfaces to obtain an automotive contour surface model.
[0057] Figure 2 As shown in the top view of scanning an automobile using a 3D lidar according to a specific embodiment of the present application, Figure 2 in this embodiment, two 3D lidars (3D lidar 10, 3D lidar 20) are installed facing each other. When the vehicle detection device 30 composed of a ground sensor detection coil detects that an automobile 40 enters the scanning area, the above two 3D lidars scan the automobile at a fixed time interval, and generate a set of point cloud data representing the automotive contour according to the information of the transmitted signal and the echo signal (including transmission / reception angles, time, etc.). The two sets of point cloud data are synchronized by a GPS clock; in some other embodiments of the present application, the number of 3D lidars can also be more than two and installed around the automobile to make the scanning of the automotive contour more precise.
[0058] The following will describe steps S1 to S3 in detail with reference to the accompanying drawings and embodiments.
[0059] Step S1 is used to preprocess the set of point cloud data obtained by scanning with multiple 3D lidars to obtain the preprocessed set of automotive contour point clouds. Further, in some embodiments of the present application, step S1 specifically includes the following steps:
[0060] S11: Perform point cloud filtering on the set of point cloud data obtained by each 3D lidar scanning the vehicle;
[0061] S12: Perform data downsampling processing on each filtered set of point cloud data;
[0062] S13: Perform point cloud fusion processing on the sets of point cloud data after multiple data downsampling processes to obtain the set of automotive contour point clouds.
[0063] Figure 3 This is the implementation process of preprocessing the set of point cloud data according to a specific embodiment of the present application. As Figure 3 shown, for two sets of point cloud data obtained by scanning the vehicle with two 3D lidars (respectively designated as 3D lidar A and 3D lidar B), perform point cloud filtering processing and data downsampling processing respectively, and then perform point cloud fusion processing on the two sets of point cloud data to finally obtain the set of automotive contour point clouds.
[0064] In the point cloud data collected by the 3D lidar, in addition to the point cloud data containing the vehicle contour, there may also be noise point clouds obtained by scanning the ground, pedestrians, and other vehicles. These noise point clouds will not only affect the modeling quality, but also occupy a large amount of computer resources, reduce the speed of data processing, and cause the system performance to decline. Therefore, it is necessary to first perform point cloud filtering processing on the set of point cloud data obtained by each 3D lidar to remove various noise point clouds. Performing point cloud filtering processing on the set of point cloud data is a conventional technique known to those skilled in the art. Specifically, in some embodiments of the present application, the random sample consensus algorithm can be used to filter out the ground noise, set the ground point cloud as a plane model, and find the point cloud data that best matches the plane model and remove it.
[0065] When there is redundancy in the point cloud data obtained by scanning a vehicle, it will reduce the speed and quality of surface reconstruction. To make full use of computer memory resources and accelerate the data processing speed, it is essential to perform data downsampling on the point cloud data. At the same time, to ensure that the reconstructed surface can reflect the true vehicle contour, it is very important to consider protecting the data with obvious features during the data downsampling process of vehicle point cloud. In some preferred embodiments of the present application, the data downsampling process uses a curvature reduction algorithm, and the number of data points per unit volume of the point cloud data set in different regions increases with the increase of the curvature value, thereby ensuring that enough data points are retained in the regions with large shape change amplitudes, so that the surface generated by subsequent fitting can finely reflect the shape detail features of these regions.
[0066] Specifically, the following steps can be used to obtain the curvature corresponding to each data point in the point cloud data set. For any data point p in the point cloud i and all points in its k-neighborhood, fit its local surface according to the least squares method to obtain the surface equation:
[0067] f(x, y) = A i x 2 + B i xy + C i y 2 + D i x + E i y + F i ,
[0068] Rewrite the surface equation into parametric form:
[0069]
[0070] The partial differentials of the parametric equation are:
[0071] Respectively f x , f y , f xy , f xx , f yy ,
[0072] And the unit normal vector of the surface is:
[0073]
[0074] The first fundamental formula of the surface can be obtained:
[0075] E = f x · f x , F = f x · f y , G = f y · f y ,
[0076] and the second fundamental formula of the surface:
[0077] L = f xx ·n, M = f xy ·n, N = f yy ·n,
[0078] Using the first fundamental formula of the surface and the second fundamental formula of the surface, the Gaussian curvature and mean curvature of the local surface near point p are finally obtained:
[0079] Gaussian curvature:
[0080] Mean curvature:
[0081] After obtaining the curvatures corresponding to each data point using the above steps, data downsampling can be performed according to the magnitudes of the Gaussian curvature or mean curvature of the data points in different regions: For regions with larger curvature values, since their shape changes are relatively large, more data points are retained in their unit volume; for regions with smaller curvature values, their shapes are relatively smooth, so only fewer data points can be retained in their unit volume, thereby reducing the data volume while effectively retaining the detailed features of the car contour and improving the model construction speed.
[0082] After performing the above point cloud filtering and data downsampling processing on the point cloud data sets obtained by scanning the car with multiple 3D lidars, it is also necessary to unify the coordinates of each group of point cloud data sets from their respective coordinate systems to the same coordinate system through point cloud fusion processing. The following is illustrated through a specific embodiment. In this embodiment, two 3D lidars (respectively designated as 3D lidar A and 3D lidar B) are used to scan the car to obtain two groups of point cloud data sets, and the coordinates of each point cloud in the above two groups of point cloud data sets respectively represent its position in the respective coordinate systems of the above two 3D lidars (i.e., the first coordinate system and the second coordinate system). In this embodiment, in order to unify the above two groups of point cloud data sets to the same coordinate system, the first coordinate system of 3D lidar A can be used as the reference coordinate system, then the coordinates of each point cloud in the point cloud data set obtained by 3D lidar A remain unchanged, and only the coordinates of each point cloud in the point cloud data set obtained by 3D lidar B need to be converted from the second coordinate system to the first coordinate system.
[0083] Specifically, let [X b , Y b , Z b T be the coordinates of any point in the point cloud data set obtained by 3D lidar B in the second coordinate system, then its corresponding coordinates [X a , Ya , Z a T is determined by the following formula:
[0084]
[0085] wherein, is the rotation matrix from the first coordinate system to the second coordinate system, and [Δx, Δy, Δz] T is the relative position relationship between the origin of the first coordinate system and the origin of the second coordinate system.
[0086] Performing the above operations on all the data points in the point cloud data set obtained by the 3D lidar B can unify the coordinates of the two groups of point cloud data sets obtained by the two 3D lidars into the first coordinate system, so that the operations of subsequent steps can be uniformly performed.
[0087] The above takes two 3D lidars as an example to illustrate the specific implementation steps of point cloud fusion. Those skilled in the art can easily obtain the implementation manner for fusing the point cloud data obtained by more 3D lidars from this.
[0088] After preprocessing the point cloud data set through step S1, the preprocessed automotive contour point cloud set is subjected to point cloud segmentation processing to obtain multiple local automotive contour point cloud sets.
[0089] By performing point cloud segmentation on the automotive contour point cloud set, the data points constituting the automotive contour can be clustered according to the planes they match, thereby greatly reducing the complexity of subsequent surface fitting. At the same time, since the laser pulse can penetrate glass, during the 3D lidar scanning process, internal noise point clouds such as the driver and seats inside the vehicle will also be collected. These internal noise point clouds in the vehicle are difficult to remove using common noise filtering, which will seriously affect the quality of surface reconstruction. Therefore, it is also necessary to perform segmentation and clustering operations on the point cloud set to better remove the internal noise point clouds that are significantly different from the point clouds of the automotive contour.
[0090] This application performs point cloud segmentation processing on the preprocessed automotive contour point cloud set based on an improved normal vector algorithm. The processing idea is as follows: First, determine the normal vector of each data point in the automotive contour point cloud set, and then perform preliminary clustering on the points with the same or similar normal vectors to obtain multiple subsets corresponding to different regions. For each subset, respectively obtain its best fitting plane and filter out the data points far from this fitting plane, so as to obtain data points that better match the automotive contour, effectively improving the matching degree between the subsequent generated surface model and the actual automotive contour. Specifically, in some embodiments of this application, as Figure 4 shown, step S2 includes the following steps:
[0091] S21: For the car contour point cloud set S = {p1, p2, ..., p n}, where n is the number of data points in S, and a data point p is randomly selected i And the point set {p i , p i+1 , ..., p i+K} and fit to get point p i The K nearest neighbor plane of the point p i The normal vector of the K nearest neighbor plane is determined as point p i The normal vector of
[0092] S22: Repeat step S21 until the normal vectors of all data points in S are determined;
[0093] S23: Divide the car contour point cloud set S into multiple subsets: S = {U1, U2, ...U j , ..., U N}, N is the number of subsets, where each subset contains multiple data points with the same or similar normal vectors;
[0094] S24: For any subset U j , randomly select m data points from the multiple data points it contains to perform plane fitting to obtain the first fitting plane L, which satisfies the following plane equation:
[0095] aX+bY+cZ=d,
[0096] Where (a, b, c) is the unit normal vector of L and a 2 +b 2 +c 2 =1, d is the distance from the origin to L.
[0097] S25: Statistics U j The number k of data points whose distance from L is less than a preset first distance in the plane is determined, and whether k is greater than a first threshold value δ is determined. If the determination result is false, step S24 is executed again. If the determination result is true, L at this time is used as the current plane, and step S26 is executed.
[0098] S26: Randomly select m data points from the k points closest to the current plane to perform plane fitting to obtain a second fitting plane L′, where L′ satisfies the following plane equation:
[0099] a′X+b′Y+c′Z=d′,
[0100] Where (a′, b′, c′) is the unit normal vector of L′ and a′ 2 +b′ 2 +c′2 = 1, d' is the distance from the coordinate origin to L';
[0101] S27: Determine whether the angle between L' and the current plane is less than a preset second threshold ε. If the determination result is false, use L' as the new current plane and re - execute step S26. If the determination result is true, execute step S28;
[0102] S28: Filter out the data points in U j whose distance from the current plane is greater than a preset second distance to obtain the local point cloud set U' of the vehicle contour j ;
[0103] S29: Repeat steps S24 to S28 for each subset U j until all subsets {U1, U2,... U j ,..., U N} of the vehicle contour point cloud set S are traversed, and finally obtain multiple local point cloud sets {U'1, U'2,... U' j ,..., U' N} of the vehicle contour.
[0104] In the above - mentioned embodiment, by steps S21 to S23, the normal vectors of each data point in S are obtained and the data points in S are divided into multiple subsets with the same or similar normal vectors. Specifically, through a preset angle deviation threshold, the data points with an angle difference between the normal vectors less than the preset angle deviation threshold are determined to have similar normal vectors, and further the data points with the same or similar normal vectors are divided into the same subset U j , for each subset U j , first, through steps S24 to S25, a plane L that roughly matches the data points it contains is obtained and used as the initial value of the current plane, and then through steps S26 to S28, the current plane is further iteratively optimized, so as to obtain a plane that exactly matches U j and remove the data points in U j far from the above - mentioned plane as noise points. Finally, multiple local point cloud sets {U'1, U'2,... U' j ,..., U' N} are obtained. Through the above steps, the noise point clouds far from the vehicle contour in the vehicle contour point cloud set can be effectively removed, thereby effectively improving the accuracy of surface reconstruction.
[0105] In some preferred embodiments of the present application, between step S23 and step S24, the following steps are further included:
[0106] Filter out the data points in U jAll the data points in are projected onto a preset projection plane. If multiple clusters appear among the projected data points, based on the multiple clusters, U j is further segmented.
[0107] The following is a specific description in conjunction with Figure 2 the specific implementation of further segmenting U j as follows. Since the orientations of the contour surfaces of multiple parts on the vehicle 40 are relatively similar, for example: the roof and parts of the front hood and the rear lid are basically parallel to the ground, and both sides of the vehicle body are perpendicular to the ground and are basically parallel to each other. These contours that are obviously in different parts may be grouped into the same subset U Figure 2 through step S23. Therefore, in some preferred embodiments of the present application, by projecting all the data points in U j onto a preset projection plane, multiple clusters that are significantly clustered in the same subset U j can be distinguished and further segmented. j Specifically, in some preferred embodiments of the present application, the projection plane is parallel to the overall normal vector of U
[0108] The overall normal vector of U j is determined based on the orientations of the normal vectors of the individual data points in U j Since the individual data points in U j have the same or similar normal vectors, U j as a set of the above data points, overall shows a certain orientation, that is, has an overall normal vector. The overall normal vector can be determined based on the orientations of the normal vectors of the individual data points in U j For example, it can be determined by calculating the mean of the orientations of the normal vectors of the above individual data points, or by fitting a reference plane to all the data points in U j The normal vector of this reference plane reflects the overall orientation presented by the normal vectors of the individual data points in U j and can be used as the overall normal vector of U j j j Setting the projection plane to be parallel to the overall normal vector of U
[0109] can make the clustering characteristics of the data points in different parts more obvious, thus being more conducive to further segmenting multiple clusters: for example, for the U j where the data points of the roof and the front hood and the rear lid are located, its overall normal vector is basically perpendicular to the ground. Therefore, a plane perpendicular to the ground should be selected as the projection plane; for the two side surfaces of the vehicle body, the U j where they are located, jThe overall normal vector is parallel to the ground, and at this time, the ground can be selected as the projection plane.
[0110] After obtaining multiple sets of local point clouds of the vehicle contour {U′1, U′2,... U′ j ,..., U′ N}, through step S3, surface fitting is performed on each set of local point clouds of the vehicle contour to obtain the corresponding local surface of the vehicle contour, and then multiple local surfaces of the vehicle contour are stitched together to obtain the vehicle contour surface model. In some embodiments of the present application, step S3 further includes the following steps:
[0111] S31: Project the data points included in the set of local point clouds U′ j onto the corresponding current plane;
[0112] S32: Triangulate the projected data points to construct a triangular mesh plane;
[0113] S33: Map the triangular mesh plane back to the three-dimensional space to obtain a triangular mesh distributed in the three-dimensional space;
[0114] S34: Perform spatial surface fitting based on the triangular mesh distributed in the three-dimensional space to obtain the local surface of the vehicle contour corresponding to U′ j ;
[0115] S35: For each U′ j , j ∈ 1... N, repeat steps S31 to S34, and after obtaining the corresponding local surfaces of the vehicle contour, stitch them together to finally obtain the vehicle contour surface model.
[0116] Specifically, for any set of local point clouds U′ j of the vehicle contour, first project the data points included therein onto its corresponding current plane; then triangulate the projected data points to generate a triangular mesh plane and map it back to the three-dimensional space to obtain a triangular mesh distributed in the three-dimensional space; then perform spatial surface fitting on the triangular mesh distributed in the above three-dimensional space to obtain the local surface of the vehicle contour corresponding to U′ j .
[0117] In some embodiments of the present application, the above spatial surface fitting can be performed using the least squares method. Specifically, let the grid points of the above triangular mesh be p l (x l , y l , z l ), l = 1, 2,..., M, and its surface fitting function is:
[0118]
[0119] where a pq is the polynomial fitting coefficient, p and q are grid points. To determine the polynomial coefficient a pq , the following least-squares fitting formula is further constructed:
[0120]
[0121] If the extreme value of the objective function is to be found, only a set of numbers that make its partial derivatives with respect to each variable zero need to be determined, that is, the first-order partial derivative of F(a pq ) is zero:
[0122]
[0123] The polynomial coefficient a pq is obtained by substituting the grid point coordinates into the least-squares fitting formula, so it is unique. Based on this, the analytical formula f(x, y) of the fitting surface is obtained to achieve the least-squares surface fitting.
[0124] After obtaining the fitting surface of each U′ j , j ∈ 1...N through the above steps, the individual fitting surfaces are spliced, and finally the vehicle contour surface model can be obtained.
[0125] On the other hand, the present application provides a vehicle contour surface model construction system. As Figure 5 shown, the vehicle contour surface model construction system provided by the embodiments of the present application includes a data acquisition unit and a data processing unit:
[0126] The data acquisition unit includes a three-dimensional lidar array composed of multiple three-dimensional lidars, a ground sensor vehicle detection device, and a GPS clock;
[0127] The data processing unit includes a memory and a processor. The memory stores a computer program, and when the program is executed by the processor, it can use the above vehicle contour surface model construction method to construct a vehicle contour surface model. The specific layout method of the above data acquisition unit and the specific implementation method of the above vehicle contour surface model construction method have been described in detail and will not be elaborated here.
[0128] In some preferred embodiments of the present application, as Figure 5 shown, the vehicle contour surface model construction system also includes a traffic server for receiving and saving the vehicle contour surface model and identifying and detecting vehicles.
[0129] The above has introduced the specific implementation manners of the present application in detail. For those skilled in the art of the present technology, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A method for constructing an automotive contour surface model, characterized in that, Including the following steps: S1: Preprocess the set of point cloud data obtained by scanning an automobile with multiple 3D lidars to obtain a set of preprocessed automobile contour point clouds; S2: Perform point cloud segmentation processing on the set of preprocessed automobile contour point clouds based on an improved normal vector algorithm to obtain multiple sets of local automobile contour point clouds; S3: Perform surface fitting on each set of local automobile contour point clouds to obtain the corresponding local automobile contour surfaces, and splice the multiple local automobile contour surfaces to obtain an automobile contour surface model; The specific steps of step S2 include the following steps: S21: For the automotive contour point cloud set , where is the number of data points in, randomly select a data point and the point set of its K nearest neighbors closest to this point and fit to obtain the point 's K-nearest neighbor plane, and determine the normal vector of the K-nearest neighbor plane of the point as the normal vector of the point ; S22: Repeat step S21 until the normal vectors of all data points in are determined; S23: Divide the set of automotive contour point clouds into multiple subsets: , where \(n\) is the number of subsets, and each subset contains multiple data points with the same or similar normal vectors; S24: For any subset , randomly select data points from the multiple data points it contains for planar fitting to obtain a first fitting plane L , which satisfies the following plane equation: , where, is the unit normal vector of L and , is the distance from the origin of coordinates to ; S25: Count the number of data points in L whose distance from is less than a preset first distance, and judge k whether it is greater than a first threshold . If the judgment result is false, re-execute step S24. If the judgment result is true, use the current L as the current plane and execute step S26; S26: Randomly select k data points from the points closest to the current plane for plane fitting to obtain a second fitted plane , which satisfies the following plane equation: , Among them, ( is 's unit normal vector and , is the distance from the coordinate origin to ; S27: Determine whether the angle with the current plane is less than a preset second threshold , if the determination result is false, then use as the new current plane and re - execute step S26, if the determination result is true, execute step S28; S28: Filter out the data points in whose distance from the current plane is greater than a preset second distance, to obtain a local point cloud set of the vehicle contour ; S29: For each subset Repeat steps S24 to S28 until all subsets of the automotive contour point cloud set are traversed, and finally multiple local automotive contour point cloud sets are obtained.
2. The method for constructing an automotive contour surface model according to claim 1, wherein The specific steps of step S1 include the following steps: S11: Perform point cloud filtering on the set of point cloud data obtained by scanning an automobile with each 3D lidar; S12: Perform data downsampling processing on each filtered set of point cloud data; S13: Perform point cloud fusion processing on multiple sets of point cloud data after data downsampling processing to obtain a set of automobile contour point clouds.
3. A method for constructing an automobile contour surface model according to claim 2, characterized in that: The data downsampling processing uses a curvature reduction algorithm, and the number of data points per unit volume of the set of point cloud data in different regions increases with the increase of the curvature value.
4. A method for constructing an automotive contour surface model according to claim 1, characterized in that, The following steps are further included between step S23 and step S24: Project all the data points in onto a preset projection plane. If multiple clusters of data points appear after projection, then is further segmented based on the multiple clusters.
5. A method for constructing an automobile contour surface model according to claim 4, characterized in that: The projection plane is parallel to 's overall normal vector, and the 's overall normal vector is determined based on the directions of the normal vectors of each data point in .
6. A method for constructing an automotive contour surface model according to any one of claims 1 to 5, characterized in that, The step S3 further includes the following steps: S31: Project the data points included in onto the corresponding current plane; S32: Perform triangulation on the projected data points to construct a triangular mesh plane; S33: Map the triangular mesh plane back to three-dimensional space to obtain a triangular mesh distributed in three-dimensional space; S34: Perform spatial surface fitting based on the triangular mesh of the three-dimensional spatial distribution to obtain the local surface of the vehicle contour corresponding to ; S35: For each , steps S31 to S34 are repeatedly executed, and the respective local surfaces of the vehicle outline are obtained and then spliced together to finally obtain the vehicle outline surface model.
7. An automobile contour surface model construction system, including a data acquisition unit and a data processing unit, characterized in that: The data acquisition unit includes a 3D lidar array composed of multiple 3D lidars, a ground sensor vehicle detection device, and a GPS clock; The data processing unit includes a memory and a processor, wherein the memory stores a computer program, and when the program is executed by the processor, it can construct an automobile contour surface model using the method for constructing an automobile contour surface model according to any one of claims 1 to 6.
8. An automobile contour surface model construction system according to claim 7, characterized in that: It further includes a traffic server for receiving and saving the automobile contour surface model and identifying and detecting the automobile.
Citation Information
Patent Citations
Method for the determination of the wheel geometry and / or axle geometry of motor vehicles
CN101160505A
Vehicle collision angle analysis system based on three-dimensional reconstruction technology
CN105389849A