Speed measurement method and device and computer readable storage medium
By performing multiple scans in the lidar and calculating the object speed using time difference and pixel point offset, the measurement inaccuracy problem of lidar under the influence of relative motion is solved, and high-precision position and velocity output is achieved, reducing cost and power consumption.
Patent Information
- Application Number
- CN202410070763.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-17
- Publication Date
- 2025-07-18
AI Technical Summary
Existing lidars are difficult to obtain the relative motion between objects and lidar in a timely manner, which affects the accuracy of path planning.
By performing multiple scans within the same frame, using the time difference between the two scans and the offset of pixel points, combined with clustering algorithms or linear interpolation, the movement speed of the target detecting object is calculated.
It improves the measurement accuracy of the lidar, reduces cost and power consumption, and can output the position and speed information of the object at the same time.
Smart Images

Figure CN120334937A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of lidar, and particularly relates to a speed measurement method, device, and computer-readable storage medium. Background Art
[0002] Currently, autonomous driving widely uses sensors to obtain detection information of the surrounding environment for planning the driving route of a vehicle. Among them, lidar, as a type of sensor, is widely used in autonomous driving.
[0003] A lidar is a radar system that emits laser signals to detect the positions of various objects in a target scene. Its working principle is to emit laser signals (detection signals) to target detection objects in the target scene, and then compare the received echo signals reflected from the target detection objects with the emitted laser signals to obtain relevant information about the target detection objects.
[0004] However, how to timely obtain the relative motion between an object and the lidar to improve the accuracy of path planning remains an urgent problem to be solved. Summary of the Invention
[0005] Embodiments of this application provide a speed measurement method, device, and computer-readable storage medium, which can improve the measurement accuracy of the lidar and reduce the influence of the relative motion between the target detection object and the lidar on the measurement result.
[0006] In a first aspect, a speed measurement method is provided, which is applied to a lidar. The method includes: performing a first scan on a target detection object at a first moment to obtain the position of a first target point on the target detection object;
[0007] performing a second scan on the target detection object at a second moment to obtain the position of a second target point on the target detection object; wherein, the first target point corresponds to the second target point, the second moment is later than the first moment, and the time difference between the first moment and the second moment is less than or equal to the time corresponding to one scan frame;
[0008] determining the moving speed of the target detection object according to the position of the first target point, the position of the second target point, and the time difference between the first moment and the second moment.
[0009] Optionally, the moving speed of the target detection object includes the lateral speed, longitudinal speed, and radial speed of the target detection object.
[0010] Optionally, the determining the moving speed of the target detection object according to the position of the first target point, the position of the second target point, and the time difference between the first moment and the second moment includes:
[0011] Take the ratio of the position difference to the time difference as the moving speed of the target detection object, where the position difference is the difference between the position of the first target point and the position of the second target point.
[0012] Optionally, according to the method of any one of claims 1 to 3, characterized in that
[0013] The first scanning of the target detection object at the first moment to obtain the position of the first target point on the target detection object includes:
[0014] At the first moment, perform a first scan on the target detection object to obtain the first measurement information of multiple pixel points corresponding to the target detection object;
[0015] Process the first measurement information through a clustering algorithm to obtain the position of the first target point;
[0016] The second scanning of the target detection object at the second moment to obtain the position of the second target point on the target detection object includes:
[0017] At the second moment, perform a second scan on the target detection object to obtain the second measurement information of multiple pixel points corresponding to the target detection object;
[0018] Process the second measurement information through a clustering algorithm to obtain the position of the second target point, and the positions of the first target point and the second target point are both used to indicate the position of the target detection object.
[0019] Optionally, the first scanning of the target detection object at the first moment to obtain the position of the first target point on the target detection object includes:
[0020] At the first moment, perform a first scan on the target detection object through the first channel to obtain the position of the first pixel point, and perform a scan on the target detection object through the second channel to obtain the position of the second pixel point, where the first pixel point corresponds to the second pixel point;
[0021] Perform n times of linear interpolation based on the position of the first pixel point and the position of the second pixel point to obtain the positions of n third pixel points, and the n third pixel points are located between the first pixel point and the second pixel point;
[0022] Take the i-th third pixel point among the n third pixel points as the first target point, where n and i are integers greater than or equal to 1, and i is less than or equal to n;
[0023] The second scanning of the target detection object at the second moment to obtain the position of the second target point on the target detection object includes:
[0024] At this second moment, the target detection object is second-scanned through the first channel to obtain the position of a fourth pixel point, and, the target detection object is second-scanned through the second channel to obtain the position of a fifth pixel point, where the fourth pixel point corresponds to the fifth pixel point;
[0025] Based on the positions of the fourth pixel point and the fifth pixel point, n linear interpolations are performed to obtain the positions of n sixth pixel points, and the n sixth pixel points are located between the fourth pixel point and the fifth pixel point;
[0026] The i-th pixel point among the n sixth pixel points is used as the second target point.
[0027] Optionally, the position of the i-th third pixel point among the n third pixel points, the position of the first pixel point, and the position of the second pixel point satisfy the following relationship:
[0028]
[0029] where, (x i , y i , z i ) represents the position of the i-th third pixel point, (x a , y a , z a ) represents the position of the first pixel point, and (x b , y b , z b ) represents the position of the second pixel point;
[0030] The position of the i-th sixth pixel point among the n sixth pixel points, the position of the fourth pixel point, and the position of the fifth pixel point satisfy the following relationship:
[0031]
[0032] where, (x i , y i , z i ) represents the position of the i-th sixth pixel point, (x a , y a , z a ) represents the position of the fourth pixel point, and (x b , y b , z b ) represents the position of the fifth pixel point.
[0033] Optionally, the first pixel point, the second pixel point, the fourth pixel point, and the fifth pixel point are all boundary points of the target detection object.
[0034] In a second aspect, a speed measurement device is provided, which includes:
[0035] A scanning module, configured to perform a first scan on a target detection object at a first moment to obtain the position of a first target point on the target detection object;
[0036] The scanning module is further configured to perform a second scan on the target detection object at a second moment to obtain the position of a second target point on the target detection object; wherein, the first target point corresponds to the second target point, the second moment is later than the first moment, and the time difference between the first moment and the second moment is less than or equal to the time corresponding to one scanning frame;
[0037] A speed measurement module, configured to determine the moving speed of the target detection object according to the position of the first target point, the position of the second target point, and the time difference between the first moment and the second moment.
[0038] In a third aspect, an embodiment of the present application provides a speed measurement device, including: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded and executed by the processor to perform the method described in any one of the first aspects.
[0039] In a fourth aspect, an embodiment of the invention of the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method described in any one of the above.
[0040] The beneficial effects brought by the technical solutions provided in some embodiments of the present application at least include:
[0041] In summary, the method provided in the above embodiments of the present application can output the position information and speed information of an object simultaneously after scanning the same object twice, which not only has high measurement accuracy, but also reduces costs and power consumption. Specifically, the method provided in the embodiments of the present application completes one frame or multiple frames of scanning by using the method of interpolation rescan. Due to the time difference caused by the rescan interval, the pixel points obtained by measuring a moving object will exhibit the jelly effect. Based on this, the moving speed of the target detection object can be determined by combining the time difference of multiple scans and the position deviation caused by the jelly effect with an external algorithm. Since this method determines the speed based on the results of multiple rescans within one frame or multiple frames, the position information and speed information of the object can be output simultaneously. At the same time, the measurement accuracy of lidar is relatively high, so the accuracy of the speed determined according to the measurement results of lidar is also relatively high. Moreover, this method does not need to obtain the speed of the target detection object by means of FMCW, so the cost and power consumption can be reduced. Description of the Drawings
[0042] 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, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0043] Figure 1 shows a schematic diagram of the measurement results of multiple pixel points obtained after scanning a static and dynamic square object;
[0044] Figure 2 shows a comparison diagram of the measurement results of a stationary object and a moving object;
[0045] Figure 3 shows an exemplary flowchart of method 100 provided by an embodiment of the present application;
[0046] Figure 4 shows a schematic diagram of the detection field of view provided by an embodiment of the present application;
[0047] Figure 5 In (a) shows a schematic diagram of the detection field of view corresponding to two adjacent scans of the central detection field of view provided by an embodiment of the present application;
[0048] Figure 5 In (b) shows a schematic diagram of the detection field of view corresponding to two adjacent scans of the edge detection field of view provided by an embodiment of the present application;
[0049] Figure 6 shows a schematic diagram of the transmitting device provided by an embodiment of the present application;
[0050] Figure 7 shows a schematic structural diagram of a speed measurement device provided by an embodiment of the present application;
[0051] Figure 8 shows a schematic structural diagram of another speed measurement device provided by an embodiment of the present application. Detailed implementation manners
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0053] In the description of the specification, claims and the above-mentioned drawings of this application, terms such as "first", "second", "third", "fourth" and other various term labels (if any) are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. 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 limit 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.
[0054] In the description of the embodiments of this application, unless otherwise specified, " / " means "or". For example, A / B can mean A or B; "and / or" herein is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "a plurality of" or "multiple" means two or more than two.
[0055] The specific operation methods in the method embodiments of this application can also be applied to the device embodiments or system embodiments.
[0056] In the description of this application, unless otherwise specified, the meaning of "multiple" is two or more than two.
[0057] In each embodiment of this application, if there is no special specification and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.
[0058] It can be understood that the various numerical numbers involved in this application are only for the convenience of description and do not limit the scope of this application. The magnitude of the serial numbers of the above-mentioned processes does not mean the sequence of execution. The execution sequence of each process should be determined according to its function and internal logic.
[0059] Autopilot widely uses sensors to obtain detection information of the surrounding environment, so as to plan the driving route of the vehicle. For example, in the field of autopilot, the perception system can obtain detection information of objects (such as vehicles or pedestrians) in the surrounding environment through sensors, so as to plan the driving route of the vehicle itself. Therefore, how to obtain the position information and speed information of objects more timely and accurately has become an urgent problem to be solved.
[0060] In one implementation, the position information and velocity information of surrounding objects can be obtained by a millimeter-wave radar (including a 4D millimeter-wave radar). However, the resolution of the millimeter-wave radar is relatively limited, making it difficult to accurately identify various targets.
[0061] In another implementation, the position and velocity of surrounding objects can be obtained by a frequency modulated continuous wave (FMCW) lidar. However, the FMCW lidar needs to use the 1550 band for measurement, so both the cost and power consumption are relatively high. In addition, the FMCW radar is mainly used to obtain the longitudinal (i.e., distance direction) velocity information of an object, and it is difficult to obtain the lateral and radial motion information of the object. Therefore, it cannot fully meet the usage requirements.
[0062] In view of this, the embodiments of the present application provide a speed measurement method applicable to a time of flight (TOF) lidar, which can obtain the position information and velocity information of an object without relying on the FMCW method. Therefore, it can not only ensure high accuracy but also reduce the cost and power consumption. Among them, the lidar described in the embodiments of the present application is an active remote sensing device using a laser as the emission light source and adopting photoelectric detection technology means. Its working principle is to emit laser pulses (detection signals) to the target detection object in the target scene, compare the received echo signal reflected from the target detection object with the emitted laser pulse, output the corresponding electrical signal, and then the signal processing unit appropriately processes the electrical signal to form a point cloud. By processing the point cloud, parameters such as the distance, azimuth, height, velocity, attitude, and shape of the target object can be obtained, thereby realizing the laser detection function, and then it can be applied to scenarios such as navigation avoidance, obstacle recognition, ranging, speed measurement, and autonomous driving of products such as automobiles, robots, logistics vehicles, and inspection vehicles.
[0063] Specifically, in the speed measurement method provided by the embodiments of the present application, by continuously performing at least two scans, based on the principle that the pixel points obtained by scanning a moving object will shift, the motion speed of the object is determined according to the position deviation indicated by at least two consecutive scan results and the time difference between at least two consecutive scans. The following will first be briefly described in combination with Figure 1 and Figure 2 for a brief explanation.
[0064] Figure 1(a) in it shows the measurement results of multiple pixel points obtained after scanning a static object. In this example, the target static object is measured through multiple scans simultaneously. Since there is a certain time difference (assumed to be τ) between adjacent scans of the lidar along the first direction, the initial scan times of the scan lines corresponding to adjacent scans are different. In the figure, it is assumed that the initial times of three adjacent scans are t1, t2, and t3 respectively. Therefore, the time differences between t2 and t1 and between t3 and t2 are both τ. From Figure 1 it can be seen from (a) in it that the pixel points in the point cloud obtained by scanning the static object can form a very regular shape.
[0065] However, after the above-mentioned detected object moves, the shape of the pixel points in the scanned point cloud will shift, as shown in Figure 1 (b) of. Assume that the object moves horizontally to the right at a speed of v. Since the time t2 is later than the time t1, there is a certain amount of movement of the object during this time difference; similarly, there is also a certain amount of movement of the object during the time difference between t3 and t2. Therefore, it will cause the pixel points of the point cloud corresponding to a single channel to shift, as shown in Figure 1 (b) of. The pixel points corresponding to a single channel will shift as a whole in the movement direction of the object.
[0066] The solution provided by the embodiments of the present application can determine the speed of the moving object based on the problem that the pixel points in the echo point cloud corresponding to the moving object are shifted. Please refer to Figure 2 where Figure 2 the pixel points in the point cloud scanned by channel #1 are taken as an example for illustration.
[0067] Take the first pixel point in the second row (denoted as point a) as an example. In Figure 2 (a) of it, the position of point a when the detected object is static is marked. In Figure 2 (b) of it, the position of point a when the detected object is in a moving state is marked. It can be seen from the figure that when the detected object is in a moving state, the position of point a shifts to the right, and this shift is caused by the movement of the detected object during the time difference between t1 and t2. Because if the object does not move between t1 and t2, the shape of the scanned pixel points should be as shown in Figure 2 (a) of it. However, due to the time difference τ, after the object completes the scanning of the first row of pixel points at time t1, the object moves horizontally by (τ×v), and then the scanning of the second row of pixel points starts. Therefore, based on this principle, according to the time difference τ and the deviation of the position of a certain fixed point in the object point cloud measured before and after the time difference τ, the moving speed v of the object can be calculated. The following combines Figure 3The method 100 in [the relevant context] will be described in detail for the speed measurement method provided in the embodiments of this application. It can be understood that the method 100 can be executed by the lidar or by some modules on the lidar, and this application does not make any limitations. For convenience, here the lidar executing the method 100 is taken as an example for illustration.
[0068] As Figure 3 shown, the method 100 includes the following steps:
[0069] S110, at a first moment, perform a first scan on the target detection object to obtain the position of the first target point on the target detection object.
[0070] Exemplarily, at the first moment, the lidar emits at least one laser pulse to detect the objects in the target area, and obtains the pixel points of the echo point cloud corresponding to the objects in the target area. Among them, each pixel point corresponds to the measurement information of the object, and the measurement information includes the position information and reflectivity information of the object.
[0071] Among them, the at least one laser pulse is the emitted laser pulse corresponding to at least one emission channel of the lidar at the first moment. It can be understood that the number of the at least one laser pulse corresponds to the number of parallel channels emitted at the first moment.
[0072] It can be understood that in this application, there is no limitation on the type of the target detection object. For example, the target object can be a pedestrian, a vehicle or other detection objects. Optionally, there is no unique limitation on the movement direction and movement mode of the detection object in this application.
[0073] Among them, it can be understood that different laser pulses correspond to different emission angles, and different scans correspond to different emission moments. One frame of detection can include at least two scans, and the detection field of view formed by at least two scans is the detection field of view of the radar. It can be understood that there is an overlap in the detection fields of view of two adjacent scans among the at least two scans.
[0074] The emission time of each of the multiple laser pulses is different. That is to say, the lidar applicable to the embodiments of this application can measure the objects in the target area by emitting multiple laser pulses at different times. In one example, the multiple laser pulses correspond to different emission angles, and there is an overlap in the fields of view of two adjacent scans, that is, the fields of view of the two detections can cover the same target object. Among them, it can be understood that as an optional implementation manner, the size of the overlapping area of the fields of view of the two detections is related to the field of view area where the detection field of view is located. For example, the radar has a central detection field of view and an edge detection field of view. The central detection field of view refers to the central detection area that the driver is concerned about. For example, as Figure 4As shown, the vertical central detection field of view of the radar can be -15° to 15°, and the vertical edge detection field of view can be -25° to -15° and 15° to 25°. Among them, as Figure 5 shown in (a) of Figure 5 , the overlapping area of the central detection field of view between two adjacent detection fields of view is 50%. As shown in (b) of Figure 5 , the overlapping area of the edge detection field of view between two adjacent detection fields of view is 30%. Among them, it can be understood that specifically, the central detection field of view and the edge detection field of view can be segmented according to the detection requirements. It can be understood that the overlapping degree of the central detection field of view between two adjacent detection fields of view can also be set according to the detection requirements. For example, in the area with high detection requirements, the overlapping degree of adjacent fields of view is high. In the area with low detection requirements, the overlapping degree of adjacent fields of view is low. Among them, the detection requirements can be set according to the scenario. The detection requirements can be set according to the device.
[0075] Among them, it can be understood that by setting different detection fields of view and the overlapping degree of the detection fields of view between two adjacent detections in different detection fields of view, the detection accuracy of the central detection field of view can be improved while ensuring the detection range at the same point frequency.
[0076] Among them, it can be understood that the design of the overlapping degree of two adjacent transmissions in different regions of the detection field of view can be carried out according to different detection requirements. It can be understood that the overlapping degree of the detection fields of view between two adjacent scans of the current frame can also be adjusted according to the detection results based on historical frames. This application does not limit this. Among them, it can be understood that when the radar has a scanning device, such as a galvanometer mirror, a polygon mirror or a driving device. Then, the overlapping degree of the detection fields of view between two adjacent scans can be adjusted by adjusting the scanning speed of the galvanometer mirror, the polygon mirror or the driving device. When the radar does not have a scanning device, the overlapping degree of the detection fields of view between two adjacent scans can be adjusted by the overlapping degree of different selected laser emitters.
[0077] Among them, the lidar may include a scanning device. For example, the lidar makes the emitted light beam cover multiple angles through the combination of one or more of a galvanometer mirror, a polygon mirror, a prism or a rotating platform. There is a certain time difference between the laser pulses emitted by the lidar at different angles. Among them, as Figure 6As shown, the lidar can also be a pure solid-state lidar. For example, the lidar can form a detection field of view by one-dimensional or two-dimensional addressing and emission of the emission device. It can be understood that the detection fields of view formed by adjacent emissions can be partially overlapped by partial overlap of the blocks of the emission device gated each time. The angles of the detection fields of view formed by each emission are different. Specifically, the lidar in the embodiments of the present application can be, for example, a micro-electro-mechanical system (MEMS) lidar, a mechanical lidar, or other semi-solid-state lidars, or solid-state lidars, etc.
[0078] It can be understood that, in an alternative embodiment, the lidar can have a scanning device only in one direction. For example, there can be a galvanometer mirror, a vibrating mirror, or a scanning platform, etc. only in the horizontal direction or the vertical direction. Optionally, the lidar can also have scanning devices in both the horizontal and vertical directions. For example, a scanning field of view can be formed by a rotating platform in the horizontal direction and a vibrating mirror in the vertical direction. Another example is that a scanning field of view can be formed by a galvanometer mirror in the horizontal direction and a vibrating mirror in the vertical direction. The present application does not limit the specific type of the scanning device in each direction.
[0079] Hereinafter, an example will be given in which the lidar emits laser pulses at multiple angles by the cooperation of two scanning parts. The scanning part can be a galvanometer mirror or a vibrating mirror. The present application does not uniquely limit the form of the scanning part. Assume that the single-channel scanning method of the lidar is: the fast axis jumps back and forth from left to right as the slow axis jumps from top to bottom. The fast axis corresponds to the first scanning part and is used for rotation around the Z axis; the slow axis corresponds to the second scanning part and is used for rotation around the X axis. The scanning trajectory is shown in Table 1. In Table 1, yaw represents the angle of rotation around the Z axis (i.e., the horizontal rotation angle), and pitch represents the angle of rotation around the X axis (i.e., the pitch rotation angle). y1, y2,..., yn are n angles from left to right, and p1, p2,..., pm are m angles from top to bottom. The values in the table represent the scanning order. All pixel points at each slow axis angle are in one row, with a total of m rows, and all pixel points at each fast axis angle are in one column, with a total of n columns.
[0080] Table 1
[0081]
[0082]
[0083] It can be understood that the scanning method shown in Table 1 is only an example, and the data arrangement structure can be appropriately adjusted under other scanning methods.
[0084] It should be noted that the carrier of the lidar in this application can be in a moving state or a stationary state, and this application does not limit this.
[0085] Furthermore, based on the measurement information of multiple pixel points corresponding to the target detection object obtained by scanning, determine the position of the first target point, where the first target point can be any point on the target detection object. For example, the first target point can be the center point, corner point or boundary point of the target detection object.
[0086] S120, perform a second scan on the target detection object at a second moment to obtain the position of the second target point on the target detection object.
[0087] Exemplarily, after the first scan is completed, the lidar performs a second scan on the target detection object at a second moment, where the second moment is later than the first moment, and the time difference (denoted as τ) between the first moment and the second moment is less than or equal to the time corresponding to one scan frame.
[0088] That is to say, the first scan and the second scan are two scans that scan the same object (i.e., the above-mentioned target detection object), and the scan time interval is less than or equal to the time corresponding to one scan frame.
[0089] In a possible implementation, the first scan and the second scan belong to the same scan frame. That is to say, the lidar performs multiple scans continuously within the same frame, including the first scan and the second scan. This application does not limit the number of scans of the lidar within one frame, and the number of scans within one frame can be set according to actual needs. In one implementation, the first scan and the second scan are two adjacent scans among multiple scans. It can be understood that there is an overlapping area of the detection field of view between the first scan and the second scan.
[0090] In another possible implementation, the first scan and the second scan belong to two adjacent scan frames. That is to say, the lidar scans the same object twice within two adjacent scan frames. For example, in a system with reverse scanning, the first scan can be the last scan corresponding to the first frame scan, and the second scan can be the first scan corresponding to the second frame scan. That is, there is an overlapping area of the detection field of view between the first scan and the second scan, and both the first scan and the second scan scan the same detection object. It can be understood that the specific method of the second scan is similar to that of the first scan, and for the sake of brevity, it will not be elaborated here.
[0091] This application does not limit the specific implementation method for the lidar to determine whether the same object is scanned in two scans. In one example, obtain the first scan result of the first scan, then obtain the first scan area where the number of echo points in the first scan result is greater than a preset number, and determine the first average value of the reflectivity of the corresponding points in the first scan area; obtain the second scan result of the second scan, then obtain the second scan area where the number of echo points in the second scan result is greater than a preset number, and determine the second average value of the reflectivity of the corresponding points in the second scan area; if the difference between the first average value and the second average value is within a preset range, it is determined that the first scan result of the first scan and the second scan detect the same object. In another example, obtain the first scan result of the first scan, and then calculate the average distance of the measured distances of each column of pixel points in the first scan result respectively to obtain a plurality of first average distances; similarly, obtain the second scan result of the second scan, and then calculate the average distance of the measured distances of each column of pixel points in the second scan result respectively to obtain a plurality of second average distances, and the plurality of first average distances correspond to the plurality of second average distances one by one. Subtract the first average distance from the corresponding second average distance to obtain a plurality of distance differences. If the number of distance differences whose absolute values are less than or equal to the first threshold among the plurality of distance differences is greater than or equal to the second threshold, it is determined that the first scan and the second scan detect the same object.
[0092] In addition, the second target point corresponds to the first target point. For example, if the first target point is the center point of the target detection object calculated based on the scan result of the first scan, the second target point should be the center point of the target detection object calculated based on the scan result of the second scan.
[0093] The following introduces the specific implementation methods for determining the first target point and the second target point in combination with two examples.
[0094] In one possible implementation (denoted as Solution 1), the first target point and the second target point are points used to represent the position of the target detection object.
[0095] For example, the lidar performs a first scan on the target detection object at the first moment to obtain the first measurement information of a plurality of pixel points corresponding to the target detection object, and then processes the first measurement information through a clustering algorithm to obtain the position of the first target point. Among them, the position of the first target point can be represented by a coordinate point (x1, y1, z1) for example.
[0096] Similarly, the lidar performs a second scan on the target detection object at the second moment to obtain the second measurement information of a plurality of pixel points corresponding to the target detection object; then processes the second measurement information through a clustering algorithm to obtain the position of the second target point. The position of the second target point can be represented by a coordinate point (x2, y2, z2) for example.
[0097] In another possible implementation (denoted as Solution 2), the first target point and the second target point are fixed points on the target detection object obtained by interpolation. Since the lidar may not scan the same points each time it scans the target detection object, if the speed of the target detection object is calculated simply based on two corresponding pixel points obtained from two scans (such as the first point in the first row obtained from the first scan and the first point in the first row obtained from the second scan), the result may not be very accurate. However, the point obtained by taking the difference between two pixel points measured through two channels can be regarded as a rigid point on the object. Therefore, determining the speed of the object based on this rigid point can improve the accuracy of the result.
[0098] For example, at the first moment, the lidar performs a first scan on the target detection object through the first channel to obtain the position of the first pixel point, and, through the second channel, performs a scan on the target detection object to obtain the position of the second pixel point, where the first pixel point corresponds to the second pixel point. That is to say, the lidar simultaneously scans the target detection object through the first channel and the second channel, and then takes one point each from the scan results of the first channel and the second channel, namely the first pixel point and the second pixel point, and the first pixel point and the second pixel point are corresponding points, or rather, the scanning times corresponding to the first pixel point and the second pixel point are exactly the same. Taking Figure 1 as an example of (b) in it, the first pixel point is, for example, the first pixel point in the first row corresponding to Channel #1, and the second pixel point is the first pixel point in the first row corresponding to Channel #2.
[0099] Further, based on the positions of the first pixel point and the second pixel point, n times of linear interpolation are performed to obtain the positions of n third pixel points, and the n third pixel points are located between the first pixel point and the second pixel point. Then any one of the n third pixel points can be used as the first target point. For example, the i-th third pixel point among the n third pixel points is used as the first target point, where n and i are integers greater than or equal to 1, and i is less than or equal to n.
[0100] Specifically, for example, assuming (x a , y a , z a ) is the position of the first pixel point, and (x b , y b , z b ) is the position of the second pixel point, then the position (x i , y i , z i ) of the i-th third pixel point among the n third pixel points can be calculated by the following formula:
[0101]
[0102] Similarly, at the second moment, the lidar performs a second scan on the target detection object through the first channel to obtain the position of the fourth pixel point, and performs a second scan on the target detection object through the second channel to obtain the position of the fifth pixel point, where the fourth pixel point corresponds to the fifth pixel point.
[0103] Furthermore, based on the positions of the fourth pixel point and the fifth pixel point, n linear interpolations are performed to obtain the positions of n sixth pixel points, and the n sixth pixel points are located between the fourth pixel point and the fifth pixel point. Since the second target point corresponds to the first target point, the i-th pixel point among the n sixth pixel points is taken as the second target point.
[0104] Specifically, for example, assuming (x a , y a , z a ,) is the position of the fourth pixel point, and (x b , y b , z b ,) is the position of the fifth pixel point, then the position (x i , y i , z i ,) of the i-th sixth pixel point among the n sixth pixel points can be calculated by the following formula:
[0105]
[0106] It can be understood that if the object is stationary, theoretically, the positions of (x i , y i , z i ,) and (x i , y i , z i ) are the same. That is to say, (x i , y i , z i ) can be understood as the theoretical position of the second target point scanned at the second moment when the target detection object is stationary, and (x i , y i , z i ,) can be understood as the actual position of the second target point scanned at the second moment when the target detection object is moving.
[0107] In a possible implementation, the first pixel point, the second pixel point, the fourth pixel point, and the fifth pixel point are all boundary points of the target detection object. That is to say, the method provided in the embodiments of the present application can estimate the speed of the target detection object by using the unique deformation of the pixel point edge corresponding to the moving object.
[0108] Wherein, the coordinates of each pixel point here include the coordinates of three dimensions in a three-dimensional coordinate system. Therefore, it is also possible to calculate only the speed in a certain dimension. As another embodiment of the present application, it is possible to calculate the speeds in two certain dimensions. As another embodiment of the present application, it is also possible to calculate the speeds in three-dimensional directions. The present application does not limit this.
[0109] S130. Determine the moving speed of the target detection object according to the positions of the first target point and the second target point and the time difference between the first moment and the second moment.
[0110] Exemplarily, after determining the positions of the first target point and the second target point, the lidar determines the moving speed of the target object according to these two positions and the time difference τ between the first moment and the second moment. For example, the ratio of the position difference to the time difference is used as the moving speed of the target detection object, and the position difference is the difference between the position of the first target point and the position of the second target point.
[0111] As an example, the moving speed of the target detection object includes the lateral speed, the longitudinal speed, and the radial speed of the target detection object. Among them, the lateral speed refers to the speed at which the target detection object moves in the horizontal direction relative to the lidar, the longitudinal speed refers to the speed at which the target detection object moves towards the lidar (i.e., the speed in the distance direction), and the radial speed refers to the speed at which the target detection object moves in the vertical direction.
[0112] The following makes an exemplary description of the specific implementation manner of calculating the moving speed of the target detection object in combination with the above-mentioned Solution 1 and Solution 2.
[0113] Corresponding to the above-mentioned Solution 1: The positions of the first target point and the second target point are (x1, y1, z1) and (x2, y2, z2) respectively. Therefore, the moving speed of the target detection object can be calculated by the following formula:
[0114]
[0115] Wherein, V x represents the lateral speed of the target detection object, V y represents the longitudinal speed of the target detection object, and Vz represents the radial speed of the target detection object.
[0116] Corresponding to the above Solution 2: The positions of the first target point (the i-th third pixel point among n third pixel points) and the second target point (the i-th pixel point among n sixth pixel points) are respectively (x i , y i , z i ), and (x i , y i , z i ). Therefore, the moving speed of the target detection object can be calculated by the following formula:
[0117]
[0118] That is
[0119]
[0120] As an embodiment of the present application, after determining the moving speed of the target detection object, the position information and speed information of the target detection object are output. It can be understood that the lidar can output the position information and speed information of the target detection object after completing the second scan and going through the above calculation process. At this time, the scan frame where the second scan is located may not have been scanned completely. That is to say, it is not necessary to wait until all scans within the scan frame are scanned completely. As long as the first scan and the second scan scan the same object, and the time difference between the first scan and the second scan is less than or equal to the time corresponding to one scan frame, the moving speed of the target detection object can be immediately calculated based on the scan results of these two scans, and then the position information and speed information of the target detection object are output in a timely manner, thereby improving the real-time performance of the output position information and speed information.
[0121] As another embodiment of the present application, when the speed information of the same object is output twice in consecutive multiple scans, if the two speed information is different, the acceleration information of this object can also be output based on multiple scans.
[0122] In summary, the method provided by the above embodiments of the present application can output the position information and velocity information of the same object after scanning it twice, which not only has high measurement accuracy, but also reduces costs and power consumption. Specifically, the method provided by the embodiments of the present application completes one-frame scanning by using the method of interpolation rescan. In one frame, due to the time difference caused by the rescan interval, the pixel points obtained by measuring a moving object will exhibit the jelly effect. Based on this, the moving speed of the target detection object can be determined by combining the time difference between multiple scans and the position deviation caused by the jelly effect with an external algorithm. Since this method determines the speed based on the results of multiple rescan within one frame or multiple frames, the position information and velocity information of the object can be output simultaneously. At the same time, the measurement accuracy of lidar is relatively high, so the accuracy of the speed determined according to the measurement results of lidar is also relatively high. Moreover, this method does not need to obtain the speed of the target detection object by means of FMCW, so costs and power consumption can be reduced.
[0123] Corresponding to the methods given in the above method embodiments, the embodiments of the present application also provide corresponding devices, which include modules corresponding to the above respective method embodiments. The module can be software, hardware, or a combination of software and hardware. It can be understood that the technical features described in the above method embodiments also apply to the following device embodiments. Therefore, the content not described in detail can be referred to the above method embodiments. For the sake of brevity, it will not be repeated here.
[0124] Figure 7 The structural block diagram of the device 700 provided by the embodiments of the present application is shown. For the convenience of description, only the parts related to the embodiments of the present application are shown. Refer to Figure 7 and the device may specifically include the following modules:
[0125] A scanning module 710, configured to perform a first scan on a target detection object at a first moment to obtain the position of a first target point on the target detection object;
[0126] The scanning module 710 is further configured to perform a second scan on the target detection object at a second moment to obtain the position of a second target point on the target detection object; wherein, the first target point corresponds to the second target point, the second moment is later than the first moment, and the time difference between the first moment and the second moment is less than or equal to the time corresponding to one scan frame;
[0127] A speed measurement module 720, configured to determine the moving speed of the target detection object according to the position of the first target point, the position of the second target point, and the time difference between the first moment and the second moment.
[0128] It should be noted that for the information interaction, execution process, etc. between the above-mentioned devices / units, since they are based on the same concept as the method embodiments of this application, for their specific functions and the technical effects brought, reference can be specifically made to the method and system embodiment parts, and details will not be elaborated here.
[0129] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above-mentioned division of each functional unit and module is used as an example for illustration. In actual applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be 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 in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned 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 embodiments, and details will not be elaborated here.
[0130] As Figure 8 shown, an embodiment of this application also provides a device 800, which includes: at least one processor 810, a memory 820, and a computer program 821 stored in the memory and executable on at least one processor. When the processor executes the computer program, the steps in any of the above method embodiments are implemented.
[0131] An embodiment of this application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above method embodiments can be implemented.
[0132] An embodiment of this application provides a computer program product. When the computer program product runs on an electronic device, it enables the mobile terminal to implement the steps in the above method embodiments when executed.
[0133] When the integrated 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-mentioned embodiment methods of this application, a computer program can be used to instruct the relevant hardware to complete. 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-mentioned 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 forms, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.
[0134] In the above embodiments, the descriptions of the respective embodiments each have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0135] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in this article 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. Professional technicians 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.
[0136] In the embodiments provided in this application, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are only illustrative. For example, the division of modules or 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 the devices or units can be in an electrical, mechanical or other forms.
[0137] The unit described as a separation component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed across 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.
[0138] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described 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 embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A speed measurement method, applied to a lidar, characterized in that The method includes: Performing a first scan on the target detection object at a first moment to obtain the position of a first target point on the target detection object; Performing a second scan on the target detection object at a second moment to obtain the position of a second target point on the target detection object; wherein, the first target point corresponds to the second target point, the second moment is later than the first moment, and the time difference between the first moment and the second moment is less than or equal to the time corresponding to one scan frame; Determining the moving speed of the target detection object according to the position of the first target point, the position of the second target point, and the time difference between the first moment and the second moment.
2. The method according to claim 1, wherein The moving speed of the target detection object includes the lateral speed, longitudinal speed, and radial speed of the target detection object.
3. The method according to claim 1, wherein The determining the moving speed of the target detection object according to the position of the first target point, the position of the second target point, and the time difference between the first moment and the second moment includes: Taking the ratio of the position difference to the time difference as the moving speed of the target detection object, where the position difference is the difference between the position of the first target point and the position of the second target point.
4. The method according to any one of claims 1 to 3, characterized in that The performing a first scan on the target detection object at a first moment to obtain the position of a first target point on the target detection object includes: Performing a first scan on the target detection object at the first moment to obtain first measurement information of a plurality of pixel points corresponding to the target detection object; Processing the first measurement information through a clustering algorithm to obtain the position of the first target point; The performing a second scan on the target detection object at a second moment to obtain the position of a second target point on the target detection object includes: Performing a second scan on the target detection object at the second moment to obtain second measurement information of a plurality of pixel points corresponding to the target detection object; Processing the second measurement information through a clustering algorithm to obtain the position of the second target point, and the positions of the first target point and the second target point are both used to indicate the position of the target detection object.
5. The method according to any one of claims 1 to 3, characterized in that The performing a first scan on the target detection object at a first moment to obtain the position of a first target point on the target detection object includes: At the first moment, performing a first scan on the target detection object through a first channel to obtain the position of a first pixel point, and performing a scan on the target detection object through a second channel to obtain the position of a second pixel point, where the first pixel point corresponds to the second pixel point; Performing n times of linear interpolation based on the position of the first pixel point and the position of the second pixel point to obtain the positions of n third pixel points, and the n third pixel points are located between the first pixel point and the second pixel point; Take the i-th third pixel point among the n third pixel points as the first target point, where n and i are integers greater than or equal to 1, and i is less than or equal to n; The second scanning of the target detection object at the second moment to obtain the position of the second target point on the target detection object includes: At the second moment, perform a second scan on the target detection object through the first channel to obtain the position of the fourth pixel point, and perform a second scan on the target detection object through the second channel to obtain the position of the fifth pixel point, where the fourth pixel point corresponds to the fifth pixel point; Perform n linear interpolations based on the position of the fourth pixel point and the position of the fifth pixel point to obtain the positions of n sixth pixel points, and the n sixth pixel points are located between the fourth pixel point and the fifth pixel point; Take the i-th pixel point among the n sixth pixel points as the second target point.
6. The method according to claim 5, wherein The position of the i-th third pixel point among the n third pixel points, the position of the first pixel point, and the position of the second pixel point satisfy the following relationship: where (x i , y i , z i ) represents the position of the i-th third pixel point, (x a , y a , z a ) represents the position of the first pixel point, and (x b , y b , z b ) represents the position of the second pixel point; The position of the i-th sixth pixel point among the n sixth pixel points, the position of the fourth pixel point, and the position of the fifth pixel point satisfy the following relationship: Among them, (x i ’, y i ’, z i ’) represents the position of the i-th sixth pixel point, (x a ’, y a ’, z a ’) represents the position of the fourth pixel point, and (x b ’, y b ’, z b ’) represents the position of the fifth pixel point.
7. The method according to claim 5, wherein The first pixel point, the second pixel point, the fourth pixel point, and the fifth pixel point are all boundary points of the target detection object.
8. A speed measuring device, characterized in that, It includes: A scanning module for performing a first scan on a target detection object at a first moment to obtain the position of a first target point on the target detection object; The scanning module is further configured to perform a second scan on the target detection object at a second moment to obtain the position of a second target point on the target detection object; wherein, the first target point corresponds to the second target point, the second moment is later than the first moment, and the time difference between the first moment and the second moment is less than or equal to the time corresponding to one scanning frame; A speed measurement module for determining the moving speed of the target detection object according to the position of the first target point, the position of the second target point, and the time difference between the first moment and the second moment.
9. A speed measuring device, characterized in that, It includes: A processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded and executed by the processor to perform the method steps of any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the speed measurement method according to any one of claims 1 to 7.