Speed calculation method and device based on laser radar point cloud and computer equipment
By dividing static points and dynamic points on a frame of lidar point cloud, the problem of low speed solution delay and accuracy in the prior art is solved, and fast and accurate speed solution is achieved.
Patent Information
- Application Number
- CN202311817165.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, speed solution based on two-frame point clouds has problems such as high delay and low accuracy, especially when the target object is incomplete.
By dividing static points and dynamic points for a frame of lidar point cloud, the speed of the target object is determined based on the divided static points and dynamic points, which avoids the delay in waiting for the next frame of point cloud and reduces the calculation amount of point cloud registration.
Fast and accurate speed solution based on lidar point cloud is realized, reducing the computational complexity and improving understanding computing efficiency and accuracy.
Smart Images

Figure CN120214813A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of lidar, and particularly relates to a method, device, and computer device for velocity calculation based on lidar point cloud. Background Art
[0002] A lidar is a radar system that detects the position, velocity, and other characteristic quantities of a target by emitting laser beams. A lidar is an advanced detection method that combines laser technology with modern optoelectronic detection technology. Lidar has the characteristics of high resolution, strong anti-interference ability, and high measurement accuracy, so it is widely used in fields such as autonomous driving, logistics transportation, high-precision maps, intelligent transportation, robots, industrial automation, drones, and surveying and mapping. In the applications of various fields, performing velocity calculation based on lidar point cloud data is a very important topic. For example, it can be used to calculate the velocity of the lidar itself or the target object within the lidar scanning area.
[0003] Currently, velocity calculation based on lidar point cloud generally relies on two consecutive frames of point cloud, so there will be a certain delay in velocity calculation; and when used to calculate the velocity of the target object scanned by the lidar, if the target object is incomplete in any one of the two consecutive frames of point cloud, it is very difficult to accurately calculate the velocity of the target object.
[0004] Therefore, how to quickly and accurately perform velocity calculation based on lidar point cloud has become an urgent technical problem to be solved. Summary of the Invention
[0005] The embodiments of this application provide a method, device, and computer device for velocity calculation based on lidar point cloud, which can solve the technical problems of large delay and low accuracy in velocity calculation based on two frames of point cloud in the prior art.
[0006] In a first aspect, the embodiments of this application provide a method for velocity calculation based on lidar point cloud, including: obtaining a target frame of point cloud, where the target frame of point cloud is a frame of point cloud obtained by a lidar scanning a target area, the target frame of point cloud includes multiple points, and the information of each point includes position information and radial velocity; obtaining static points and dynamic points in the target frame of point cloud, where the static points are the points corresponding to static objects in the target area, and the dynamic points are the points corresponding to dynamic objects in the target area; determining the velocity of a target object according to the static points and dynamic points, where the target object includes any object in the target area and / or the lidar.
[0007] In the above method, by dividing a frame of point cloud into static points and dynamic points, and then determining the speed of the target object based on the divided static points and dynamic points. After obtaining only one frame of point cloud, the speed of the target object can be obtained from the data of this frame of point cloud, without waiting until the next frame of point cloud is obtained and then performing speed calculation, so the delay is small; in addition, since it is not necessary to register two frames, the problem of difficult speed determination caused by the "imaging" incompleteness of the target object in the two frames of point cloud can be avoided. It can be seen that the method in the embodiment of the present application can quickly and accurately calculate the speed of the target object.
[0008] In one embodiment, the target frame of point cloud includes N points, where N is an integer greater than 1. Obtaining the static points and dynamic points in the target frame of point cloud includes:
[0009] Obtaining k points from the N points as a point set, where k is an integer greater than 1 and less than N; determining the average speed of the radial speeds of the k points in the point set; obtaining target points corresponding to the point set from the N points, and the absolute value of the difference between the radial speed of the target point corresponding to the point set and the average speed corresponding to the point set is less than a first threshold; determining the deviation degree corresponding to the point set, and the deviation degree corresponding to the point set is the deviation degree between the k points in the point set and the target point corresponding to the point set; if the deviation degree corresponding to the point set is less than or equal to a second threshold, then determining the target point corresponding to the point set as a static point, and determining the points other than the static points among the N points as dynamic points; if the deviation degree corresponding to the point set is greater than the second threshold, then jump to the step of obtaining k points from the N points as a point set.
[0010] In one embodiment, the target frame of point cloud includes N points, where N is an integer greater than 1. Obtaining the static points and dynamic points in the target frame of point cloud includes: Each time obtaining k points from the N points as a point set, and obtaining n point sets, where k is an integer greater than 1 and less than N, and n is an integer greater than or equal to 1; determining the average speed of the radial speeds of the k points in each point set; obtaining target points corresponding to each point set respectively from the N points, and the absolute value of the difference between the radial speed of the target point corresponding to the first point set and the average speed corresponding to the first point set is less than a first threshold, and the first point set is any one of the n point sets; determining the deviation degree corresponding to each point set respectively, and the deviation degree corresponding to the first point set is the deviation degree between the k points in the first point set and the target point corresponding to the first point set; determining the target point corresponding to the second point set as a static point, and the second point set is the point set corresponding to the minimum deviation degree among the n point sets; determining the points other than the static points among the N points as dynamic points.
[0011] In one embodiment, the number n of point sets satisfies the following conditions:
[0012]
[0013] In the formula: n represents the number of point sets, w represents the estimated proportion of static points in the target frame point cloud, k represents the number of points in each point set, and p represents the expected probability that the target point corresponding to the second point set is an actual static point.
[0014] In one embodiment, the first threshold satisfies the following condition:
[0015] T = s×σ
[0016] In the formula: T represents the first threshold, s represents a preset value and s is greater than or equal to 3, and σ represents the standard deviation of the radial velocities of the k points in the first point set.
[0017] In one embodiment, the degree of deviation between the k points in the first point set and the target point corresponding to the first point set satisfies the following condition, where the first point set is any one of the point sets:
[0018]
[0019] In the formula: B represents the degree of deviation corresponding to the first point set, m represents the number of points in the target point corresponding to the first point set, V i represents the radial velocity of the i-th point in the target point, represents the average velocity of the radial velocities of the k points corresponding to the first point set.
[0020] In one embodiment, the target object includes a lidar. Obtaining the velocity of the target object based on static points and dynamic points includes: determining the radial velocity of each point in the static points, the first component velocity on each of the three coordinate axes, where the three coordinate axes are the three coordinate axes of the coordinate system of the lidar; determining the first average velocity corresponding to each coordinate axis, where the first average velocity corresponding to the first coordinate axis is the average value of all the first component velocities on the first coordinate axis, and the first coordinate axis is any one of the three coordinate axes; and determining the vector sum of the first average velocities on the three coordinate axes as the velocity of the lidar.
[0021] In one embodiment, the target object includes a dynamic object in a target area. Obtaining the velocity of the target object based on static points and dynamic points includes: determining, from the dynamic points, the point set corresponding to the dynamic object; determining the radial velocity of each point in the point set corresponding to the dynamic object, the second component velocity on each of the three coordinate axes; determining the second average velocity corresponding to each coordinate axis, where the second average velocity corresponding to the first coordinate axis is the average value of all the second component velocities on the first coordinate axis; determining the vector sum of the second average velocities on the three coordinate axes as the first velocity of the dynamic object; and determining the velocity of the dynamic object based on the velocity of the lidar and the first velocity.
[0022] In one embodiment, the dynamic points include a plurality of points. From the dynamic points, determining the points corresponding to the dynamic object includes: dividing the plurality of points in the dynamic points into at least one set, each set including a plurality of points, and the absolute value of the difference in radial velocity between any two points in each set being less than a second threshold; dividing each set into at least one subset, the distance between any two points in each subset being less than a third threshold; and determining the points in each subset as the points corresponding to a dynamic object.
[0023] In a second aspect, an embodiment of the present application provides a velocity calculation device based on lidar point cloud. The device includes units for performing each step of the method described in any one of the above first aspects.
[0024] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method described in any one of the above first aspects is implemented.
[0025] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the above first aspects is implemented.
[0026] In a fifth aspect, an embodiment of the present application provides a chip, including: a processor for calling and running a computer program from a memory, so that a computer device installed with the chip executes the method described in any one of the above first aspects.
[0027] It can be understood that the beneficial effects of the above second aspect to fifth aspect can refer to the relevant descriptions in the above first aspect, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0029] Figure 1 is a schematic diagram of the application environment of a velocity calculation method based on lidar point cloud provided by an embodiment of the present application;
[0030] Figure 2 is an internal structure diagram of a computer device provided by an embodiment of the present application;
[0031] Figure 3It is a schematic flowchart of a speed calculation method based on lidar point cloud provided by an embodiment of the present application;
[0032] Figure 4 It is a schematic diagram of the three-axis coordinate system of the lidar;
[0033] Figure 5 It is a schematic flowchart of obtaining static points and dynamic points in the target frame point cloud in the speed calculation method based on lidar point cloud provided by an embodiment of the present application;
[0034] Figure 6 It is a schematic flowchart of obtaining static points and dynamic points in the target frame point cloud in the speed calculation method based on lidar point cloud provided by another embodiment of the present application;
[0035] Figure 7 It is a result diagram of the static points and dynamic points obtained in the speed calculation method based on lidar point cloud provided by another embodiment of the present application;
[0036] Figure 8 It is a structural block diagram of a detection device based on lidar provided by an embodiment of the present application. Detailed implementation manners
[0037] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are presented to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0038] It should be understood that when used in the specification and appended claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0039] It should also be understood that the term " / and" as used in the specification and appended claims of the present application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0040] As used in the specification of this application and the appended claims, the term "if" can be interpreted as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrases "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined" or "in response to determining" or "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]" depending on the context.
[0041] In addition, in the description of the specification of this application and the appended claims, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0042] The reference to "one embodiment" or "some embodiments" etc. described in the specification of this application means that a specific feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in another way.
[0043] The lidar in the embodiments of this application refers to a velocity-measuring lidar, which can be, for example, an FMCW (Frequency-Modulated Continuous Wave) lidar or an OPA (Optical Phased Array Lidar).
[0044] An embodiment of the present application provides a method for calculating velocity based on lidar point cloud. By obtaining a target frame of point cloud, which is a frame of point cloud obtained by a lidar scanning a target area. The target frame of point cloud includes multiple points, and the information of each point includes position information and radial velocity. Then, static points and dynamic points in the target frame of point cloud are obtained. Static points are points corresponding to static objects in the target area, and dynamic points are points corresponding to dynamic objects in the target area. Finally, according to the static points and dynamic points, the velocity of the target object is determined. The target object includes any object and / or the lidar in the target area. Using a frame of point cloud (i.e., the target frame of point cloud) obtained by scanning the target area with a velocity measurement radar, and dividing the target frame of point cloud into static points and dynamic points, and finally determining the velocity of the target object according to the static points and dynamic points. This method can calculate the velocity for a single frame of point cloud, avoiding the time consumed by waiting for two frames of point cloud. Since point cloud registration is not required, the calculation amount can be greatly reduced, and the problem of difficult velocity determination caused by incomplete "imaging" of the target object in two frames of point cloud can also be avoided. Therefore, the method for calculating velocity based on lidar point cloud in the embodiment of the present application can improve the efficiency and accuracy of velocity calculation.
[0045] Next, a specific embodiment is used to exemplarily illustrate the method for calculating velocity based on lidar point cloud provided by the present application.
[0046] See Figure 1 , which is a schematic diagram of the application environment of the method for calculating velocity based on lidar point cloud provided by an embodiment of the present application. As Figure 1 shown, in this scenario, vehicle 110 is traveling on road 10, and the traveling direction of vehicle 110 is D1. A lidar 111 is installed on vehicle 110, and the lidar 111 scans the objects around vehicle 110. Figure 1 Five scanned points scanned by the lidar 111 are shown. Among the five return points: two scanned points are located on the first object 120, two scanned points are located on the second object 130, and one scanned point is located on the third object 140.
[0047] It should be understood that in the point cloud obtained by the lidar 111 scanning the scanned points, the information corresponding to the scanned points includes the position information and radial velocity of the scanned points, where the radial velocity is the relative velocity between the scanned point and the lidar 111. The direction of the radial velocity is along the line connecting the lidar 111 and the scanned point, and the magnitude of the radial velocity is the difference between the velocity of the lidar 111 and the component of the velocity of the scanned point in the connection direction.
[0048] Exemplarily, when the scanning point moves towards the lidar (i.e., the scanning point approaches the lidar), the sign of the radial velocity of the scan is positive; when the scanning point moves away from the lidar (i.e., the scanning point is far from the lidar), the sign of the radial velocity of the scanning point is negative.
[0049] As Figure 1 shown, the driving directions of the first object 120 and the vehicle 110 are both D1. Since the driving speed of the first object 120 is greater than that of the vehicle 110, the scanning points on the first object 120 are gradually moving away from the lidar 111. Therefore, the signs of the radial velocities of the two scanning points on the first object 120 are negative, and the radial velocities of the two scanning points on the first object 120 are respectively Figure 1 V as shown in r1 and V r2 .
[0050] As Figure 1 shown, the driving direction of the second object 130 is D2, which is opposite to the driving direction D1 of the vehicle 110. The scanning points on the second object 130 are gradually approaching the lidar 111. Therefore, the signs of the velocities of the two scanning points on the second object 130 are positive, and the radial velocities of the two scanning points on the second object 130 are respectively Figure 1 V as shown in r3 and V r4 .
[0051] As Figure 1 shown, the third object 140 is in a stationary state. The scanning points on the third object 140 are gradually approaching the lidar 111. Therefore, the sign of the velocity of the scanning points on the third object 140 is positive. The radial velocities of the two scanning points on the second object 130 are respectively Figure 1 V as shown in r5 .
[0052] For simplicity, Figure 1 only five scanning points are shown in Figure 1 . For other scanning points, no display and description are made. Those skilled in the art can know that a frame of point cloud actually scanned by the lidar will include information of a large number of scanning points. The representation method of the radial velocity corresponding to other scanning points can refer to the representation method of the radial velocity of the scanning points shown in
[0053] In the scenario as Figure 1 shown, in this scenario, a computer device 150 communicatively connected to the lidar 111 is set. The communication connection between the lidar 111 and the computer device 150 can be a wired communication connection or a wireless communication connection. This application does not make specific limitations on this.
[0054] In some embodiments, the computer device 150 receives the point cloud data (i.e., the target frame point cloud) sent by the lidar 111. The target frame point cloud includes a plurality of points, and the information of each point includes position information and radial velocity. The computer device 150 obtains the static points and dynamic points in the target frame point cloud. The static points are the points corresponding to the static objects in the target area, and the dynamic points are the points corresponding to the dynamic objects in the target area. The computer device 150 determines the speed of the target object according to the static points and the dynamic points. The target object includes any object and / or lidar in the target area.
[0055] It can be understood that the computer device 150 can be a local server or a remote server. The computer device 150 can also be set in the vehicle 110, or the computer device can be integrally set in the lidar 111. The embodiments of the present application do not limit this.
[0056] Figure 2 The following is the internal structure diagram of the computer device 150 provided by an embodiment of the present application, as Figure 2 shown. The computer device 150 in this embodiment includes at least one processor 200 ( Figure 2 only one processor is shown in the figure), a memory 201, and a computer program 202 stored in the memory 201 and executable on the at least one processor 200.
[0057] To execute the speed calculation method based on lidar point cloud in the embodiments of the present application, when the processor 200 executes the computer program 202: it obtains the target frame point cloud, which is a frame of point cloud obtained by the lidar scanning the target area. The target frame point cloud includes a plurality of points, and the information of each point includes position information and radial velocity. It obtains the static points and dynamic points in the target frame point cloud. The static points are the points corresponding to the static objects in the target area, and the dynamic points are the points corresponding to the dynamic objects in the target area. It determines the speed of the target object according to the static points and the dynamic points. The target object includes any object and / or lidar in the target area.
[0058] The computer device 150 may include, but is not limited to, the processor 200 and the memory 201. Those skilled in the art can understand that Figure 2 this is only an example of the computer device 150 and does not constitute a limitation on the computer device 150. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0059] The so-called processor 200 may be a Central Processing Unit (CPU), and the processor 200 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0060] The memory 201 may be an internal storage unit in some embodiments, such as a hard disk or memory. The memory 201 may also be an external storage device in other embodiments, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, Flash Card, etc. Further, the memory 201 may include both an internal storage unit and an external storage device. The memory 201 is used to store an operating system, application programs, a BootLoader, data, and other programs, such as the program code of the computer program, etc. The memory 201 may also be used to temporarily store data that has been output or will be output.
[0061] Those skilled in the art can understand that Figure 2 the structure shown in
[0062] is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different component layout. Figure 1 Based on the application scenario schematic diagram of the speed calculation method based on lidar point cloud as shown in Figure 3 a speed calculation method based on lidar point cloud as shown in Figure 1 is provided in an embodiment of the present application. The following takes the application of this method to the scenario in Figure 3 as an example for illustration. It can be understood that the following description is only an example and does not constitute a limitation on the protection scope of the present application. As shown in
[0063] Step S310: Obtain the target frame point cloud. The target frame point cloud is a frame of point cloud obtained by a lidar scanning a target area. The target frame point cloud includes multiple points, and the information of each point includes position information and radial velocity.
[0064] In the embodiments of the present application, the target frame point cloud is a frame of point cloud obtained by a velocity measurement radar scanning a target area. In the target frame point cloud, the information of each point includes both the position information of the scanned point and the radial velocity of the scanned point. The position information may include three-dimensional coordinates, and the radial velocity is the velocity of the scanned point relative to the lidar. For the relevant meaning of the radial velocity, reference can be made to Figure 1 and the related descriptions therein, which will not be elaborated here.
[0065] Step S320: Obtain the static points and dynamic points in the target frame point cloud. The static points are the points corresponding to the static objects in the target area, and the dynamic points are the points corresponding to the dynamic objects in the target area.
[0066] In the embodiments of the present application, after obtaining the target frame point cloud, the points in the target frame point cloud are divided into static points and dynamic points. The scanned points corresponding to the static points are located on the static objects in the target area, while the scanned points corresponding to the dynamic points are located on the dynamic objects in the target area.
[0067] It can be understood that dynamic objects and static objects are relative to the earth coordinate system. When an object is stationary relative to the earth coordinate system, then the object is a static object; when an object is moving relative to the earth coordinate system, then the object is a dynamic object.
[0068] For example, the road surface and roadside signals, etc. are static objects, so the points scanned on the road surface and roadside signal lights are static points; the moving traffic objects (such as cars, pedestrians, etc.) on the road surface are dynamic objects, so the points scanned on the moving traffic objects are dynamic points.
[0069] Step S330: Determine the velocity of the target object according to the static points and dynamic points. The target object includes any object in the target area and / or the lidar.
[0070] It can be understood that the radial velocity included in the information of the points in the target frame point cloud is the relative velocity between the scanned point and the lidar. Since the lidar is moving, the radial velocity of each point in the static points is not zero. The static points have a velocity of 0 relative to the earth coordinate system. Therefore, the velocity of the lidar (i.e., the velocity of the lidar relative to the earth coordinate system) can be determined according to the radial velocity of the static points.
[0071] Exemplarily, the radial velocity of each point in the dynamic points is the velocity of the scanning point relative to the lidar. Therefore, after obtaining the velocity of the lidar, the velocity of the dynamic object (i.e., the velocity of the dynamic object relative to the earth coordinate system) can be determined based on the radial velocity of the dynamic points and the velocity of the lidar.
[0072] It should be understood that the static object is stationary relative to the earth coordinate system. Therefore, the velocity of the static object (i.e., the velocity of the dynamic object relative to the earth coordinate system) is 0.
[0073] In some embodiments, the target object includes a lidar. Obtaining the velocity of the target object based on the static points and the dynamic points includes: determining the radial velocity of each point in the static points, the first component velocity on each of the three coordinate axes, where the three coordinate axes are the three coordinate axes of the coordinate system of the lidar; determining the first average velocity corresponding to each coordinate axis, where the first average velocity corresponding to the first coordinate axis is the average value of all the first component velocities on the first coordinate axis, and the first coordinate axis is any one of the three coordinate axes; and determining the vector sum of the first average velocities on the three coordinate axes as the velocity of the lidar.
[0074] Exemplarily, as Figure 4 shown, the origin of the coordinate system of the lidar is O, and the three coordinate axes are the X-axis, the Y-axis, and the Z-axis respectively. Among them, the X-axis refers to the horizontal scanning direction of the lidar, the Z-axis refers to the vertical scanning direction of the lidar, and the Y-axis refers to the depth direction of the lidar. As Figure 4 shown, assuming that there are n points in the target frame point cloud, and point I is the i-th point in the target frame, and the radial velocity of point I is v i , decompose the velocity v i onto the X-axis, the Y-axis, and the Z-axis. Among them: v iX is the decomposed velocity of the radial velocity of point I on the X-axis, v iY is the decomposed velocity of the radial velocity of point I on the Y-axis, and v iZ is the decomposed velocity of the radial velocity of point I on the Z-axis.
[0075] In this embodiment, by decomposing the radial velocity of each point in the static points onto the three coordinate axes of the coordinate system of the lidar and taking the average value, the average velocity (i.e., the first average velocity) corresponding to each of the three coordinate axes is obtained, and then the vector sum of the three first average velocities is determined to obtain the velocity of the lidar. When determining the velocity of the lidar, the radial velocities of all the static points are considered, so that the obtained velocity of the lidar has a high accuracy.
[0076] In some embodiments, the target object includes a dynamic object in the target area. Obtaining the velocity of the target object based on the static points and dynamic points includes: determining a point set corresponding to the dynamic object from the dynamic points; determining the radial velocity of each point in the point set corresponding to the dynamic object, which is the second component velocity on each of the three coordinate axes; determining the second average velocity corresponding to each coordinate axis, where the second average velocity corresponding to the first coordinate axis is the average value of all the second component velocities on the first coordinate axis; determining the vector sum of the second average velocities on the three coordinate axes as the first velocity of the dynamic object; and determining the velocity of the dynamic object based on the velocity of the lidar and the first velocity. It can be understood that the dynamic object in this embodiment is a rigid body in translation.
[0077] In this embodiment, by decomposing and averaging the radial velocities of the points corresponding to each dynamic object on the three coordinate axes of the lidar coordinate system, the average velocity (i.e., the second average velocity) corresponding to each of the three coordinate axes is obtained. Then, the vector sum of the three second average velocities is determined to obtain the first velocity. Finally, the velocity of the dynamic object is determined based on the velocity of the lidar and the first velocity. Specifically, determining the velocity of the dynamic object can be to find the vector sum of the first velocity and the velocity of the lidar. When determining the velocity of the dynamic object, since the radial velocities of all the points corresponding to the dynamic object are considered, the accuracy of the velocity of the dynamic object obtained is relatively high.
[0078] In some embodiments, the dynamic points include multiple points. Determining the points corresponding to the dynamic object from the dynamic points includes: dividing the multiple points in the dynamic points into at least one set, each set including multiple points, and the absolute value of the difference in radial velocity between any two points in each set is less than a third threshold; dividing each set into at least one subset, and the distance between any two points in each subset is less than a fourth threshold; and determining the points in each subset as the points corresponding to a dynamic object. Among them, the third threshold and the fourth threshold can be set according to needs and experience, and the present application will not elaborate on this.
[0079] It can be understood that after determining the static points in the target frame point cloud, the remaining points in the target frame point cloud are dynamic points. The dynamic points of the target frame may correspond to one or more dynamic objects. Therefore, it is necessary to determine the points of each dynamic object based on the position information (also known as coordinate information) and radial velocity between the points in the dynamic points. First, classify the dynamic points according to whether the radial velocity difference between any two points in the dynamic points meets a certain threshold (i.e., the third threshold). Suppose they are divided into 3 categories, and then perform distance classification (calculate the distance between points according to the coordinate values) separately in the 3 categories. For example, in the first category, the radial velocity of all points is about 20 m / s, but the coordinates of some points in this category are very different from the coordinates of other points, exceeding the given distance threshold (i.e., the fourth threshold). Then it is considered that these are two objects with exactly the same speed. In this embodiment, the points of different dynamic objects in the dynamic are divided by defining two thresholds of radial velocity and distance, and the method is simple and easy to implement.
[0080] In the velocity calculation method based on lidar point cloud in the above embodiment, by dividing a frame of point cloud (i.e., the target frame point cloud) into static points and dynamic points, and determining the velocity of the target object according to the static points and dynamic points. This method can calculate the velocity of the target object using a frame of point cloud, avoiding the time consumed by waiting for two frames of point cloud. Since point cloud registration is not required, the calculation amount can be greatly reduced, and it can also avoid the problem that the velocity is difficult to determine due to the "imaging" incompleteness of the target object in two frames of point cloud. Therefore, the velocity calculation method based on lidar point cloud in the embodiment of the present application can improve the efficiency and accuracy of velocity calculation.
[0081] For the sake of easy understanding, the process of obtaining static points and dynamic points in the target frame point cloud in step S320 is exemplarily described below.
[0082] In some embodiments, the Ransac algorithm can be used to extract the static point cloud.
[0083] It can be understood that the Ransac algorithm can also be called the Random Sample Consensus algorithm. This algorithm assumes that the data is composed of "inliers" and "outliers". "Inliers" represent the data that is expected to be screened out and is the data that can be used for model parameter fitting. "Outliers" generally refer to the noise in the data, which represents the data that is not suitable for the model, such as mis-matches in matching and outliers in the estimated curve.
[0084] In the embodiment of the present application, the radial velocity of each point in the target frame point cloud is used, combined with the Ransac algorithm to achieve the extraction of static points in the point cloud. The "inliers" in the Ransac algorithm are the static points to be extracted, and the "outliers" in the Ransac algorithm are the dynamic points other than the static points in the target frame point cloud.
[0085] It should be understood that the radial velocity of the static points in the target frame point cloud follows a Gaussian distribution. Therefore, the Gaussian model can be used as the model for fitting the inliers in the Ransac algorithm.
[0086] In some embodiments, assuming that the target point cloud includes N points, the process of obtaining static points and dynamic points from the target frame point cloud includes: (1) randomly selecting k points from the N points and considering these k points as static points, where k is an integer greater than 1 and less than N; (2) using the randomly selected k points for Gaussian model fitting; (3) sequentially inputting the radial velocity of each point among the N points except the k points into the Gaussian model. When the distance between the point's radial velocity and the Gaussian model is less than a preset threshold, the point is determined to be a static point; (4) repeating steps (1) to (3) until a certain number of iterations n is reached, and then screening out the model with the smallest error from the n models. The static points determined by the model with the smallest error are the static points we want; (5) determining the points in the target frame point cloud except the static points as dynamic points. In this embodiment, the Ransac algorithm is used to extract static points, and static points can be well obtained.
[0087] Figure 5 It is a schematic diagram of the process of obtaining static points and dynamic points in the target frame point cloud in another embodiment provided by this application. In Figure 5 In the shown embodiment, the target frame point cloud includes N points, where N is an integer greater than 1. The process of determining static points and dynamic points from the target point cloud includes: steps S501 to S506:
[0088] S501. Obtain k points from the N points as a point set, where k is an integer greater than 1 and less than N.
[0089] S502. Determine the average velocity of the radial velocities of the k points in the point set.
[0090] S503. Obtain the target points corresponding to the point set from the N points, and the absolute value of the difference between the radial velocity of the target points corresponding to the point set and the average velocity corresponding to the point set is less than the first threshold.
[0091] In some embodiments, the first threshold can be a preset threshold. The first thresholds corresponding to different point sets can be the same, and the size of the first threshold can be set according to experience.
[0092] In some other embodiments, the first threshold is related to the point set, and each point set corresponds to a first threshold. Taking the first point set as an example, assuming that the average velocity corresponding to the first point set is The first threshold corresponding to the first point set is T, then the radial velocity V of the target point target satisfies the conditions shown in formulas (1) and (2):
[0093]
[0094]
[0095] In Formulas (1) and (2): T represents the first threshold corresponding to the first point set, s represents a preset value and s is greater than or equal to 3, σ represents the standard deviation of the radial velocities of k points in the first point set, represents the average velocity of the radial velocities of k points in the first point set, V target represents the radial velocity of any target point corresponding to the first point set.
[0096] According to Formula (2), it can be known that the target points corresponding to the first point set are the points among the N points whose radial velocities are within the range of plus or minus s times the standard deviation of the average velocity corresponding to the first point set.
[0097] In some embodiments, s is greater than or equal to 3.
[0098] S504. Determine the deviation degree corresponding to the point set. The deviation degree corresponding to the point set is the deviation degree between the k points in the point set and the target points corresponding to the point set.
[0099] Exemplarily, the deviation degree represents the error magnitude between the target points of the point set obtained from the N points and the k points included in the point set. The smaller the error, the greater the probability that the target point is an actual static point.
[0100] In some embodiments, for the deviation degree corresponding to the first point set, where the first point set is any point set, it is obtained according to Formula (3):
[0101]
[0102] In Formula (3): B represents the deviation degree corresponding to the first point set, m represents the number of points in the target points corresponding to the first point set, V i represents the radial velocity of the i-th point in the target points, represents the average velocity of the radial velocities of the k points corresponding to the first point set.
[0103] S505. Determine whether the deviation degree corresponding to the point set is less than or equal to the second threshold. If the judgment is yes, jump to step S506; if the judgment is no, jump to step S501.
[0104] It can be understood that the second threshold can be set according to experience. The deviation degree corresponding to each point set is judged. When the deviation degree is less than the second threshold, the iteration stops. That is, when the deviation degree is less than the second threshold, it is considered that the probability that the obtained target point is a static point is large enough, and thus the target points corresponding to the point sets with a deviation degree less than the second threshold are determined as static points.
[0105] S506. Determine the target points corresponding to the point set as static points, and determine the points among the N points other than the static points as dynamic points.
[0106] In Figure 5 In the illustrated embodiment, when determining the static points, complex operations such as actually fitting the Gaussian model are not performed. Since the average value and standard deviation of a set of data can determine a unique Gaussian function, in the embodiments of the present application, by calculating the average velocity and standard deviation of the radial velocities of k points, and setting a threshold range, the threshold range is: the difference between the average radial velocity and s times the standard deviation to the sum of the average radial velocity and s times the standard deviation. It only needs to be determined whether the radial velocity of each point among the N points is within the threshold range. The points within the threshold range are static points, and the points not within the threshold range are dynamic points. By this method, the amount of computation can be greatly reduced.
[0107] In addition, since the data within the range of the difference between the average value and 3 times the standard deviation to the sum of the average value and 3 times the standard deviation (i.e., average velocity ± 3 times the standard deviation) of the Gaussian function accounts for 99.7% of the total data volume, setting s greater than or equal to 3 can ensure that the target points can include most of the static points among the N points.
[0108] Figure 5 In the illustrated embodiment, the number of iterations is determined by continuously judging whether the deviation degree corresponding to the point set is less than the second threshold. The second threshold can be set according to experience and needs and will not be elaborated here. Determining the number of iterations through the threshold makes the iteration result controllable.
[0109] Figure 6 This is a schematic diagram of the process of obtaining static points and dynamic points in the target frame point cloud in step S320 provided in another embodiment of the present application. In this embodiment, the number of iterations is determined in advance as n, and the specific process includes: steps S601 to S606:
[0110] S601. Each time, obtain k points from the N points as a point set, and obtain n point sets, where k is an integer greater than 1 and less than N, and n is an integer greater than or equal to 1.
[0111] It can be understood that each time k points are obtained from the N points as a point set, and a total of n times are obtained, so n point sets are obtained.
[0112] It should be understood that n is the pre-determined number of iterations. In some embodiments, the number of iterations n can be set according to experience.
[0113] In some other embodiments, the number of iterations n can be determined according to Equation (4):
[0114]
[0115] In formula (4): n represents the number of iterations or can also be referred to as the number of point sets, w represents the estimated proportion of static points in the target frame point cloud, k represents the number of points in each point set, and p represents the expected probability that the target point corresponding to the second point set is an actual static point.
[0116] It can be understood that w represents the estimated proportion of static points in the target frame point cloud, which is obtained by prediction, and w is equal to the ratio of the number of predicted static points to the total number of points in the target frame point cloud.
[0117] S602. Determine the average velocity of the radial velocities of the k points in each point set.
[0118] S603. Obtain the target points corresponding to each point set from the N points. The absolute value of the difference between the radial velocity of the target point corresponding to the first point set and the average velocity corresponding to the first point set is less than the first threshold, and the first point set is any one of the n point sets.
[0119] It should be understood that the definition and related setting method of the first threshold in this embodiment can be referred to as described in step S503, and will not be elaborated here.
[0120] S604. Determine the deviation degree corresponding to each point set. The deviation degree corresponding to the first point set is the deviation degree between the k points in the first point set and the target point corresponding to the first point set.
[0121] It should be understood that the definition and related setting method of the deviation degree in this embodiment can be referred to as described in step S504, and will not be elaborated here.
[0122] S605. Determine the target point corresponding to the second point set as a static point, and the second point set is the point set corresponding to the minimum deviation degree among the n point sets.
[0123] S606. Determine the points among the N points other than the static points as dynamic points.
[0124] In Figure 6 In the shown embodiment, the number of iterations is preset, so the preset number of iterations can be directly performed, and the method is simple and easy to implement.
[0125] Figure 7 For Figure 6 the result obtained from the process of obtaining static points and dynamic points in the shown embodiment, as Figure 7 shown, where the lighter-colored points represent the identified static points and the darker-colored points represent the identified dynamic points, as Figure 7As shown, it can be clearly recognized that the points in the dynamic points belong to two dynamic objects, proving that the recognition effect of the process of obtaining static points and dynamic points in the embodiments of the present application is good.
[0126] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0127] Corresponding to the method for speed calculation based on lidar point cloud in the above embodiments, Figure 7 The block diagram of the speed calculation device based on lidar point cloud provided by an embodiment of the present application is shown. For the convenience of description, only the parts related to the embodiments of the present application are shown.
[0128] Referring to Figure 8 , the speed calculation device 800 based on lidar point cloud includes: a first acquisition unit 810, a second acquisition unit 820, and a determination unit 830, where:
[0129] The first acquisition unit 810 is configured to acquire a target frame point cloud. The target frame point cloud is a frame of point cloud obtained by scanning a target area by a lidar. The target frame point cloud includes a plurality of points, and the information of each point includes position information and radial velocity;
[0130] The second acquisition unit 820 is configured to acquire static points and dynamic points in the target frame point cloud. The static points are the points corresponding to static objects in the target area, and the dynamic points are the points corresponding to dynamic objects in the target area;
[0131] The determination unit 830 is configured to determine the speed of the target object according to the static points and the dynamic points. The target object includes any object in the target area and / or the lidar.
[0132] In one embodiment, the target frame point cloud includes N points, where N is an integer greater than 1. The second acquisition unit 820 is configured to acquire static points and dynamic points in the target frame point cloud, including: acquiring k points from the N points as a point set, where k is an integer greater than 1 and less than N; determining the average speed of the radial velocities of the k points in the point set; acquiring target points corresponding to the point set from the N points, and the absolute value of the difference between the radial velocity of the target point corresponding to the point set and the average speed corresponding to the point set is less than a first threshold; determining the deviation degree corresponding to the point set, and the deviation degree corresponding to the point set is the deviation degree between the k points in the point set and the target point corresponding to the point set; if the deviation degree corresponding to the point set is less than or equal to a second threshold, then determining the target point corresponding to the point set as a static point, and determining the points other than the static points among the N points as dynamic points; if the deviation degree corresponding to the point set is greater than the second threshold, then jumping to the step of acquiring k points from the N points as a point set.
[0133] In one embodiment, the target frame point cloud includes N points, where N is an integer greater than 1. The second acquisition unit 820 is configured to acquire static points and dynamic points in the target frame point cloud, including: each time k points are acquired from the N points as a point set, and n point sets are obtained, where k is an integer greater than 1 and less than N, and n is an integer greater than or equal to 1; determining the average velocity of the radial velocities of the k points in each point set; acquiring target points corresponding to each point set from the N points, and the absolute value of the difference between the radial velocity of the target point corresponding to the first point set and the average velocity corresponding to the first point set is less than a first threshold, where the first point set is any one of the n point sets; determining the deviation degree corresponding to each point set, and the deviation degree corresponding to the first point set is the deviation degree between the k points in the first point set and the target point corresponding to the first point set; determining the target point corresponding to the second point set as a static point, where the second point set is the point set corresponding to the minimum deviation degree among the n point sets; and determining the points other than the static points among the N points as dynamic points.
[0134] In one embodiment, the number n of point sets satisfies the following condition:
[0135]
[0136] In the formula: n represents the number of point sets, w represents the estimated proportion of static points in the target frame point cloud, k represents the number of points in each point set, and p represents the expected probability that the target point corresponding to the second point set is an actual static point.
[0137] In one embodiment, the first threshold satisfies the following condition:
[0138] T = s×σ
[0139] In the formula: T represents the first threshold, s represents a preset value and s is greater than or equal to 3, and σ represents the standard deviation of the radial velocities of the k points in the first point set.
[0140] In one embodiment, the deviation degree between the k points in the first point set and the target point corresponding to the first point set satisfies the following condition, where the first point set is any point set:
[0141]
[0142] In the formula: B represents the deviation degree corresponding to the first point set, m represents the number of points in the target point corresponding to the first point set, V i represents the radial velocity of the i-th point in the target point, represents the average velocity of the radial velocities of the k points corresponding to the first point set.
[0143] In one embodiment, the target object includes a lidar. The determining unit 830 is configured to obtain the speed of the target object according to static points and dynamic points, including: determining the radial speed of each point in the static points, and the first component speed on each of the three coordinate axes, where the three coordinate axes are the three coordinate axes of the coordinate system of the lidar; determining the first average speed corresponding to each coordinate axis, where the first average speed corresponding to the first coordinate axis is the average value of all the first component speeds on the first coordinate axis, and the first coordinate axis is any one of the three coordinate axes; and determining the vector sum of the first average speeds on the three coordinate axes as the speed of the lidar.
[0144] In one embodiment, the target object includes a dynamic object in a target area. The determining unit 830 is configured to obtain the speed of the target object according to static points and dynamic points, including: determining a point set corresponding to the dynamic object from the dynamic points; determining the radial speed of each point in the point set corresponding to the dynamic object, and the second component speed on each of the three coordinate axes; determining the second average speed corresponding to each coordinate axis, where the second average speed corresponding to the first coordinate axis is the average value of all the second component speeds on the first coordinate axis; determining the vector sum of the second average speeds on the three coordinate axes as the first speed of the dynamic object; and determining the speed of the dynamic object according to the speed of the lidar and the first speed.
[0145] In one embodiment, the dynamic points include multiple points. The determining unit 830 is configured to determine a point corresponding to a dynamic object from the dynamic points, including: dividing the multiple points in the dynamic points into at least one set, where each set includes multiple points, and the absolute value of the difference in the radial speeds of any two points in each set is less than a third threshold; dividing each set into at least one subset, where the distance between any two points in each subset is less than a fourth threshold; and determining the points in each subset as the points corresponding to a dynamic object.
[0146] An embodiment of the present application further provides a computer device, including a memory and a processor. A computer program is stored in the memory, and when the computer program is executed by the processor, the steps in the above method embodiments can be implemented.
[0147] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented: obtaining a target frame of point cloud, where the target frame of point cloud is a frame of point cloud obtained by a lidar scanning a target area. The target frame of point cloud includes multiple points, and the information of each point includes position information and radial velocity; obtaining static points and dynamic points in the target frame of point cloud, where the static points are the points corresponding to static objects in the target area, and the dynamic points are the points corresponding to dynamic objects in the target area; determining the velocity of a target object according to the static points and the dynamic points, where the target object includes any object in the target area and / or the lidar.
[0148] In one embodiment, the target frame of point cloud includes N points, where N is an integer greater than 1. When the computer program is executed by the processor, the following steps are implemented: obtaining k points from the N points as a point set, where k is an integer greater than 1 and less than N; determining the average velocity of the radial velocities of the k points in the point set; obtaining a target point corresponding to the point set from the N points, where the absolute value of the difference between the radial velocity of the target point corresponding to the point set and the average velocity corresponding to the point set is less than a first threshold; determining the deviation degree corresponding to the point set, where the deviation degree corresponding to the point set is the deviation degree between the k points in the point set and the target point corresponding to the point set; if the deviation degree corresponding to the point set is less than or equal to a second threshold, then determining the target point corresponding to the point set as a static point, and determining the points other than the static points among the N points as dynamic points; if the deviation degree corresponding to the point set is greater than the second threshold, then jumping to the step of obtaining k points from the N points as a point set.
[0149] In one embodiment, the target frame of point cloud includes N points, where N is an integer greater than 1. When the computer program is executed by the processor, the following steps are implemented: each time obtaining k points from the N points as a point set, obtaining n point sets, where k is an integer greater than 1 and less than N, and n is an integer greater than or equal to 1; determining the average velocity of the radial velocities of the k points in each point set; obtaining a target point corresponding to each point set respectively from the N points, where the absolute value of the difference between the radial velocity of the target point corresponding to the first point set and the average velocity corresponding to the first point set is less than the first threshold, and the first point set is any one of the n point sets; determining the deviation degree corresponding to each point set respectively, where the deviation degree corresponding to the first point set is the deviation degree between the k points in the first point set and the target point corresponding to the first point set; determining the target point corresponding to the second point set as a static point, where the second point set is the point set corresponding to the minimum deviation degree among the n point sets; determining the points other than the static points among the N points as dynamic points.
[0150] In one embodiment, the number n of point sets satisfies the following conditions:
[0151]
[0152] Where: n represents the number of point sets, w represents the estimated proportion of static points in the target frame point cloud, k represents the number of points in each point set, and p represents the expected probability that the target point corresponding to the second point set is an actual static point.
[0153] In one embodiment, the first threshold satisfies the following condition:
[0154] T = s × σ
[0155] Where: T represents the first threshold, s represents a preset value and s is greater than or equal to 3, and σ represents the standard deviation of the radial velocities of the k points in the first point set.
[0156] In one embodiment, the degree of deviation between the k points in the first point set and the target point corresponding to the first point set satisfies the following condition, where the first point set is any one of the point sets:
[0157]
[0158] Where: B represents the degree of deviation corresponding to the first point set, m represents the number of points in the target point corresponding to the first point set, V i represents the radial velocity of the i-th point in the target point, represents the average velocity of the radial velocities of the k points corresponding to the first point set.
[0159] In one embodiment, the target object includes a lidar. When the computer program is executed by a processor, the following steps are implemented: determining the radial velocity of each point in the static points, the first component velocity on each of the three coordinate axes, where the three coordinate axes are the three coordinate axes of the coordinate system of the lidar; determining the first average velocity corresponding to each coordinate axis, where the first average velocity corresponding to the first coordinate axis is the average value of all the first component velocities on the first coordinate axis, and the first coordinate axis is any one of the three coordinate axes; determining the vector sum of the first average velocities on the three coordinate axes as the velocity of the lidar.
[0160] In one embodiment, the target object includes a dynamic object in the target area. When the computer program is executed by a processor, the following steps are implemented: determining, from the dynamic points, the point set corresponding to the dynamic object; determining the radial velocity of each point in the point set corresponding to the dynamic object, the second component velocity on each of the three coordinate axes; determining the second average velocity corresponding to each coordinate axis, where the second average velocity corresponding to the first coordinate axis is the average value of all the second component velocities on the first coordinate axis; determining the vector sum of the second average velocities on the three coordinate axes as the first velocity of the dynamic object; and determining the velocity of the dynamic object based on the velocity of the lidar and the first velocity.
[0161] In one embodiment, the dynamic points include multiple points. When the computer program is executed by a processor, the following steps are implemented: dividing the multiple points in the dynamic points into at least one set, each set including multiple points, and the absolute value of the difference in radial velocity between any two points in each set being less than a third threshold; dividing each set into at least one subset, the distance between any two points in each subset being less than a fourth threshold; and determining the points in each subset as the points corresponding to a dynamic object.
[0162] For each step implemented when the processor executes the computer program in this embodiment, the implementation principle and technical effect are similar to those of the above-mentioned velocity calculation method based on lidar point cloud, and will not be elaborated here.
[0163] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In practical applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiment and will not be elaborated here.
[0164] This application embodiment also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in each of the above method embodiments can be implemented.
[0165] This application embodiment provides a computer program product. When the computer program product runs on a computer device, it enables the computer device to implement the steps in each of the above method embodiments when executed.
[0166] This application embodiment also provides a chip, including: a processor for calling and running a computer program from a memory, so that the computer device installed with the chip executes the steps in each of the above method embodiments.
[0167] In the above embodiments, the descriptions of each embodiment have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0168] Those of ordinary skill in the art will realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0169] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may 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 coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the apparatus or unit can be in an electrical, mechanical or other form.
[0170] 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 can be 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 of this embodiment.
[0171] In addition, the functional units in each embodiment of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more 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.
[0172] When the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of this application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable storage medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice within the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.
[0173] The above-described embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for velocity calculation based on lidar point cloud, characterized in that, The method includes: Obtaining a target frame point cloud, which is a frame of point cloud obtained by a lidar scanning a target area. The target frame point cloud includes a plurality of points, and the information of each point includes position information and radial velocity; Obtaining static points and dynamic points in the target frame point cloud. The static points are the points corresponding to static objects in the target area, and the dynamic points are the points corresponding to dynamic objects in the target area; Determining the velocity of a target object according to the static points and the dynamic points. The target object includes any object in the target area and / or the lidar.
2. The method according to claim 1, characterized in that The target frame point cloud includes N points, where N is an integer greater than 1. The obtaining of the static points and dynamic points in the target frame point cloud includes: Obtaining k points from the N points as a point set, where k is an integer greater than 1 and less than N; Determining the average velocity of the radial velocities of the k points in the point set; Obtaining target points corresponding to the point set from the N points. The absolute value of the difference between the radial velocity of the target point corresponding to the point set and the average velocity corresponding to the point set is less than a first threshold; Determining the deviation degree corresponding to the point set. The deviation degree corresponding to the point set is the deviation degree between the k points in the point set and the target point corresponding to the point set; If the deviation degree corresponding to the point set is less than or equal to a second threshold, then determining the target point corresponding to the point set as the static point, and determining the points other than the static point among the N points as the dynamic points; If the deviation degree corresponding to the point set is greater than the second threshold, then jumping to the step of obtaining k points from the N points as a point set.
3. The method according to claim 1, wherein The target frame point cloud includes N points, where N is an integer greater than 1. The obtaining of the static points and dynamic points in the target frame point cloud includes: Each time, obtaining k points from the N points as a point set, and obtaining n point sets, where k is an integer greater than 1 and less than N, and n is an integer greater than or equal to 1; Determining the average velocity of the radial velocities of the k points in each point set; Obtaining target points corresponding to each point set respectively from the N points. The absolute value of the difference between the radial velocity of the target point corresponding to the first point set and the average velocity corresponding to the first point set is less than the first threshold. The first point set is any one of the n point sets; Determining the deviation degree corresponding to each point set respectively. The deviation degree corresponding to the first point set is the deviation degree between the k points in the first point set and the target point corresponding to the first point set; Determining the target point corresponding to the second point set as the static point. The second point set is the point set corresponding to the minimum deviation degree among the n point sets; Determining the points other than the static point among the N points as the dynamic points.
4. The method according to claim 3, wherein The number n of the point sets satisfies the following conditions: In the formula: n represents the number of point sets, w represents the estimated proportion of static points in the target frame point cloud, k represents the number of points in each point set, and p represents the expected probability that the target point corresponding to the second point set is an actual static point.
5. The method according to any one of claims 2 to 4, characterized in that The first threshold satisfies the following conditions: T = s×σ Where: T represents the first threshold, s represents a preset value and s is greater than or equal to 3, and σ represents the standard deviation of the radial velocities of k points in the first point set.
6. The method according to any one of claims 2 to 4, characterized in that, The deviation degree between the k points in the first point set and the target point corresponding to the first point set satisfies the following conditions, and the first point set is any point set: Where: B represents the deviation degree corresponding to the first point set, m represents the number of points in the target points corresponding to the first point set, V i represents the radial velocity of the i-th point in the target points, represents the average velocity of the radial velocities of the k points corresponding to the first point set.
7. The method according to any one of claims 2 to 4, characterized in that The target object includes a lidar, and obtaining the speed of the target object according to the static points and the dynamic points includes: Determining the radial velocity of each point in the static points, the first component velocity on each of the three coordinate axes, and the three coordinate axes are the three coordinate axes of the coordinate system of the lidar; Determining the first average velocity corresponding to each coordinate axis, and the first average velocity corresponding to the first coordinate axis is the average value of all the first component velocities on the first coordinate axis, and the first coordinate axis is any one of the three coordinate axes; Determining the vector sum of the first average velocities on the three coordinate axes as the speed of the lidar.
8. The method according to claim 7, wherein The target object includes a dynamic object in the target area, and obtaining the speed of the target object according to the static points and the dynamic points includes: Determining, from the dynamic points, a point set corresponding to the dynamic object; Determining the radial velocity of each point in the point set corresponding to the dynamic object, the second component velocity on each of the three coordinate axes; Determining the second average velocity corresponding to each coordinate axis, and the second average velocity corresponding to the first coordinate axis is the average value of all the second component velocities on the first coordinate axis; Determining the vector sum of the second average velocities on the three coordinate axes as the first speed of the dynamic object; Determining the speed of the dynamic object according to the speed of the lidar and the first speed.
9. The method according to claim 8, wherein The dynamic points include multiple points, and determining, from the dynamic points, a point corresponding to the dynamic object includes: Dividing the multiple points in the dynamic points into at least one set, each set includes multiple points, and the absolute value of the difference between the radial velocities of any two points in each set is less than the third threshold; Dividing each set into at least one subset, and the distance between any two points in each subset is less than the fourth threshold; Determining the points in each subset as the points corresponding to a dynamic object.
10. A velocity calculation device based on lidar point cloud, characterized in that, The device includes units for performing each step of the method according to any one of claims 1 to 9.
11. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1 to 9 is implemented.