Vehicle identification method and system, storage medium and electronic device
By clustering and abnormal analysis of the point clouds scanned by the laser sensor, and adjusting the point clouds of abnormal candidate vehicles, the problem of inaccurate vehicle identification in the prior art is solved, and higher vehicle identification accuracy is achieved.
Patent Information
- Application Number
- CN202311793097.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2025-07-01
AI Technical Summary
In the prior art, the vehicle identification method based on density clustering is prone to clustering errors when encountering vehicles traveling side by side or vehicles with a large distance between the front and the car, resulting in inaccurate vehicle identification.
By clustering the point clouds scanned by the laser sensor, abnormal candidate vehicle point clouds are determined and adjusted until the vehicle parameters are within the preset range, and vehicle information is accurately identified.
The accuracy of vehicle identification is improved and the impact of point cloud distribution on vehicle identification results is reduced.
Smart Images

Figure CN120236252A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle recognition, and in particular, to a vehicle recognition method and system, a storage medium, and an electronic device. Background Art
[0002] In the prior art, the point cloud data collected by a lidar is often used to perform target detection on vehicles on the road. Since the equipment on the road site is not sufficient to support a complex model to complete the target detection and analysis process in the point cloud in a short time, a target detection algorithm based on density clustering is generally used for vehicle recognition.
[0003] However, the above-mentioned target detection algorithm based on density clustering is prone to clustering errors due to the distribution of the point cloud when encountering vehicles driving side by side and vehicles with a large distance between the front of the vehicle and the carriage, resulting in the problem of recognizing two vehicles as one vehicle or one vehicle as two vehicles.
[0004] It can be seen that the vehicle recognition method in the related art has the problem of low accuracy in vehicle recognition. Summary of the Invention
[0005] The embodiments of the present application provide a vehicle recognition method and system, a storage medium, and an electronic device, so as to at least solve the problem of low accuracy in vehicle recognition existing in the vehicle recognition method in the related art.
[0006] According to one aspect of the embodiments of the present application, a vehicle recognition method is provided, including: clustering the point cloud scanned by a laser sensor to obtain N groups of candidate vehicle point clouds, where each group of candidate vehicle point clouds in the N groups of candidate vehicle point clouds is used to represent a candidate vehicle, and N is a positive integer greater than or equal to 1; determining the abnormal candidate vehicle point clouds in the N groups of candidate vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the abnormal candidate vehicle point clouds are not within the preset vehicle parameter range; adjusting the abnormal candidate vehicle point clouds to obtain adjusted target vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the target vehicle point clouds are within the vehicle parameter range; and determining the vehicle information of the target candidate vehicle according to the target vehicle point clouds.
[0007] According to another aspect of the embodiments of the present application, a vehicle recognition system is further provided, including: a laser sensor for scanning a lane and vehicles on the lane to obtain scanned point clouds; a data processing component for clustering the point clouds scanned by the laser sensor to obtain N groups of candidate vehicle point clouds, where each group of candidate vehicle point clouds in the N groups of candidate vehicle point clouds is used to represent a candidate vehicle, and N is a positive integer greater than or equal to 1; determining abnormal candidate vehicle point clouds among the N groups of candidate vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the abnormal candidate vehicle point clouds are not within a preset vehicle parameter range; adjusting the abnormal candidate vehicle point clouds to obtain adjusted target vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the target vehicle point clouds are within the preset vehicle parameter range; and determining vehicle information of the target candidate vehicle according to the target vehicle point clouds.
[0008] According to yet another aspect of the embodiments of the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, where the computer program is configured to execute the above vehicle recognition method when running.
[0009] According to yet another aspect of the embodiments of the present application, an electronic device is further provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the above vehicle recognition method through the computer program.
[0010] In the embodiments of the present application, by adopting a method of performing abnormal analysis and processing on the vehicle parameters represented by the clustered targets, after clustering the point clouds scanned by the laser sensor to obtain N groups of candidate vehicle point clouds, abnormal analysis is performed to determine abnormal candidate vehicle point clouds whose vehicle parameters of the represented target candidate vehicles are not within the preset vehicle parameter range, and then based on the analyzed abnormal parameters, the abnormal candidate vehicle point clouds are adjusted to obtain target vehicle point clouds whose vehicle parameters of the represented target candidate vehicles are within the preset vehicle parameter range. Since after clustering is completed, abnormal analysis is performed on the clustered vehicle point clouds and the vehicle point clouds with abnormalities are adjusted, and the vehicle parameters represented by the adjusted vehicle point clouds are within the preset vehicle parameter range, it is possible to reduce the influence of the point cloud distribution on the vehicle recognition result, achieving the technical effect of improving the accuracy of vehicle recognition, and thus solving the problem of low accuracy of vehicle recognition methods in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0012] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0013] Figure 1 It is a schematic diagram of the hardware environment of an optional vehicle recognition method according to an embodiment of the present application;
[0014] Figure 2 It is a schematic flowchart of an optional vehicle recognition method according to an embodiment of the present application;
[0015] Figure 3 It is a schematic diagram of an optional vehicle recognition method according to an embodiment of the present application;
[0016] Figure 4 It is a schematic flowchart of another optional vehicle recognition method according to an embodiment of the present application;
[0017] Figure 5 It is a schematic diagram of yet another optional vehicle recognition method according to an embodiment of the present application;
[0018] Figure 6 It is a schematic diagram of yet another optional vehicle recognition method according to an embodiment of the present application;
[0019] Figure 7 It is a schematic diagram of yet another optional vehicle recognition method according to an embodiment of the present application;
[0020] Figure 8 It is a schematic diagram of matching the line segment formed by an optional point cloud with the external contour of a vehicle according to an embodiment of the present application;
[0021] Figure 9 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. Detailed implementation manners
[0022] To enable those skilled in the art to better understand the solutions of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0023] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0024] According to one aspect of the embodiments of the present application, a vehicle identification method is provided. Optionally, in this embodiment, the above vehicle identification method can be applied to a hardware environment such as Figure 1 shown in the figure, including a detection component 102 and a server 104. As Figure 1 shown, the server 104 is connected to the detection component 102 through a network, and can be used to identify vehicles based on the detection data of the detection component 102. A database can be set up on the server or independently of the server to provide data storage services for the server 104.
[0025] The above network may include, but is not limited to, at least one of the following: a wired network, a wireless network. The above wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, a local area network. The above wireless network may include, but is not limited to, at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The detection component 102 may include a laser sensor.
[0026] The vehicle identification method of the embodiments of the present application can be executed by the server 104, or can be executed by the detection component 102, or can also be jointly executed by the server 104 and the detection component 102. Taking the vehicle identification method in this embodiment executed by the server 104 as an example, Figure 2 is a schematic flowchart of an optional vehicle identification method according to the embodiments of the present application. As Figure 2 shown, the process of this method may include the following steps:
[0027] Step S202, clustering the point cloud scanned by the laser sensor to obtain N groups of candidate vehicle point clouds, where each group of candidate vehicle point clouds in the N groups of candidate vehicle point clouds is used to represent a candidate vehicle, and N is a positive integer greater than or equal to 1.
[0028] The vehicle recognition method in this embodiment can be applied to the scenario of recognizing vehicles in a preset area based on the scanned point cloud data. Here, the preset area can be a lane. The vehicle information of the vehicles driving on the lane can be determined through the point cloud data scanned by the laser sensor on the lane, including but not limited to information such as the length, width, height, and vehicle type of the vehicle.
[0029] The above-mentioned laser sensor can refer to lidar, which is a technology that measures distance and creates maps or images by emitting laser pulses and measuring the odd return time. It calculates the distance by measuring the time it takes for the light pulse to travel from the emission source to the target object and back, thereby generating high-precision three-dimensional spatial information. Target detection of the point cloud formed by lidar is an important part of the application. Target detection of the point cloud is divided into two categories. One is target detection based on traditional algorithms, and the other is target detection based on deep learning.
[0030] Target detection based on deep learning requires building a large model to ensure the accuracy of detection. However, the computing power of on-site devices is not sufficient to support the large model to complete the inference process in a short time. Therefore, only the target detection method based on traditional algorithms can be selected. Based on the application scenario, the target detection algorithm based on density clustering is selected. There are three problems in the application of this algorithm. One is that when the distance from the lidar is different, the point cloud density will have a certain gap, which will make it difficult to select appropriate clustering parameters. The second is that in the case of side-by-side vehicles, it is easy to merge two vehicles into one. The third is that vehicles with a large distance between the front of the vehicle and the carriage will be misclassified into two vehicles due to the lack of point cloud in the middle part.
[0031] To at least partially solve the above problems, in this embodiment, for the point cloud scanned by the laser sensor, after clustering the target, the vehicle parameters corresponding to the target can be used to determine whether the target is abnormal. When it is determined that the target is abnormal, the clustered point cloud can be adjusted, and the vehicle information can be determined based on the adjusted point cloud, so as to achieve accurate recognition of the vehicles on the lane.
[0032] In this embodiment, clustering the point cloud scanned by the laser sensor can obtain N groups of candidate vehicle point clouds, and each group of candidate vehicle point clouds corresponds to the point cloud included in a cluster.
[0033] The above clustering method can be a density-based clustering algorithm, a distance-based clustering algorithm, or other clustering methods.
[0034] Step S204, determine the abnormal candidate vehicle point clouds among the N groups of candidate vehicle point clouds, where the abnormal candidate vehicle point clouds represent that the vehicle parameters of the target candidate vehicle are not within the preset vehicle parameter range.
[0035] For N groups of candidate vehicle point clouds, the vehicle parameters of the candidate vehicles corresponding to each group of candidate vehicle point clouds can be judged in turn, compared with the preset vehicle parameter range, and a group of candidate vehicle point clouds corresponding to the candidate vehicles whose vehicle parameters are not within the preset vehicle parameter range is determined as the abnormal candidate vehicle point cloud.
[0036] The above vehicle parameters can be at least one of the length, width, and height of the vehicle. The above preset vehicle parameter range can be a parameter range determined according to the length, width, and height of different types of vehicles collected in advance. Here, the different types can be small cars, medium-sized cars, large cars, etc. determined based on the size of the vehicle. When comparing the vehicle parameters of the candidate vehicles represented by N groups of candidate vehicle point clouds with the preset vehicle parameter range, the corresponding preset vehicle parameter range can be directly selected according to the vehicle types allowed to pass in the current lane, or the vehicle type corresponding to each group of candidate vehicle point clouds can be determined according to the length, width, height, etc. information of the clustered candidate vehicle point clouds, and then the corresponding preset vehicle parameter range can be selected.
[0037] Step S206: Adjust the abnormal candidate vehicle point cloud to obtain the adjusted target vehicle point cloud, where the vehicle parameters of the target candidate vehicle represented by the target vehicle point cloud are within the preset vehicle parameter range.
[0038] For the selected abnormal candidate vehicle point cloud, different adjustment methods can be selected for adjustment according to the abnormal situation of the abnormal candidate vehicle point cloud, so as to obtain the target vehicle point cloud whose vehicle parameters represented by the target candidate vehicle are within the preset vehicle parameter range.
[0039] The above adjustment method can be to split the abnormal candidate vehicle point cloud to obtain multiple candidate vehicle point clouds, or to merge multiple abnormal candidate vehicle point clouds to obtain a merged candidate vehicle point cloud, or other adjustment methods.
[0040] Step S208: Determine the vehicle information of the target candidate vehicle according to the target vehicle point cloud.
[0041] In this embodiment, for the normal point clouds in the N groups of candidate vehicle point clouds obtained by clustering, the actual vehicle information can be directly determined according to the corresponding vehicle parameters. For the selected abnormal candidate vehicle point clouds, after adjusting to obtain the target vehicle point cloud, the actual vehicle information can be determined according to the vehicle parameters corresponding to the target vehicle point cloud.
[0042] Through the above steps S202 to S208, the point cloud scanned by the lidar sensor is clustered to obtain N groups of candidate vehicle point clouds. Each group of candidate vehicle point clouds in the N groups of candidate vehicle point clouds is used to represent a candidate vehicle, and N is a positive integer greater than or equal to 1. Determine the abnormal candidate vehicle point clouds in the N groups of candidate vehicle point clouds. The abnormal candidate vehicle point clouds represent that the vehicle parameters of the target candidate vehicle are not within the preset vehicle parameter range. Adjust the abnormal candidate vehicle point clouds to obtain the adjusted target vehicle point clouds. The vehicle parameters of the target candidate vehicle represented by the target vehicle point clouds are within the vehicle parameter range. According to the target vehicle point clouds, the vehicle information of the target candidate vehicle is determined, which solves the problem of low accuracy of vehicle recognition in the related art and improves the accuracy of vehicle recognition.
[0043] In an exemplary embodiment, clustering the point cloud scanned by the lidar sensor to obtain N groups of candidate vehicle point clouds includes:
[0044] S21. Perform density-based clustering operation on the point cloud scanned by the lidar sensor to obtain N groups of candidate vehicle point clouds. The distance between each point in the i-th candidate vehicle point cloud in the N groups of candidate vehicle point clouds and the center of the i-th candidate vehicle point cloud is less than the preset neighborhood radius, and the number of points included in the i-th candidate vehicle point cloud is greater than or equal to the preset number threshold. The preset neighborhood radius is a value determined according to the current ratio. The current ratio is the ratio obtained by dividing the current distance by the maximum distance. The current distance is the distance between the center point of the i-th candidate vehicle point cloud and the lidar sensor, and the maximum distance is the maximum distance among the N distances. The N distances include the distances between the centers of each group of candidate vehicle point clouds in the N groups of candidate vehicle point clouds and the lidar sensor. i is a positive integer greater than or equal to 1 and less than or equal to N.
[0045] It should be noted that before clustering the point cloud scanned by the lidar sensor, the point cloud can be filtered to filter out the ground point cloud and leave the point cloud belonging to the vehicle. Here, the filtering can be based on the height information corresponding to the point cloud.
[0046] In this embodiment, a density-based clustering algorithm can be used to cluster the point cloud. Before the clustering starts, an Eps (i.e., neighborhood radius) and MinPts (Minimum Points) can be predefined. Randomly select a point in the point cloud as point p. If the number of points in the neighborhood of point p is greater than or equal to the MinPts value, it is marked as a center point, and all the points in its neighborhood are merged into one cluster. If the number of points in the neighborhood of point p is less than the MinPts value, but there is a center point in its neighborhood, it is marked as a boundary point and assigned to the cluster where the center point is located. If a data point is neither a center point nor a boundary point, it is marked as a noise point. Therefore, the distance between the center point in the i-th candidate vehicle point cloud obtained by clustering and other points in this class is less than the preset neighborhood radius (i.e., the Eps value), and the number of points included in the i-th candidate vehicle point cloud is greater than or equal to the preset quantity threshold (i.e., the MinPts value).
[0047] It should be noted that the preset neighborhood radius and the preset quantity threshold corresponding to different clusters in this embodiment can be different, and the preset neighborhood radius can be related to the distance between the center point in the current cluster and the laser sensor. That is, the preset neighborhood radius is a value determined according to the current ratio, and the current ratio is the ratio obtained by dividing the current distance by the maximum distance. The current distance is the distance between the center point of the i-th candidate vehicle point cloud and the laser sensor, and the maximum distance is the distance between the points in the N groups of candidate vehicle point clouds and the laser sensor. The calculation formula of the preset neighborhood radius can be (current distance / maximum distance)×a, where a is a constant. Therefore, points closer to the laser sensor have a smaller Eps, and points farther from the laser sensor are the opposite.
[0048] To improve the clustering efficiency, a maximum distance value can be determined according to the farthest distance that the current laser sensor can scan, or the farthest distance on the lane that the current laser sensor can scan, as well as the historical data of the actual scenario. When the lane and the laser sensor do not change, this maximum distance value is used for each clustering.
[0049] In other words, during the process of clustering the point cloud, for the currently selected point p, the preset neighborhood radius value corresponding to point p can be determined based on the distance between point p and the laser sensor, and it can be determined whether point p is a center point based on the number of points within the preset neighborhood radius value.
[0050] Through this embodiment, by using the density-based clustering method, the candidate vehicle point cloud in the scanned point cloud is determined. The neighborhood radius during clustering can be dynamically adjusted according to the currently selected point, which can improve the clustering accuracy of different vehicle point clouds.
[0051] In an exemplary embodiment, determining the abnormal candidate vehicle point clouds among N groups of candidate vehicle point clouds includes:
[0052] S21, when the vehicle width of the target candidate vehicle represented by the target candidate vehicle point cloud is greater than a preset vehicle width threshold, determining the target candidate vehicle point cloud as an abnormal candidate vehicle point cloud, where the N groups of candidate vehicle point clouds include the target candidate vehicle point cloud, the vehicle parameters of the target candidate vehicle include the vehicle width of the target candidate vehicle, and the vehicle parameter range includes the vehicle width threshold.
[0053] To solve the problem that two vehicles are easily recognized as one target when vehicles are driving side by side, in this embodiment, for the N groups of candidate vehicle point clouds obtained by clustering, it can be first determined whether the vehicle width of the candidate vehicle represented by each group of candidate vehicle point clouds is less than the preset vehicle width threshold.
[0054] When the vehicle width of the target candidate vehicle represented by the target candidate vehicle point cloud among the N groups of candidate vehicle point clouds is greater than the preset vehicle width threshold, the target candidate vehicle point cloud can be determined as an abnormal candidate vehicle point cloud.
[0055] Optionally, adjusting the abnormal candidate vehicle point cloud to obtain the adjusted target vehicle point cloud includes:
[0056] When the vehicle width of the target candidate vehicle represented by the target candidate vehicle point cloud is greater than the preset vehicle width threshold, determining the first width center point of the vehicle width of the target candidate vehicle among the first group of points in the target candidate vehicle point cloud, where the first group of points is used to represent the contour of the target candidate vehicle in the vehicle width direction;
[0057] Starting from the first width center point, respectively searching for the first point that meets the preset condition in the first group of points along the first direction, to obtain the first point, and searching for the first point that meets the preset condition in the first group of points along the second direction, to obtain the second point, where the first direction is the vehicle width direction, the second direction is the direction opposite to the vehicle width direction, and the preset condition includes that the number of points within the first preset range centered on the found point in the abnormal candidate vehicle point cloud is less than or equal to the preset number threshold;
[0058] Divide the abnormal candidate vehicle point cloud into a first candidate vehicle point cloud and a second candidate vehicle point cloud with a target plane. Among them, the points in the first candidate vehicle point cloud are located on one side of the target plane, and the points in the second candidate vehicle point cloud are located on the other side of the target plane. The target plane is a plane that includes the first point or the second point and is perpendicular to the vehicle width direction. The target vehicle point cloud includes the first candidate vehicle point cloud and the second candidate vehicle point cloud. The first candidate vehicle point cloud is used to represent the first candidate vehicle, and the second candidate vehicle point cloud is used to represent the second candidate vehicle. The vehicle width of the first candidate vehicle represented by the first candidate vehicle point cloud is less than or equal to the vehicle width threshold, and the vehicle width of the second candidate vehicle represented by the second candidate vehicle point cloud is less than or equal to the vehicle width threshold.
[0059] It should be noted that when starting from the first width center point, as Figure 3 shown, when looking for points that meet the preset conditions in two directions respectively, it can be searched at a preset interval. Taking the preset interval of 10 cm as an example, starting from the first width center point, it can be moved at an interval of 10 cm on both sides respectively. For each point at an interval of 10 cm, determine the number of points within the first preset range (which can be any value between 10 cm and 20 cm) centered on this point. If the number is less than or equal to the preset number threshold, then this point is the demarcation point of the two vehicle point clouds.
[0060] In addition, during the process of finding the demarcation point, if the number of points within the first preset range centered on this demarcation point is much less than the preset number threshold, the preset number threshold can also be updated to the number corresponding to this demarcation point for subsequent finding of the demarcation point.
[0061] Taking the preset vehicle width threshold of 3 m as an example, after clustering is completed, all targets with a width greater than 3 m can be traversed, and the targets with abnormal width can be segmented. As Figure 4 shown, the steps are as follows:
[0062] Step 1, calculate the center point position in the width direction.
[0063] Initialize the minimum position as the center point.
[0064] Step 2, move from the center to both sides in units of 10 cm, and at the same time calculate the number of points within the first preset range on the left and right of the current position. If the number is less than the currently recorded minimum value, update the segmentation position to the current position.
[0065] Step 3, segment the target according to the determined optimal segmentation position to obtain two new targets.
[0066] Through this embodiment, the width of the clustered target is detected, and the optimal segmentation position is found for the target with abnormal width and segmented into two targets, which can avoid misidentifying the vehicles when vehicles drive side by side, thereby improving the accuracy of vehicle identification.
[0067] In an exemplary embodiment, determining the abnormal candidate vehicle point clouds in N groups of candidate vehicle point clouds includes:
[0068] S31, when the vehicle height of the third candidate vehicle represented by the third candidate vehicle point cloud is greater than a preset vehicle height threshold, the vehicle length of the third candidate vehicle is less than the preset vehicle length threshold, and the vehicle height of the fourth candidate vehicle represented by the fourth candidate vehicle point cloud is greater than the preset vehicle height threshold, and the vehicle length of the fourth candidate vehicle is less than the preset vehicle length threshold, the third candidate vehicle point cloud and the fourth candidate vehicle point cloud are determined as abnormal candidate vehicle point clouds, where the N groups of candidate vehicle point clouds include the third candidate vehicle point cloud and the fourth candidate vehicle point cloud, the target candidate vehicles include the third candidate vehicle and the fourth candidate vehicle point cloud, the distance between the third candidate vehicle point cloud and the fourth candidate vehicle point cloud is less than the preset distance, and the vehicle parameter range includes the vehicle length threshold.
[0069] Considering vehicles of the truck type, the distance between the front of the vehicle and the carriage is relatively large, and there may be a situation where the front and the carriage of the same vehicle are clustered into two independent targets. In this embodiment, abnormal analysis can be performed on the length corresponding to the clustered candidate vehicle point cloud, that is, analyzing whether the vehicle length of the candidate vehicle represented by the candidate vehicle point cloud is less than the preset vehicle length threshold. Since vehicles of the truck type are generally higher than other non-truck vehicles, the detection of whether the front and the carriage are clustered into two independent targets can be performed only when the vehicle height of the candidate vehicle represented by the candidate vehicle point cloud is greater than the preset vehicle height threshold and the vehicle length is less than the preset length threshold.
[0070] Optionally, the above analysis of the vehicle length corresponding to the candidate vehicle point cloud can be directly performed after clustering (the width abnormality identification and adjustment in the foregoing embodiment are performed after the length abnormality identification and adjustment), or can be performed after the width abnormality identification and adjustment of the clustered candidate vehicles. This embodiment does not limit the sequence of the two abnormality identifications and analyses.
[0071] Since the distance between the front of a vehicle and the carriage is not too far, in order to improve the analysis efficiency and avoid excessive analysis and calculation of non-vehicle point clouds with a height greater than the preset vehicle height threshold and a length less than the preset vehicle length threshold, in this embodiment, when only the third candidate vehicle point cloud and the fourth candidate vehicle point cloud with a distance less than the preset distance are recognized, and the vehicle height of the third candidate vehicle represented by the third candidate vehicle point cloud is greater than the preset vehicle height threshold, the vehicle length of the third candidate vehicle is less than the preset vehicle length threshold, the vehicle height of the fourth candidate vehicle represented by the fourth candidate vehicle point cloud is greater than the preset vehicle height threshold, and the vehicle length of the fourth candidate vehicle is less than the preset vehicle length threshold, abnormal analysis and adjustment are performed on the third candidate vehicle point cloud and the fourth candidate vehicle point cloud.
[0072] Optionally, adjusting the abnormal candidate vehicle point cloud to obtain the adjusted target vehicle point cloud includes:
[0073] In the case where the vehicle height of the third candidate vehicle represented by the third candidate vehicle point cloud is greater than the preset vehicle height threshold, the vehicle length of the third candidate vehicle is less than the preset vehicle length threshold, and the vehicle height of the fourth candidate vehicle represented by the fourth candidate vehicle point cloud is greater than the preset vehicle height threshold, and the vehicle length of the fourth candidate vehicle is less than the preset vehicle length threshold, determine whether the second group of points of the third candidate vehicle point cloud does not match the vehicle contour, and determine whether the third group of points of the fourth candidate vehicle point cloud does not match the vehicle contour, where the vehicle parameters of the target candidate vehicle include the vehicle length of the target candidate vehicle, the vehicle parameter range includes the vehicle length threshold, the second group of points is used to represent the contour of the third candidate vehicle in the vehicle width direction, and the third group of points is used to represent the contour of the fourth candidate vehicle in the vehicle width direction;
[0074] In the case where it is determined that the second group of points does not match the vehicle contour, the third group of points matches the vehicle contour, and the vehicle length of the third candidate vehicle is less than the vehicle length of the fourth candidate vehicle, determine that the third candidate vehicle point cloud is the front head point cloud and the fourth candidate vehicle point cloud is the carriage point cloud;
[0075] Combine the third candidate vehicle point cloud and the fourth candidate vehicle point cloud into a fifth candidate vehicle point cloud, where the target vehicle point cloud includes the fifth candidate vehicle point cloud.
[0076] It should be noted that to determine whether a set of points matches the vehicle contour, it can be based on whether the line segments corresponding to the set of points conform to the vehicle contour. Here, the vehicle contour can be a partial external contour of the vehicle. If the laser sensor scans the front of the vehicle as the target, after some laser beams are emitted onto the front windshield and then reflected back by other objects inside the vehicle after passing through the glass, some of the point clouds will correspond to objects inside the vehicle. Compared with the point clouds generated by the laser beams being reflected back by objects on the vehicle surface, these point clouds corresponding to objects inside the vehicle do not match the vehicle's external contour very well.
[0077] Optionally, determining whether the second set of points of the third candidate vehicle point cloud does not match the vehicle contour includes:
[0078] In the second set of points, determine the second width center point of the vehicle width of the third candidate vehicle;
[0079] Taking the second width center point as the center, determine the point clouds within the second preset range and belonging to different line orders to obtain M sets of line-order point clouds, where M is a positive constant greater than or equal to 1. The laser sensor is a multi-line laser sensor located above the lane, and each set of line-order point clouds in the M sets of line-order point clouds corresponds to a scan line of the laser sensor;
[0080] Calculate the average value of each set of line-order point clouds respectively to obtain M point clouds;
[0081] In the case where the line segments formed by the M point clouds do not match the vehicle contour, determine that the M points include the points representing the front windshield and determine that the second set of points does not match the vehicle contour.
[0082] It should be noted that the above line order can be determined based on the emission channels of different laser beams of the multi-line laser sensor. The installation position of the laser sensor can be as Figure 5 shown. The laser sensor is a lidar suspended under the gantry, and a multi-line lidar can cover multiple lanes. For example, taking a 32-line laser sensor as an example, the 32-line laser sensor has 32 emission channels (i.e., 32 scan lines). By numbering different channels, there can be serial numbers from 1 to 32. The point clouds scanned by the 32-line laser sensor can be divided into line-order point clouds from 1 to 32 according to the corresponding emission channels.
[0083] The above second width center point can refer to two points in the vehicle width direction of the third candidate vehicle, as Figure 6 shown. Each of the two widths of the target has a center point. The second preset range can be the Figure 6 gray area in. Calculating the average value of each set of line-order point clouds can refer to calculating the average value of the point clouds belonging to the same scan line within the gray area, and the calculation method can be based on the coordinates corresponding to the point clouds.
[0084] If the laser beam emitted by the laser sensor reaches the front windshield of the vehicle head, some of the laser beam will penetrate the glass, enter the interior of the cab, and be reflected back by the objects inside the cab, generating a point cloud corresponding to the objects inside the cab as shown in Figure 7 . The position of the coordinates of the point cloud corresponding to the objects inside the cab on the x-axis has a large difference compared to the position of the coordinates of the point cloud corresponding to other surfaces of the vehicle head on the x-axis. If the laser beam emitted by the laser sensor does not pass through the vehicle glass, the generated point cloud is the point cloud corresponding to the outer surface of the vehicle head or the outer surface of the carriage. Since there is no glass on the carriage, there is no jumping point cloud for the target corresponding to the carriage.
[0085] Therefore, by calculating the average value of each group of line-ordered point clouds, for the M point clouds obtained, if the difference between each point cloud in the M point clouds and other point clouds on the x-axis is less than the threshold, it is considered that the M point clouds correspond to the vehicle surface. As shown in Figure 8 , it can be considered that the line segment formed by the M point clouds will match the external contour of the vehicle. If the difference between each point cloud in the M point clouds and other point clouds on the x-axis is greater than or equal to the threshold, it is considered that there is a point cloud corresponding to the object inside the vehicle in the M point clouds, then the line segment formed by the M point clouds will not match the external contour of the vehicle, and there will be an obvious jump in this line segment.
[0086] Optionally, determining whether the third group of points of the fourth candidate vehicle point cloud does not match the vehicle contour includes:
[0087] In the third group of points, determine the third width center point of the vehicle width of the fourth candidate vehicle;
[0088] Taking the third width center point as the center, determine the point clouds belonging to different line orders within the third preset range to obtain N groups of line-ordered point clouds, where N is a positive constant greater than or equal to 1, the laser sensor is a multi-line laser sensor located above the lane, and each group of line-ordered point clouds in the N groups of line-ordered point clouds corresponds to a scan line of the laser sensor;
[0089] Calculate the average value of each group of line-ordered point clouds respectively to obtain N point clouds;
[0090] In the case where the line segment formed by the N point clouds matches the vehicle contour, determine that the N points do not include the points used to represent the front windshield, and determine that the third group of points matches the vehicle contour.
[0091] The method for determining whether the third group of points of the fourth candidate vehicle point cloud does not match the vehicle contour can be similar to the method for determining the third candidate vehicle point cloud. The above-mentioned third width center point is similar to the second width center point, and the above-mentioned third preset range is similar to the second preset range. This embodiment will not be elaborated here.
[0092] For example, taking the preset vehicle height threshold as 2.5 m and the preset vehicle length threshold as 4 m as an example, after clustering is completed, for all currently detected targets, select the suspected vehicle heads, but targets with significantly abnormal outer dimension information. Targets with a height greater than 2.5 m but a length less than 4 m are regarded as possible abnormal targets, and determine whether the selected target is a vehicle head. The specific steps are as follows:
[0093] Step 1, sort the points of the target point cloud according to the line order of the radar.
[0094] Step 2, select all the points within a rectangular range of 0.1 m to the left and right of the center of the width of the target point cloud, and calculate the average value of the points belonging to different line orders respectively to generate a new point.
[0095] Step 3, traverse each point in sequence to detect whether there is an obvious jump (that is, there is a part of the point cloud in a group of point clouds where the difference between the coordinate values on the x-axis as shown in Figure 7 is greater than a certain threshold compared with the coordinate values on the x-axis of other point clouds).
[0096] In the case of no glass, the point cloud matches the vehicle contour and there is no obvious jump, while in the vehicle head part, due to the existence of the windshield, an obvious jump will occur.
[0097] Step 4, after detecting the vehicle head part, check whether there is a detected target within 6 m behind the abnormal vehicle head, and whether the width of the detected target is similar to that of the vehicle head. If it meets the conditions, merge the two to form a detected target.
[0098] Through this embodiment, length anomaly detection is performed on the clustered targets, and when it is determined that the target with length anomaly belongs to the vehicle head, the targets with the same width and length anomaly are merged with the vehicle head target into a vehicle point cloud, which can avoid misidentifying the vehicle due to a certain distance between the vehicle head and the carriage, thereby improving the accuracy of vehicle identification.
[0099] Next, the vehicle identification method in the embodiments of the present application will be explained in conjunction with optional examples. In this optional example, the laser sensor is a multi-line lidar.
[0100] This optional example provides an improved method for point cloud target detection based on density clustering. The process of the vehicle identification method in this optional example may include the following steps:
[0101] Step 1, filter out the ground point cloud based on the height information, leaving the point cloud belonging to the vehicle.
[0102] Step 2, select a data point p from the filtered point cloud. Calculate the appropriate parameters Eps and MinPts for point p according to the distance of point p from the radar.
[0103] Step 3, if the selected data point p is a core point based on the parameters Eps and MinPts, find all data objects that are density-reachable from p to form a cluster.
[0104] Step 4, if the selected point p is a border point, select another data point again.
[0105] Step 5, repeat Steps 3 and 4 until all points are processed to obtain the target of the preliminary clustering.
[0106] Step 6, traverse all targets and find all targets with a width greater than 3 meters.
[0107] Step 7, segment the targets with abnormal width. The steps are as follows:
[0108] 1) Calculate the central point position in the width direction and initialize the minimum position as the central point.
[0109] 2) Move 10 cm from the center to both sides respectively. At the same time, calculate the number of point cloud points in the range of 10 - 20 cm on the left and right of the current position. If the number is less than the currently recorded minimum value, update the minimum value and update the segmentation position to the current position.
[0110] 3) Segment the target according to the optimal segmentation position obtained in Step 2 to form two new targets.
[0111] Step 8, traverse all currently detected targets and filter out targets that are suspected to be the front of the vehicle but have significantly abnormal outer contour dimensions (targets with a height greater than 2.5 meters but a length less than 4 meters are regarded as possible abnormal targets).
[0112] Step 9, determine whether the targets filtered out in Step 8 are the front of a vehicle. The specific steps are as follows:
[0113] 1) Sort the points of the target point cloud according to the line order of the radar.
[0114] 2) Select all points in the rectangle with a range of 0.1 m to the left and right of the width center of the target point cloud. Calculate the average value of the points belonging to different line orders respectively to generate a new point.
[0115] 3) Traverse each point in sequence to detect whether there is an obvious jump.
[0116] Step 10, after detecting the front of the vehicle, check whether there is a detected target with a width similar to the front of the vehicle within 6 meters behind the abnormal front of the vehicle, and merge the two to form a correct detected target.
[0117] Through this embodiment, the accuracy of vehicle information detection based on the scanned point cloud can be effectively improved.
[0118] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0119] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of this application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM (Read-Only Memory), RAM (Random Access Memory), magnetic disk, optical disk), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of this application.
[0120] According to another aspect of the embodiments of this application, a vehicle recognition system for implementing the above vehicle recognition method is further provided. The vehicle recognition system may include:
[0121] A laser sensor, configured to scan the lane and the vehicles on the lane to obtain the scanned point cloud;
[0122] A data processing component, configured to cluster the point cloud scanned by the laser sensor to obtain N groups of candidate vehicle point clouds, where each group of candidate vehicle point clouds in the N groups of candidate vehicle point clouds is used to represent a candidate vehicle, and N is a positive integer greater than or equal to 1; determine the abnormal candidate vehicle point clouds in the N groups of candidate vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the abnormal candidate vehicle point clouds are not within the preset vehicle parameter range; adjust the abnormal candidate vehicle point clouds to obtain the adjusted target vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the target vehicle point clouds are within the preset vehicle parameter range; and determine the vehicle information of the target candidate vehicle according to the target vehicle point clouds.
[0123] It should be noted that the data processing component can be a server or a component that executes the foregoing determination of vehicle information on a certain processing device. For example, a processor, a controller, etc. The manner of determining vehicle information is similar to that in the foregoing embodiments, and has been described before, so it will not be repeated here.
[0124] Through the above vehicle recognition, clustering is performed on the point cloud scanned by the lidar sensor to obtain N groups of candidate vehicle point clouds. Each group of candidate vehicle point clouds in the N groups of candidate vehicle point clouds is used to represent a candidate vehicle, where N is a positive integer greater than or equal to 1. Determine the abnormal candidate vehicle point clouds in the N groups of candidate vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the abnormal candidate vehicle point clouds are not within the preset vehicle parameter range. Adjust the abnormal candidate vehicle point clouds to obtain the adjusted target vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the target vehicle point clouds are within the preset vehicle parameter range. According to the target vehicle point clouds, the vehicle information of the target candidate vehicle is determined, which solves the problem of low accuracy in vehicle recognition in the related art and improves the accuracy of vehicle recognition.
[0125] In an exemplary embodiment, the data processing component is further configured to perform density-based clustering operations on the point cloud scanned by the lidar sensor to obtain N groups of candidate vehicle point clouds. For the i-th candidate vehicle point cloud in the N groups of candidate vehicle point clouds, the distance between each point and the center of the i-th candidate vehicle point cloud is less than the preset neighborhood radius, and the number of points included in the i-th candidate vehicle point cloud is greater than or equal to the preset quantity threshold. The preset neighborhood radius is a value determined according to the current ratio, where the current ratio is the ratio obtained by dividing the current distance by the maximum distance. The current distance is the distance between the center point of the i-th candidate vehicle point cloud and the lidar sensor, and the maximum distance is the distance between the points in the N groups of candidate vehicle point clouds and the lidar sensor. i is a positive integer greater than or equal to 1 and less than or equal to N.
[0126] In an exemplary embodiment, the data processing component is further configured to, when the vehicle width of the target candidate vehicle represented by the target candidate vehicle point cloud is greater than the preset vehicle width threshold, determine the target candidate vehicle point cloud as an abnormal candidate vehicle point cloud. The N groups of candidate vehicle point clouds include the target candidate vehicle point cloud, the vehicle parameters of the target candidate vehicle include the vehicle width of the target candidate vehicle, and the vehicle parameter range includes the vehicle width threshold.
[0127] In an exemplary embodiment, the data processing component is further configured to, when the vehicle width of the target candidate vehicle represented by the target candidate vehicle point cloud is greater than a preset vehicle width threshold, determine a first width center point of the vehicle width of the target candidate vehicle among a first set of points in the target candidate vehicle point cloud, where the first set of points is used to represent the profile of the target candidate vehicle in the vehicle width direction; starting from the first width center point, respectively search for the first point that satisfies a preset condition in the first set of points along a first direction, and obtain the first point, and search for the first point that satisfies the preset condition in the first set of points along a second direction, and obtain the second point, where the first direction is the vehicle width direction, the second direction is the direction opposite to the vehicle width direction, and the preset condition includes that in the abnormal candidate vehicle point cloud, the number of points within a first preset range centered on the found point is less than or equal to a preset number threshold; divide the abnormal candidate vehicle point cloud into a first candidate vehicle point cloud and a second candidate vehicle point cloud by a target plane, where the points in the first candidate vehicle point cloud are located on one side of the target plane, and the points in the second candidate vehicle point cloud are located on the other side of the target plane, the target plane is a plane that includes the first point or the second point and is perpendicular to the vehicle width direction, the target vehicle point cloud includes the first candidate vehicle point cloud and the second candidate vehicle point cloud, the first candidate vehicle point cloud is used to represent the first candidate vehicle, the second candidate vehicle point cloud is used to represent the second candidate vehicle, the vehicle width of the first candidate vehicle represented by the first candidate vehicle point cloud is less than or equal to the vehicle width threshold, and the vehicle width of the second candidate vehicle represented by the second candidate vehicle point cloud is less than or equal to the vehicle width threshold.
[0128] In an exemplary embodiment, the data processing component is further configured to, when the vehicle height of the third candidate vehicle represented by the third candidate vehicle point cloud is greater than a preset vehicle height threshold, the vehicle length of the third candidate vehicle is less than a preset vehicle length threshold, and the vehicle height of the fourth candidate vehicle represented by the fourth candidate vehicle point cloud is greater than a preset vehicle height threshold, and the vehicle length of the fourth candidate vehicle is less than a preset vehicle length threshold, determine the third candidate vehicle point cloud and the fourth candidate vehicle point cloud as abnormal candidate vehicle point clouds, where the N groups of candidate vehicle point clouds include the third candidate vehicle point cloud and the fourth candidate vehicle point cloud, the target candidate vehicle includes the third candidate vehicle and the fourth candidate vehicle point cloud, the distance between the third candidate vehicle point cloud and the fourth candidate vehicle point cloud is less than a preset distance, the vehicle parameter range includes the vehicle length threshold, and the vehicle parameter of the target candidate vehicle includes the vehicle length of the target candidate vehicle.
[0129] In an exemplary embodiment, the data processing component is further configured to, when the vehicle height of the third candidate vehicle represented by the third candidate vehicle point cloud is greater than a preset vehicle height threshold, the vehicle length of the third candidate vehicle is less than a preset vehicle length threshold, the vehicle height of the fourth candidate vehicle represented by the fourth candidate vehicle point cloud is greater than the preset vehicle height threshold, and the vehicle length of the fourth candidate vehicle is less than the preset vehicle length threshold, determine whether the second set of points of the third candidate vehicle point cloud does not match the vehicle contour, and determine whether the third set of points of the fourth candidate vehicle point cloud does not match the vehicle contour, where the second set of points is used to represent the contour of the third candidate vehicle in the vehicle width direction, and the third set of points is used to represent the contour of the fourth candidate vehicle in the vehicle width direction; when it is determined that the second set of points does not match the vehicle contour, the third set of points matches the vehicle contour, and the vehicle length of the third candidate vehicle is less than the vehicle length of the fourth candidate vehicle, determine that the third candidate vehicle point cloud is the front head point cloud and the fourth candidate vehicle point cloud is the carriage point cloud; combine the third candidate vehicle point cloud and the fourth candidate vehicle point cloud into a fifth candidate vehicle point cloud, where the target vehicle point cloud includes the fifth candidate vehicle point cloud.
[0130] In an exemplary embodiment, the data processing component is further configured to determine a second width center point of the vehicle width of the third candidate vehicle in the second set of points; with the second width center point as the center, determine the point clouds belonging to different line orders within a second preset range to obtain M sets of line order point clouds, where M is a positive constant greater than or equal to 1, the laser sensor is a multi-line laser sensor located above the lane, and each set of line order point clouds in the M sets of line order point clouds corresponds to a scan line of the laser sensor; calculate the average value of each set of line order point clouds respectively to obtain M point clouds; when the line segment formed by the M point clouds does not match the vehicle contour, determine that the M points include the points used to represent the front windshield, and determine that the second set of points does not match the vehicle contour.
[0131] In an exemplary embodiment, the data processing component is further configured to determine a third width center point of the vehicle width of the fourth candidate vehicle in the third set of points; with the third width center point as the center, determine the point clouds belonging to different line orders within a third preset range to obtain N sets of line order point clouds, where N is a positive constant greater than or equal to 1, the laser sensor is a multi-line laser sensor located above the lane, and each set of line order point clouds in the N sets of line order point clouds corresponds to a scan line of the laser sensor; calculate the average value of each set of line order point clouds respectively to obtain N point clouds; when the line segment formed by the N point clouds matches the vehicle contour, determine that the N points do not include the points used to represent the front windshield, and determine that the third set of points matches the vehicle contour.
[0132] It should be noted here that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should be noted that the above system can run in a hardware environment such as Figure 1 shown, and can be implemented by software or by hardware. Among them, the hardware environment includes a network environment.
[0133] According to another aspect of the embodiments of the present application, a storage medium is further provided. Optionally, in this embodiment, the above storage medium can be used to execute the program code of any one of the above vehicle recognition methods in the embodiments of the present application.
[0134] Optionally, in this embodiment, the above storage medium can be located on at least one of multiple network devices in the network shown in the above embodiment.
[0135] Optionally, in this embodiment, the storage medium is set to store program code for executing the following steps:
[0136] S1. Cluster the point cloud scanned by the laser sensor to obtain N groups of candidate vehicle point clouds, where each group of candidate vehicle point clouds in the N groups of candidate vehicle point clouds is used to represent a candidate vehicle, and N is a positive integer greater than or equal to 1;
[0137] S2. Determine the abnormal candidate vehicle point clouds in the N groups of candidate vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the abnormal candidate vehicle point clouds are not within the preset vehicle parameter range;
[0138] S3. Adjust the abnormal candidate vehicle point clouds to obtain the adjusted target vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the target vehicle point clouds are within the preset vehicle parameter range;
[0139] S4. Determine the vehicle information of the target candidate vehicle according to the target vehicle point clouds.
[0140] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and details are not described herein again.
[0141] Optionally, in this embodiment, the above storage medium may include, but is not limited to: various media such as USB flash drives, ROMs, RAMs, mobile hard disks, magnetic disks, or optical discs that can store program code.
[0142] According to another aspect of the embodiments of the present application, an electronic device for implementing the above vehicle recognition method is further provided. The electronic device can be a server, a terminal, or a combination thereof.
[0143] Figure 9 is a structural block diagram of an optional electronic device according to the embodiments of the present application, such asFigure 9 As shown, it includes a processor 802, a communication interface 804, a memory 806, and a communication bus 808. Among them, the processor 802, the communication interface 804, and the memory 806 communicate with each other through the communication bus 808. Among them,
[0144] The memory 806 is used to store computer programs;
[0145] When the processor 802 is used to execute the computer program stored on the memory 806, the following steps are implemented:
[0146] S1, cluster the point cloud scanned by the laser sensor to obtain N groups of candidate vehicle point clouds. Among them, each group of candidate vehicle point clouds in the N groups of candidate vehicle point clouds is used to represent a candidate vehicle, and N is a positive integer greater than or equal to 1;
[0147] S2, determine the abnormal candidate vehicle point clouds in the N groups of candidate vehicle point clouds. Among them, the vehicle parameters of the target candidate vehicle represented by the abnormal candidate vehicle point clouds are not within the preset vehicle parameter range;
[0148] S3, adjust the abnormal candidate vehicle point clouds to obtain the adjusted target vehicle point clouds. Among them, the vehicle parameters of the target candidate vehicle represented by the target vehicle point clouds are within the preset vehicle parameter range;
[0149] S4, determine the vehicle information of the target candidate vehicle according to the target vehicle point clouds.
[0150] Optionally, the communication bus can be a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 9 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used for communication between the above-mentioned electronic device and other devices.
[0151] The memory can include a RAM, and can also include a non-volatile memory, for example, at least one disk memory. Optionally, the memory can also be at least one storage device located far from the aforementioned processor.
[0152] The above-mentioned processor may be a general-purpose processor, including but not limited to: CPU (Central Processing Unit, central processing unit), NP (Network Processor, network processor), etc.; it may also be a DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit, application-specific integrated circuit), FPGA (Field-Programmable Gate Array, field-programmable gate array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0153] Optionally, specific examples in this embodiment may refer to the examples described in the above-mentioned embodiment, and will not be elaborated herein.
[0154] Those of ordinary skill in the art can understand that Figure 9 The structure shown is only illustrative. The device for implementing the above vehicle recognition method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and a mobile Internet device (Mobile Internet Devices, MID), a PAD and other terminal devices. Figure 9 It does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, a display device, etc.) than those shown in Figure 9 or have a different configuration from that shown in Figure 9 Those shown.
[0155] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware of the terminal device through a program, and the program can be stored in a computer-readable storage medium. The storage medium may include: a flash drive, a ROM, a RAM, a magnetic disk or an optical disc, etc.
[0156] The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0157] If the integrated unit in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing one or more computer devices (which can be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the above methods in various embodiments of this application.
[0158] In the above embodiments of this application, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0159] In several embodiments provided by this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be in electrical or other forms.
[0160] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0161] In addition, the functional units in various embodiments of this application can be integrated in a processing unit, or each unit can exist physically alone, or at least two units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0162] The above are only the preferred embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.
Claims
1. A vehicle recognition method, characterized in that, Including: Clustering the point cloud scanned by the laser sensor to obtain N groups of candidate vehicle point clouds, where each group of candidate vehicle point clouds in the N groups of candidate vehicle point clouds is used to represent a candidate vehicle, and N is a positive integer greater than or equal to 1; Determining the abnormal candidate vehicle point clouds in the N groups of candidate vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the abnormal candidate vehicle point clouds are not within the preset vehicle parameter range; Adjusting the abnormal candidate vehicle point clouds to obtain adjusted target vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the target vehicle point clouds are within the preset vehicle parameter range; Determining the vehicle information of the target candidate vehicle according to the target vehicle point clouds.
2. The method according to claim 1, wherein The clustering of the point cloud scanned by the laser sensor to obtain N groups of candidate vehicle point clouds includes: Performing density-based clustering operation on the point cloud scanned by the laser sensor to obtain the N groups of candidate vehicle point clouds, where the distance between each point in the i-th candidate vehicle point cloud in the N groups of candidate vehicle point clouds and the center of the i-th candidate vehicle point cloud is less than the preset neighborhood radius, and the number of points included in the i-th candidate vehicle point cloud is greater than or equal to the preset number threshold. The preset neighborhood radius is a value determined according to the current ratio, and the current ratio is the ratio obtained by dividing the current distance by the maximum distance. The current distance is the distance between the center point of the i-th candidate vehicle point cloud and the laser sensor, and the maximum distance is the distance between the points in the N groups of candidate vehicle point clouds and the laser sensor. i is a positive integer greater than or equal to 1 and less than or equal to N.
3. The method according to claim 1, wherein The determining the abnormal candidate vehicle point clouds in the N groups of candidate vehicle point clouds includes: When the vehicle width of the target candidate vehicle represented by the target candidate vehicle point cloud is greater than the preset vehicle width threshold, determining the target candidate vehicle point cloud as the abnormal candidate vehicle point cloud, where the N groups of candidate vehicle point clouds include the target candidate vehicle point cloud, the vehicle parameters of the target candidate vehicle include the vehicle width of the target candidate vehicle, and the vehicle parameter range includes the vehicle width threshold.
4. The method according to claim 3, characterized in that The adjusting the abnormal candidate vehicle point clouds to obtain adjusted target vehicle point clouds includes: When the vehicle width of the target candidate vehicle represented by the target candidate vehicle point cloud is greater than the preset vehicle width threshold, determining the first width center point of the vehicle width of the target candidate vehicle in the first group of points in the target candidate vehicle point cloud, where the first group of points is used to represent the contour of the target candidate vehicle in the vehicle width direction; Starting from the center point of the first width, search for the first point that meets the preset condition in the first set of points along the first direction, to obtain a first point, and search for the first point that meets the preset condition in the first set of points along the second direction, to obtain a second point, where the first direction is the vehicle width direction, the second direction is the direction opposite to the vehicle width direction, and the preset condition includes that the number of points within a first preset range centered on the found point in the abnormal candidate vehicle point cloud is less than or equal to a preset number threshold; Divide the abnormal candidate vehicle point cloud into a first candidate vehicle point cloud and a second candidate vehicle point cloud by a target plane, where the points in the first candidate vehicle point cloud are located on one side of the target plane, the points in the second candidate vehicle point cloud are located on the other side of the target plane, the target plane is a plane that includes the first point or the second point and is perpendicular to the vehicle width direction, the target vehicle point cloud includes the first candidate vehicle point cloud and the second candidate vehicle point cloud, the first candidate vehicle point cloud is used to represent a first candidate vehicle, the second candidate vehicle point cloud is used to represent a second candidate vehicle, the vehicle width of the first candidate vehicle represented by the first candidate vehicle point cloud is less than or equal to a vehicle width threshold, and the vehicle width of the second candidate vehicle represented by the second candidate vehicle point cloud is less than or equal to the vehicle width threshold.
5. The method according to claim 1, characterized in that Determining the abnormal candidate vehicle point cloud among the N groups of candidate vehicle point clouds includes: In the case where the vehicle height of the third candidate vehicle represented by the third candidate vehicle point cloud is greater than a preset vehicle height threshold, the vehicle length of the third candidate vehicle is less than a preset vehicle length threshold, and the vehicle height of the fourth candidate vehicle represented by the fourth candidate vehicle point cloud is greater than the preset vehicle height threshold, the vehicle length of the fourth candidate vehicle is less than the preset vehicle length threshold, determine the third candidate vehicle point cloud and the fourth candidate vehicle point cloud as the abnormal candidate vehicle point cloud, where the N groups of candidate vehicle point clouds include the third candidate vehicle point cloud and the fourth candidate vehicle point cloud, the target candidate vehicle includes the third candidate vehicle and the fourth candidate vehicle point cloud, the distance between the third candidate vehicle point cloud and the fourth candidate vehicle point cloud is less than a preset distance, the vehicle parameter range includes the vehicle length threshold, and the vehicle parameters of the target candidate vehicle include the vehicle length of the target candidate vehicle.
6. The method according to claim 5, wherein Adjusting the abnormal candidate vehicle point cloud to obtain an adjusted target vehicle point cloud includes: When the vehicle height of the third candidate vehicle represented by the third candidate vehicle point cloud is greater than a preset vehicle height threshold, the vehicle length of the third candidate vehicle is less than a preset vehicle length threshold, the vehicle height of the fourth candidate vehicle represented by the fourth candidate vehicle point cloud is greater than the preset vehicle height threshold, and the vehicle length of the fourth candidate vehicle is less than the preset vehicle length threshold, determine whether the second set of points of the third candidate vehicle point cloud does not match the vehicle contour, and determine whether the third set of points of the fourth candidate vehicle point cloud does not match the vehicle contour, where the second set of points is used to represent the contour of the third candidate vehicle in the vehicle width direction, and the third set of points is used to represent the contour of the fourth candidate vehicle in the vehicle width direction; When it is determined that the second set of points does not match the vehicle contour, the third set of points matches the vehicle contour, and the vehicle length of the third candidate vehicle is less than the vehicle length of the fourth candidate vehicle, determine that the third candidate vehicle point cloud is the front head point cloud and the fourth candidate vehicle point cloud is the carriage point cloud; combine the third candidate vehicle point cloud and the fourth candidate vehicle point cloud into a fifth candidate vehicle point cloud, where the target vehicle point cloud includes the fifth candidate vehicle point cloud.
7. The method according to claim 6, wherein The determination of whether the second set of points of the third candidate vehicle point cloud does not match the vehicle contour includes: In the second set of points, determine the second width center point of the vehicle width of the third candidate vehicle; with the second width center point as the center, determine the point clouds belonging to different line orders within a second preset range to obtain M sets of line order point clouds, where M is a positive constant greater than or equal to 1, the laser sensor is a multi-line laser sensor located above the lane, and each set of line order point clouds in the M sets of line order point clouds corresponds to a scan line of the laser sensor; Calculate the average value of each set of line order point clouds respectively to obtain M point clouds; When the line segment formed by the M point clouds does not match the vehicle contour, determine that the M points include points used to represent the front windshield, and determine that the second set of points does not match the vehicle contour.
8. The method according to claim 6, characterized in that The determination of whether the third set of points of the fourth candidate vehicle point cloud does not match the vehicle contour includes: In the third set of points, determine the third width center point of the vehicle width of the fourth candidate vehicle; With the third width center point as the center, determine the point clouds belonging to different line orders within a third preset range to obtain N sets of line order point clouds, where N is a positive constant greater than or equal to 1, the laser sensor is a multi-line laser sensor located above the lane, and each set of line order point clouds in the N sets of line order point clouds corresponds to a scan line of the laser sensor; Calculate the average value of each set of line order point clouds respectively to obtain N point clouds; When the line segment formed by the N point clouds matches the vehicle contour, determine that the N points do not include points used to represent the front windshield, and determine that the third set of points matches the vehicle contour.
9. A vehicle recognition system, characterized in that, including: A laser sensor for scanning the lane and the vehicles on the lane to obtain the scanned point cloud; A data processing component is configured to cluster the point cloud scanned by the laser sensor to obtain N groups of candidate vehicle point clouds, where each group of candidate vehicle point clouds in the N groups of candidate vehicle point clouds is used to represent a candidate vehicle, and N is a positive integer greater than or equal to 1; determine the abnormal candidate vehicle point clouds in the N groups of candidate vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the abnormal candidate vehicle point clouds are not within the preset vehicle parameter range; adjust the abnormal candidate vehicle point clouds to obtain adjusted target vehicle point clouds, where the vehicle parameters of the target candidate vehicle represented by the target vehicle point clouds are within the preset vehicle parameter range; and determine the vehicle information of the target candidate vehicle according to the target vehicle point clouds.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, where the program, when running, executes the method according to any one of claims 1 to 8.
11. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 8 through the computer program.