A laser radar point cloud processing method, device, storage medium and terminal device
By identifying and deleting isolated noise in the lidar point cloud, the problem of affecting the quality of the lidar point cloud is solved, and the effect of improving the quality and stability of the point cloud is achieved.
Patent Information
- Application Number
- CN201910814746.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-30
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2039-08-30
AI Technical Summary
There are many isolated noises in the lidar point cloud, affecting the quality of the point cloud.
By obtaining the original lidar point cloud, determining the target data points in the pending data point queue, calculating the distance between the target data points and other data points, counting the number less than the threshold, and deleting the target data points when the number is less than the preset number to remove isolated noise.
It effectively reduces isolated noise in the lidar point cloud, improves point cloud quality, and ensures the stability of point cloud images.
Smart Images

Figure CN112526545B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to a laser radar point cloud processing method, device, computer-readable storage medium and terminal device. Background Art
[0002] The point cloud of LiDAR is generally obtained based on the TOF (Time of Flight) principle, that is, the detection signal (laser) is emitted to the target through the transmitter, and the echo signal reflected from the target is received by using highly sensitive silicon photomultiplier tubes SiPM (Silicon photomultiplier) and other devices as photodetectors, and then the received echo signal is compared with the detection signal to obtain the point cloud corresponding to the target. Although the use of SiPM devices as photodetectors can greatly improve the detection capability of LiDAR, it also generates more false echo signals, which causes more isolated noise points in the spatial point cloud, affecting the quality of the point cloud. Summary of the invention
[0003] The embodiments of the present application provide a laser radar point cloud processing method, apparatus, computer-readable storage medium and terminal device, which can solve the problem of a large number of isolated noise points in the laser radar point cloud, which affects the quality of the point cloud.
[0004] In a first aspect, an embodiment of the present application provides a laser radar point cloud processing method, comprising:
[0005] Obtaining an original laser radar point cloud, and obtaining a first queue of data points to be processed from the original laser radar point cloud;
[0006] Determining a first target data point in the first queue of data points to be processed;
[0007] Calculating a first distance between the first target data point and other data points in the first queue of data points to be processed, and counting a first number of the first distances being less than a first threshold;
[0008] When the first number is less than a preset number, the first target data point is deleted from the original lidar point cloud to obtain a target lidar point cloud.
[0009] In a possible implementation manner of the first aspect, before obtaining a first queue of data points to be processed from the original lidar point cloud, the method includes:
[0010] Acquire a second queue of data points to be processed from the original laser radar point cloud;
[0011] Determine a second target data point in the second queue of data points to be processed, and determine whether the second target data point meets a first preset condition;
[0012] If the second target data point does not meet the first preset condition, obtaining a first candidate data point in the second queue of data points to be processed that meets the first preset condition;
[0013] Determine a first number corresponding to each of the first candidate data points and a second number corresponding to the second target data point;
[0014] It is determined whether the first candidate data point satisfies a second preset condition according to a size relationship between each of the first numbers and the second numbers.
[0015] Optionally, after determining whether the first candidate data point satisfies a second preset condition, the method further comprises:
[0016] If the first candidate data points satisfy the second preset condition, determining a maximum first candidate data point and a minimum first candidate data point among the first candidate data points;
[0017] Calculating a second distance between the maximum first candidate data point and the minimum first candidate data point;
[0018] If the second distance is less than a second threshold, calculating a first average value corresponding to the first candidate data point;
[0019] The second target data point is interpolated using the first average value to obtain an interpolated original lidar point cloud.
[0020] In a possible implementation manner of the first aspect, before acquiring the first queue of data points to be processed from the original lidar point cloud, the method further includes:
[0021] Acquire a third queue of data points to be processed from the original laser radar point cloud;
[0022] Determine a third target data point in the third queue of data points to be processed, and calculate a third distance between the third target data point and other data points in the third queue of data points to be processed;
[0023] Determine the slopes corresponding to the third target data point and other data points in the third queue of data points to be processed according to the third distances;
[0024] The third target data point is smoothed according to the slope and the third queue of data points to be processed to obtain a smoothed original lidar point cloud.
[0025] Optionally, the step of smoothing the third target data point according to the slope and the third queue of data points to be processed to obtain a smoothed original laser radar point cloud comprises:
[0026] Determine a slope range to which the slope belongs, and obtain a second number of data points corresponding to the slope range;
[0027] Selecting the second number of second candidate data points from the third queue of data points to be processed according to a preset selection method;
[0028] Acquire a third candidate data point that satisfies a first preset condition from among the second candidate data points;
[0029] Determine a maximum third candidate data point and a minimum third candidate data point among the third candidate data points;
[0030] Calculating a fourth distance between the maximum third candidate data point and the minimum third candidate data point;
[0031] If the fourth distance is less than the third threshold, the second average value corresponding to the third candidate data point is calculated, and the third target data point is updated using the second average value to obtain a smoothed original lidar point cloud.
[0032] In a possible implementation manner of the first aspect, determining, according to each of the third distances, a slope corresponding to the third target data point and each other data point in the third queue of data points to be processed includes:
[0033] determining a maximum distance and a minimum distance among the third distances;
[0034] The distance difference between the maximum distance and the minimum distance is calculated, and the distance difference is determined as the slope corresponding to the third target data point and other data points in the third queue of data points to be processed.
[0035] In a second aspect, an embodiment of the present application provides a laser radar point cloud processing device, comprising:
[0036] An original point cloud acquisition module, used to acquire an original laser radar point cloud and obtain a first queue of data points to be processed from the original laser radar point cloud;
[0037] A first target data point determination module, used to determine a first target data point in the first queue of data points to be processed;
[0038] A first quantity counting module, used for calculating a first distance between the first target data point and other data points in the first queue of data points to be processed, and counting a first quantity of the first distance being less than a first threshold;
[0039] The first target data point deletion module is used to delete the first target data point from the original laser radar point cloud when the first number is less than a preset number to obtain a target laser radar point cloud.
[0040] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the laser radar point cloud processing method as described in any one of the first aspects above is implemented.
[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the laser radar point cloud processing method as described in any one of the first aspects above.
[0042] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the lidar point cloud processing method described in any one of the first aspects above.
[0043] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0044] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0045] In an embodiment of the present application, an original lidar point cloud is first obtained, and a first queue of data points to be processed is obtained from the original lidar point cloud; secondly, a first target data point in the first queue of data points to be processed is determined; subsequently, a first distance between the first target data point and each of the other data points in the first queue of data points to be processed can be calculated, and a first number of the first distances less than a first threshold value can be counted; when the first number is less than a preset number, the first target data point is deleted from the original lidar point cloud to obtain a target lidar point cloud, thereby accurately determining isolated noise points in the original lidar point cloud, and deleting the isolated noise points, so as to effectively reduce the isolated noise points in the lidar point cloud, improve the quality of the lidar point cloud, and thus ensure the stability of the point cloud image. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0047] Figure 1 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0048] Figure 2 It is a flowchart of a laser radar point cloud processing method provided in one embodiment of the present application;
[0049] Figure 3 is a schematic diagram of a laser radar performing point cloud scanning provided by an embodiment of the present application;
[0050] Figure 4 It is a schematic diagram of the flow of interpolation processing of a laser radar point cloud processing method provided by an embodiment of the present application in an application scenario;
[0051] Figure 5 It is a schematic diagram of a flow chart of a laser radar point cloud processing method provided in an embodiment of the present application for smoothing in an application scenario;
[0052] Figure 5a It is a flowchart of smoothing the laser radar point cloud processing method provided by an embodiment of the present application in another application scenario;
[0053] Figure 6 It is a structural schematic diagram of the laser radar point cloud processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may 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 prevent unnecessary details from obstructing the description of the present application.
[0055] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of 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 combinations thereof.
[0056] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0057] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0058] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0059] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0060] The laser radar point cloud processing method provided in the embodiment of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific type of terminal devices.
[0061] Figure 1 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 1 As shown, the terminal device 1 of this embodiment includes: at least one processor 10 ( Figure 1 Only one is shown in the figure) a processor, a memory 11, and a computer program 12 stored in the memory 11 and executable on the at least one processor 10, and when the processor 10 executes the computer program 12, the steps in any of the above-mentioned embodiments of the lidar point cloud processing method are implemented.
[0062] The terminal device 1 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 10 and a memory 11. Those skilled in the art will appreciate that Figure 1 It is only an example of the terminal device 1 and does not constitute a limitation on the terminal device 1. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0063] The processor 10 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0064] In some embodiments, the memory 11 may be an internal storage unit of the terminal device 1, such as a hard disk or memory of the terminal device 1. In other embodiments, the memory 11 may also be an external storage device of the terminal device 1, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the terminal device 1. The memory 11 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 11 may also be used to temporarily store data that has been output or is to be output.
[0065] Figure 2 A schematic flow chart of a laser radar point cloud processing method provided in an embodiment of the present application is shown, Figure 2 As shown, the laser radar point cloud processing method includes:
[0066] Step S201, obtaining an original laser radar point cloud, and obtaining a first queue of data points to be processed from the original laser radar point cloud;
[0067] The execution subject of the embodiment of the present application may be a terminal device, which is integrated with a laser scanning device such as a laser radar or the terminal device can be connected to a laser scanning device such as a laser radar. The laser scanning device such as a laser radar may include a laser transmitter, a galvanometer and a photoelectric detector, wherein the laser transmitter acts as a light source to transmit a detection signal (such as a laser point) to the target to be measured, and the photoelectric detector receives the echo signal reflected by the target to be measured, so that the data points corresponding to the target to be measured can be obtained according to the echo signal and the detection signal, and the laser radar point cloud corresponding to the target to be measured can be collected. Here, the galvanometer can be a MEMS galvanometer based on a micro-electro-mechanical system (MEMS), which is used to control the deflection of the laser, thereby realizing the scanning function of a laser device such as a laser radar. The terminal device can obtain the laser radar point cloud scanned and collected by a scanning device such as a laser radar, and the laser radar point cloud is the above-mentioned original laser radar point cloud.
[0068] It should be noted that each data point of the original laser radar point cloud may include a number corresponding to the emission order of the laser points. Figure 3 As shown, in a specific application scenario, the laser radar successively emits laser points 1, 2, 3, 4, 5, 6, 7, 8 and 9 to the target. Therefore, the data point obtained according to laser point 1 is numbered 1, the data point obtained according to laser point 2 is numbered 2, the data point obtained according to laser point 3 is numbered 3, the data point obtained according to laser point 4 is numbered 4, and so on. The data point obtained according to laser point 9 is numbered 9.
[0069] Specifically, after acquiring the original lidar point cloud, the terminal device can obtain a first queue of data points to be processed from the original lidar point cloud, wherein the number of data points in the first queue of data points to be processed can be 9, that is, 9 consecutively numbered data points can be obtained from the original lidar point cloud each time as the first queue of data points to be processed. For example, data points numbered 1 to 9 can be obtained from the original lidar point cloud for the first time as the first queue of data points to be processed, data points numbered 2-10 can be obtained from the original lidar point cloud for the second time as the first queue of data points to be processed, data points numbered 3-11 can be obtained from the original lidar point cloud for the third time as the first queue of data points to be processed, and so on.
[0070] In a possible implementation, a queue buffer may be set in the terminal device, and the buffer quantity of the queue buffer may be set to 9. When acquiring the original lidar point cloud, the data points may be placed in the queue buffer in sequence according to the acquisition order of each data point in the original lidar point cloud, and the data points in the queue buffer may be grouped into the first queue of data points to be processed, that is, the 9 data points in the queue buffer may be grouped into the first queue of data points to be processed. For example, the data points numbered 1-9 can be first placed in the queue buffer in sequence as the first queue of data points to be processed for the first time. After processing the first queue of data points to be processed for the first time, the data point numbered 10 can be placed in the queue buffer. At this time, the data point numbered 1 can be squeezed out of the queue buffer so that the queue buffer has data points numbered 2-10, and the data points numbered 2-10 can be determined as the second first queue of data points to be processed; after processing the second first queue of data points to be processed, the data point numbered 11 can be placed in the queue buffer. At this time, the data point numbered 2 can be squeezed out of the queue buffer so that the queue buffer has data points numbered 3-11, and the data points numbered 3-11 can be determined as the third first queue of data points to be processed, and so on, until all data points in the original lidar point cloud are used as data points in the first queue of data points to be processed.
[0071] It should be understood that the number of data points in the first queue of data points to be processed is 9 for illustrative purposes only and should not be construed as limiting the embodiments of the present application. In the embodiments of the present application, the number of data points in the first queue of data points to be processed may also be determined as 7, 11, or other empirical values. The following will be described in detail with the number of data points in the first queue of data points to be processed being 9, and when the number of data points in the first queue of data points to be processed is 7, 11, or other empirical values, similar processing may be performed with reference to the description of 9.
[0072] Step S202: determining a first target data point in the first queue of data points to be processed;
[0073] In the embodiment of the present application, after acquiring the first queue of data points to be processed, the terminal device can determine the first target data point from the first queue of data points to be processed to perform specific deletion processing. Specifically, the terminal device can determine the first target data point according to the numbers corresponding to the data points in the first queue of data points to be processed, such as determining the data point with a number in the middle position in the first queue of data points to be processed as the first target data point, for example, in the first queue of data points to be processed numbered 1-9, the data point numbered 5 can be determined as the first target data point; in the first queue of data points to be processed numbered 2-10, the data point numbered 6 can be determined as the first target data point, and so on.
[0074] Step S203, calculating a first distance between the first target data point and other data points in the first queue of data points to be processed, and counting a first number of the first distances being less than a first threshold;
[0075] It can be understood that each data point in the original lidar point cloud can include the coordinate value corresponding to the data point, that is, when the terminal device obtains the first queue of data points to be processed, it can immediately obtain the coordinate value corresponding to each data point in the first queue of data points to be processed. Therefore, after the terminal device determines the first target data point, it can calculate the first distance between the first target data point and the other data points in the first queue of data points to be processed according to the coordinate value of each data point, wherein the other data points in the first queue of data points to be processed refer to all data points in the first queue of data points to be processed except the first target data point.
[0076] For example, when data points 1-9 are the first queue of data points to be processed and data point 5 is the first target data point, the first distance between data point 5 and data point 1 can be calculated according to the coordinate value R5 corresponding to data point 5 and the coordinate value R1 corresponding to data point 1, the first distance between data point 5 and data point 2 can be calculated according to the coordinate value R5 corresponding to data point 5 and the coordinate value R2 corresponding to data point 2, the first distance between data point 5 and data point 3 can be calculated according to the coordinate value R5 corresponding to data point 5 and the coordinate value R3 corresponding to data point 3, ..., and the first distance between data point 5 and data point 9 can be calculated according to the coordinate value R5 corresponding to data point 5 and the coordinate value R9 corresponding to data point 9, so that the first distance set {|R5-R1|, |R5-R2|, |R5-R3|, |R5-R4|, |R5-R6|, |R5-R7|, |R5-R8|, |R5-R9|} can be obtained.
[0077] It should be noted that the noise points in the laser radar point cloud often appear randomly, which is consistent with the characteristics of random distribution of spatial point clouds, that is, noise points often appear in isolation in the laser radar point cloud, and there are no other adjacent data points around them. Therefore, a first threshold can be set in advance to determine whether there are adjacent data points around the first target data point, so as to determine whether the first target data point appears isolated in the laser radar point cloud. Here, the first threshold can be between 40 cm and 80 cm. Preferably, the first threshold can be 60 cm, that is, when the distance between the first target data point and a certain data point is less than 60 cm, the data point can be considered as an adjacent data point around the first target data point.
[0078] Specifically, after the terminal device calculates the first distance between the first target data point and other data points in the first queue of data points to be processed, it can count the first number of first distances less than the first threshold, such as the first number of first distances less than 60 centimeters, that is, count the first number of first distances less than 60 centimeters in the first distance set {|R5-R1|, |R5-R2|, |R5-R3|, |R5-R4|, |R5-R6|, |R5-R7|, |R5-R8|, |R5-R9|}.
[0079] Step S204: When the first number is less than a preset number, the first target data point is deleted from the original lidar point cloud to obtain a target lidar point cloud.
[0080] To ensure the accuracy of the determination of isolated noise points, in an embodiment of the present application, a preset number can be set in advance. When the number of adjacent data points around the first target data point is less than the preset number, that is, when the first number obtained by statistics is less than the preset number, the first target data point can be considered to be an isolated noise point; and when the number of adjacent data points around the first target data point is greater than or equal to the preset number, that is, when the first number obtained by statistics is greater than or equal to the preset number, the first target data point can be considered not to be an isolated noise point. Here, the preset number can be preferably set to 3 according to actual conditions, and of course, it can also be set to other empirical values according to actual conditions. After determining that the first target data point is an isolated noise point, the terminal device can delete the first target data point from the original laser radar point cloud, that is, delete the isolated noise points in the original laser radar point cloud, and obtain the target laser radar point cloud, so as to reduce the isolated noise points in the target laser radar point cloud, improve the point cloud quality, and thus ensure the stability of the point cloud image.
[0081] In a possible implementation, there may be missing data points in the original laser radar point cloud collected by a laser scanning device such as a laser radar. To ensure the quality of the point cloud, the embodiment of the present application may also perform interpolation processing on the missing data points in the original laser radar point cloud in advance to complete the original laser radar point cloud. Specifically, Figure 4 As shown, before obtaining the first queue of data points to be processed from the original laser radar point cloud, the following steps may also be included:
[0082] Step S401, obtaining a second queue of data points to be processed from the original laser radar point cloud;
[0083] Here, the number of data points in the second queue of data points to be processed is preferably 5, wherein the method for obtaining the second queue of data points to be processed is similar to the method for obtaining the first queue of data points to be processed described above, and the basic principles are the same, and for the sake of brevity, they will not be repeated here.
[0084] It should be understood that the number of data points in the second queue of data points to be processed is 5 for illustrative purposes only and should not be construed as limiting the embodiments of the present application. In the embodiments of the present application, the number of data points in the second queue of data points to be processed may also be determined as 7, 9, or other empirical values. The following will be described in detail with the number of data points in the second queue of data points to be processed being 5, and when the number of data points in the second queue of data points to be processed is 7, 9, or other empirical values, similar processing may be performed with reference to the description of 5.
[0085] Step S402: determining a second target data point in the second queue of data points to be processed, and determining whether the second target data point satisfies a first preset condition;
[0086] Specifically, the terminal device can determine the second target data point based on the numbers corresponding to the data points in the second queue of data points to be processed. For example, the data point numbered in the middle position in the second queue of data points to be processed can be determined as the second target data point. For example, in the second queue of data points to be processed numbered 1-5, the data point numbered 3 can be determined as the second target data point; in the second queue of data points to be processed numbered 2-6, the data point numbered 4 can be determined as the second target data point, and so on.
[0087] It is understandable that when a laser scanning device such as a laser radar scans a certain position of a target to be measured, if there is a situation such as the laser point emitted by the laser transmitter does not receive the corresponding echo signal, then the data point generated by the position scan will not exist. At this time, the coordinate value corresponding to the data point generated by the position scan can be set to a predetermined value, wherein the predetermined value can be 5555, that is, the coordinate value corresponding to the non-existent data point can be set to 5555 to indicate that the data point generated by the position scan is a lost data point. Here, the first preset condition can specifically be a valid data point, that is, the coordinate value of the data point is not the predetermined value 5555. Exemplarily, after determining the second target data point in the second queue of data points to be processed, it can be determined whether the second target data point meets the first preset condition according to the coordinate value of the second target data point, that is, whether the second target data point is a valid data point.
[0088] It should be understood that the predetermined value of 5555 is only interpreted as an illustrative example and should not be understood as a limitation on the embodiments of the present application. The embodiments of the present application can also be set to other values according to actual needs.
[0089] Step S403: if the second target data point does not satisfy the first preset condition, obtaining a first candidate data point in the second queue of data points to be processed that satisfies the first preset condition;
[0090] It should be noted that if the second target data point does not meet the first preset condition, that is, if the second target data point is not a valid data point but a lost data point, the terminal device can obtain the first candidate data point in the second queue of data points to be processed that meets the first preset condition, that is, obtain the valid data point in the second queue of data points to be processed, that is, the first candidate data point is a valid data point in the second queue to be processed.
[0091] Step S404, determining a first number corresponding to each of the first candidate data points and a second number corresponding to the second target data point;
[0092] Step S405: Determine whether the first candidate data point meets a second preset condition according to the size relationship between the first numbers and the second numbers.
[0093] For the above steps S404 and S405, after acquiring the first candidate data point, the terminal device can further determine whether the first candidate data point meets the second preset condition, so as to determine whether the second target data point needs to be interpolated. Specifically, when the first candidate data point meets the second preset condition, it indicates that the second target data point needs to be interpolated; and when the first candidate data point does not meet the second preset condition, it indicates that the data points on the left and right sides of the second target data point are not from the same object, so there is no need to interpolate the second target data point. At this time, the subsequent operation on the second target data point can be terminated, and the next second target data point can be determined to perform the interpolation operation on the next second target data point.
[0094] Here, the second preset condition can be a condition that needs to be satisfied between the first number corresponding to the first candidate data point and the second number corresponding to the second target data point. Specifically, the second preset condition can be that there must be at least one first number greater than the second number in the first numbers, and there must be at least one first number less than the second number in the first numbers. For example, when data points 1-5 are the second queue of data points to be processed and data point 3 is the second target data point, there must be at least one valid data point in data points 1 and 2, and there must be at least one valid data point in data points 3 and 4, before it can be determined that the first candidate data point meets the second preset condition. Only then can it be considered that data point 3 (i.e., the second target data point) needs to be interpolated, otherwise it can be considered that data point 3 does not need to be interpolated.
[0095] like Figure 4 As shown, if it is determined that the second target data point needs to be interpolated, the embodiment of the present application may further include:
[0096] Step S406: if the first candidate data points satisfy the second preset condition, determining a maximum first candidate data point and a minimum first candidate data point among the first candidate data points;
[0097] Step S407, calculating a second distance between the maximum first candidate data point and the minimum first candidate data point;
[0098] Step S408: If the second distance is less than a second threshold, calculating a first average value corresponding to the first candidate data point;
[0099] Step S409: use the first average value to interpolate the second target data points to obtain an interpolated original lidar point cloud.
[0100] For the above steps S406 to S409, it should be understood that if the terminal device determines that the second target data point needs to be interpolated, it can first determine the maximum first candidate data point and the minimum first candidate data point in the first candidate data points, and then calculate the second distance between the maximum first candidate data point and the minimum first candidate data point. If the second distance is less than the second threshold, wherein the second threshold is preferably 50 cm, it indicates that the first candidate data point can be used to interpolate the second target data point. At this time, the terminal device can calculate the first average value corresponding to the first candidate data point, and can use the first average value to interpolate the second target data point, that is, the first average value can be assigned to the second target data point to complete all missing data points in the original laser radar point cloud through interpolation processing, thereby obtaining the completed original laser radar point cloud. Here, if the second distance is greater than or equal to the second threshold, it can be considered that the data points on the left and right sides of the second target data point are not from the same object, and at this time, the second target data point can be not interpolated.
[0101] Here, the second threshold value is set to 50 centimeters for illustrative purposes only and should not be construed as a limitation to the embodiments of the present application. The embodiments of the present application may also be set to other empirical values according to actual needs.
[0102] In a possible implementation, the jitter characteristics of the original laser radar point cloud collected by a laser scanning device such as a laser radar may cause the distance fluctuation in the laser radar point cloud to be too large, thereby reducing the ranging accuracy of the laser radar point cloud. Therefore, in order to improve the ranging accuracy of the laser radar point cloud and ensure the quality of the point cloud, the embodiment of the present application may also smooth the original laser radar point cloud in advance. Figure 5 As shown, before obtaining the first queue of data points to be processed from the original laser radar point cloud, the following steps may also be included:
[0103] Step S501: obtaining a third queue of data points to be processed from the original laser radar point cloud;
[0104] It can be understood that after obtaining the original lidar point cloud, the terminal device can obtain the third queue of data points to be processed from the original lidar point cloud, wherein the number of data points in the third queue of data points to be processed is preferably 9, that is, 9 consecutively numbered data points can be obtained from the original lidar point cloud each time as the third queue of data points to be processed. For example, the data points numbered 1 to 9 can be obtained from the original lidar point cloud for the first time as the third queue of data points to be processed, the data points numbered 2-10 can be obtained from the original lidar point cloud for the second time as the third queue of data points to be processed, the data points numbered 3-11 can be obtained from the original lidar point cloud for the third time as the third queue of data points to be processed, and so on.
[0105] It should be understood that the smoothing processing in the embodiment of the present application can also be smoothing processing of the original lidar point cloud after interpolation, that is, the third queue of data points to be processed can be obtained from the interpolated original lidar point cloud for smoothing processing. In other words, in the embodiment of the present application, the original lidar point cloud that has not been interpolated can be smoothed separately, and the original lidar point cloud after interpolation processing can also be smoothed.
[0106] Step S502, determining a third target data point in the third queue of data points to be processed, and calculating a third distance between the third target data point and other data points in the third queue of data points to be processed;
[0107] In the embodiment of the present application, after obtaining the third queue of data points to be processed, the terminal device can determine the third target data point from the third queue of data points to be processed to perform specific smoothing processing. Specifically, the terminal device can determine the third target data point according to the number corresponding to each data point in the third queue of data points to be processed, such as determining the data point with a number in the middle position in the third queue of data points to be processed as the third target data point. For example, in the third queue of data points to be processed numbered 1-9, the data point numbered 5 can be determined as the third target data point; in the third queue of data points to be processed numbered 2-10, the data point numbered 6 can be determined as the third target data point, and so on.
[0108] Furthermore, after determining the third target data point, the terminal device can respectively calculate the third distance between the third target data point and the other data points in the third queue of data points to be processed according to the coordinate values corresponding to the third target data point and the other data points in the third queue of data points to be processed, wherein the other data points in the third queue of data points to be processed refer to all data points in the third queue of data points to be processed except the third target data point.
[0109] For example, when data points 2-10 are the third queue of data points to be processed and data point 6 is the third target data point, the third distance between data point 6 and data point 2 can be calculated based on the coordinate value R6 corresponding to data point 6 and the coordinate value R2 corresponding to data point 2, the third distance between data point 6 and data point 3 can be calculated based on the coordinate value R6 corresponding to data point 6 and the coordinate value R3 corresponding to data point 3, and the third distance between data point 6 and data point 3 can be calculated based on the coordinate value R6 corresponding to data point 6 and the coordinate value R3 corresponding to data point 3. The third distance between data point No. 6 and data point No. 4 is calculated based on the corresponding coordinate value R4, ..., and the third distance between data point No. 6 and data point No. 10 can be calculated based on the coordinate value R6 corresponding to data point No. 6 and the coordinate value R10 corresponding to data point No. 10, so that the third distance set {|R6-R2|, |R6-R3|, |R6-R4|, |R6-R5|, |R6-R7|, |R6-R8|, |R6-R9|, |R6-R10|} can be obtained.
[0110] Step S503, determining the slopes corresponding to the third target data point and other data points in the third queue of data points to be processed according to the third distances;
[0111] It should be noted that after obtaining each third distance between the third target data point and each other data point in the third queue of data points to be processed, the terminal device can determine the slope corresponding to the third target data point and each other data point in the third queue of data points to be processed according to each third distance. Here, the maximum distance KR and the minimum distance KL in the third distance can be determined first; then, the distance difference between the maximum distance KR and the minimum distance KL can be calculated, and the distance difference can be determined as the slope corresponding to the third target data point and each other data point in the third queue of data points to be processed.
[0112] For example, if the maximum distance KR in the third distance set {|R6-R2|, |R6-R3|, |R6-R4|, |R6-R5|, |R6-R7|, |R6-R8|, |R6-R9|, |R6-R10|} is determined to be |R6-R10| and the minimum distance KL is |R6-R2|, then the slope K=KR-KL=|R6-R10|-|R6-R2| corresponding to the third target data point and the other data points in the third queue of data points to be processed can be determined.
[0113] Step S504: Smoothing the third target data point according to the slope and the third queue of data points to be processed to obtain a smoothed original lidar point cloud.
[0114] In the embodiment of the present application, after obtaining the slope corresponding to the third target data point and other data points in the third queue of data points to be processed, the terminal device can smooth the third target data point according to the slope and the third queue of data points to be processed, thereby obtaining a smoothed original laser radar point cloud. Specifically, Figure 5a As shown, the smoothing of the third target data point according to the slope and the third queue of data points to be processed to obtain a smoothed original laser radar point cloud may include:
[0115] Step S5041, determining a preset range to which the slope belongs, and obtaining a second number of data points corresponding to the slope range;
[0116] Step S5042: selecting the second number of second candidate data points from the third queue of data points to be processed according to a preset selection method;
[0117] For the above-mentioned steps S5041 and S5042, in an embodiment of the present application, multiple preset ranges can be set in advance, and a second number of data points corresponding to each preset range can be set, so that different numbers of data points can be used to perform different smoothing processing on the third target data point according to the different preset ranges to which the slope belongs. For example, in a specific application scenario, three preset ranges can be pre-set, and the first preset range can be set to [0, 20), the second preset range can be set to [20, 50), and the third preset range can be set to [50, 100]. At the same time, the second number of data points corresponding to the first preset range can be set to 9, the second number of data points corresponding to the second preset range can be set to 7, and the second number of data points in the third preset range can be set to 5. Therefore, when the slope belongs to the first preset range, 9 data points can be selected from the third queue of data points to be processed according to the preset selection method to smooth the third target data point; when the slope belongs to the second preset range, 7 data points can be selected from the third queue of data points to be processed according to the preset selection method to smooth the third target data point; when the slope belongs to the third preset range, 5 data points can be selected from the third queue of data points to be processed according to the preset selection method to smooth the third target data point.
[0118] The preset selection method may be a selection method of sequentially removing the data points with the largest number and the smallest number in the third queue of data points to be processed. For example, in an application scenario where 9 data points 1 to 9 are the third queue of data points to be processed, and the second number of data points corresponding to the first preset range is 9, the second number of data points corresponding to the second preset range is 7, and the second number of data points in the third preset range is 5, when the slope belongs to the first preset range, all data points in the third queue of data points to be processed can be used as the second candidate data points to smooth the third target data point; when the slope belongs to the second preset range, data points 2 to 8 can be selected from the third queue of data points to be processed as the second candidate data points to smooth the third target data point; when the slope belongs to the third preset range, data points 3 to 7 can be selected from the third queue of data points to be processed as the second candidate data points to smooth the third target data point.
[0119] It should be understood that setting the preset range to 3, and setting the first preset range to [0, 20), the second preset range to [20, 50), and the third preset range to [50, 100] are only for illustrative explanation and should not be understood as limitation of the embodiments of the present application. In the embodiments of the present application, the preset range can of course be set to 2, 4 or other arbitrary values according to actual needs, and the first preset range, the second preset range and the third preset range can also be set to other values.
[0120] Step S5043, obtaining a third candidate data point that meets a first preset condition from among the second candidate data points;
[0121] Here, after obtaining the second candidate data point, the terminal device can obtain a third candidate data point in the second candidate data point that meets the first preset condition, that is, the third candidate data point is a valid data point in the second candidate data point whose coordinate value is not the preset value 5555.
[0122] Step S5044, determining the maximum third candidate data point and the minimum third candidate data point among the third candidate data points;
[0123] Step S5045, calculating a fourth distance between the maximum third candidate data point and the minimum third candidate data point;
[0124] Step S5046: If the fourth distance is less than the third threshold, calculate the second average value corresponding to the third candidate data point, and use the second average value to update the third target data point to obtain a smoothed original lidar point cloud.
[0125] For the above steps S5044 to S5046, after acquiring the third candidate data points, the terminal device can determine the maximum third candidate data point and the minimum third candidate data point among the third candidate data points, and can calculate the fourth distance between the maximum third candidate data point and the minimum third candidate data point. When the fourth distance is less than the third threshold, wherein the third threshold can be set to 50 centimeters based on experience, it can be considered that the third queue of data points to be processed is relatively flat. At this time, the terminal device can calculate the second average value corresponding to the third queue of data points to be processed, and can use the second average value to update the third target data point, that is, the second average value can be assigned to the third target data point to smooth the third target data point, thereby obtaining the smoothed original lidar point cloud.
[0126] For example, when data points 2-10 are the third queue of data points to be processed and data point 6 is the third target data point, if the slope corresponding to data point 6 and other data points in the third queue of data points to be processed belongs to the first preset range, such as [0, 20), the terminal device can first use data points 2-10 as the second candidate data points; secondly, valid data points among data points 2-10 can be obtained as the third candidate data points, such as valid data points 2-7, data point 8 and data point 10 can be obtained as the third candidate data points; then, the terminal device can determine the maximum third candidate data point among data points 2-7, data point 8 and data point 10. Data point and the minimum third candidate data point, and calculate the fourth distance between the maximum third candidate data point and the minimum third candidate data point. Assuming that the determined maximum third candidate data point is data point No. 10 and the minimum third candidate data point is data point No. 2, the fourth distance |R10-R2| between data point No. 10 and data point No. 2 can be calculated. If the fourth distance |R10-R2| is less than the third threshold value (such as 50 cm), the terminal device can calculate the second average value corresponding to data points 2-7, data points 8 and data point No. 10, and assign the calculated second average value to data point No. 6, so as to smooth data point No. 6 and ensure the effectiveness of the smoothing process, thereby improving the quality of the point cloud.
[0127] For another example, when data points 2-10 are the third queue of data points to be processed and data point 6 is the third target data point, if the slope corresponding to data point 6 and other data points in the third queue of data points to be processed belongs to the second preset range, such as [20, 50), the terminal device may first select data points 3-9 from data points 2-10 as the second candidate data points, and then obtain valid data points from the seven second candidate data points 3-9 as the third candidate data points, such as obtaining six valid data points 3 and 5-9 as the third candidate data points; then, the terminal device may determine whether data points 3 and 5 are the second candidate data points. -9 data points, and the fourth distance between the maximum third candidate data point and the minimum third candidate data point can be calculated. Assuming that the determined maximum third candidate data point is data point 8 and the minimum third candidate data point is data point 3, the fourth distance |R8-R3| between data point 8 and data point 3 can be calculated. If the fourth distance |R8-R3| is less than the third threshold value (such as 50 cm), the terminal device can calculate the second average value corresponding to data point 3 and data points 5-9, and assign the calculated second average value to data point 6, so as to smooth data point 6.
[0128] For another example, when data points 2-10 are the third queue of data points to be processed and data point 6 is the third target data point, if the slope corresponding to data point 6 and other data points in the third queue of data points to be processed belongs to the third preset range, such as [50, 100], the terminal device can first select data points 4-8 from data points 2-10 as the second candidate data points, and then obtain valid data points from the five third candidate data points 4-8 as the third candidate data points, such as obtaining the five valid data points 4-8 as the third candidate data points; then, the terminal device can determine that data points 4-8 The maximum third candidate data point and the minimum third candidate data point among the data points No. 8, and the fourth distance between the maximum third candidate data point and the minimum second candidate data point can be calculated. Assuming that the determined maximum third candidate data point is data point No. 8 and the minimum third candidate data point is data point No. 4, the fourth distance |R8-R4| between data point No. 8 and data point No. 4 can be calculated. If the fourth distance |R8-R4| is less than the third threshold value (such as 50 cm), the terminal device can calculate the second average value corresponding to data points No. 4-8, and assign the calculated second average value to data point No. 6, so as to smooth data point No. 6.
[0129] Furthermore, if the slope is not within any preset range, or if the fourth distance is greater than or equal to the third threshold, it can be considered that the third target data point itself is a data point with a range distance change. At this time, the terminal device may not smooth the third target data point to ensure the validity of the data point.
[0130] Here, by pre-setting multiple preset ranges, different smoothing processing can be performed on the third target data points with excessive distance fluctuations caused by jitter characteristics according to the preset range to which the slope belongs, so that at a relatively smooth position, more data points can be used for smoothing processing, and at a generally smooth or less smooth position, fewer data points can be used for smoothing processing, thereby ensuring the effectiveness of the smoothing processing, improving the ranging accuracy of the point cloud, and improving the quality of the point cloud.
[0131] It should be understood that in application scenarios where the original lidar point cloud needs to be interpolated and smoothed, in an embodiment of the present application, the deletion operation of the first target data point of the original lidar point cloud is preferably the deletion operation of the first target data point of the original lidar point cloud after interpolation and smoothing. That is, after obtaining a certain original lidar point cloud, the original lidar point cloud can be interpolated first, and then the original lidar point cloud after interpolation can be smoothed, and finally the first target data point can be deleted from the original lidar point cloud after smoothing.
[0132] In an embodiment of the present application, an original lidar point cloud is first obtained, and a first queue of data points to be processed is obtained from the original lidar point cloud; secondly, a first target data point in the first queue of data points to be processed is determined; subsequently, a first distance between the first target data point and each other data point in the first queue of data points to be processed can be calculated, and a first number of the first distances less than a first threshold value can be counted; when the first number is less than a preset number, the first target data point is deleted from the original lidar point cloud to obtain a target lidar point cloud, thereby accurately determining isolated noise points in the original lidar point cloud, and deleting the isolated noise points, so as to effectively reduce the isolated noise points in the lidar point cloud, improve the quality of the lidar point cloud, and thus ensure the stability of the point cloud image.
[0133] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0134] Corresponding to the laser radar point cloud processing method described in the above embodiment, Figure 6A structural block diagram of a laser radar point cloud processing device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0135] Reference Figure 6 , the laser radar point cloud processing device comprises:
[0136] The original point cloud acquisition module 601 is used to acquire the original laser radar point cloud and obtain the first queue of data points to be processed from the original laser radar point cloud;
[0137] A first target data point determination module 602 is used to determine a first target data point in the first queue of data points to be processed;
[0138] A first quantity counting module 603 is used to calculate a first distance between the first target data point and other data points in the first queue of data points to be processed, and to count a first quantity of the first distance being less than a first threshold;
[0139] The first target data point deletion module 604 is used to delete the first target data point from the original lidar point cloud when the first number is less than a preset number to obtain a target lidar point cloud.
[0140] In a possible implementation, the laser radar point cloud processing device may further include:
[0141] A second data point queue acquisition module, used to acquire a second to-be-processed data point queue from the original laser radar point cloud;
[0142] a second target data point determination module, configured to determine a second target data point in the second queue of data points to be processed, and determine whether the second target data point satisfies a first preset condition;
[0143] A first candidate data point acquisition module, configured to acquire a first candidate data point in the second to-be-processed data point queue that meets the first preset condition if the second target data point does not meet the first preset condition;
[0144] A number determination module, used to determine a first number corresponding to each of the first candidate data points and a second number corresponding to the second target data point;
[0145] The first candidate data point judging module is used to determine whether the first candidate data point meets a second preset condition according to the size relationship between each of the first numbers and the second numbers.
[0146] Optionally, the laser radar point cloud processing device may further include:
[0147] a maximum first candidate data point determination module, configured to determine a maximum first candidate data point and a minimum first candidate data point among the first candidate data points if the first candidate data points satisfy the second preset condition;
[0148] A second distance calculation module, used to calculate a second distance between the maximum first candidate data point and the minimum first candidate data point;
[0149] a first average value calculation module, configured to calculate a first average value corresponding to the first candidate data point if the second distance is less than a second threshold;
[0150] An interpolation processing module is used to use the first average value to interpolate the second target data point to obtain an interpolated original laser radar point cloud.
[0151] In a possible implementation, the laser radar point cloud processing device may further include:
[0152] A third data point queue acquisition module, used to acquire a third to-be-processed data point queue from the original laser radar point cloud;
[0153] A third target data point determination module, used to determine a third target data point in the third queue of data points to be processed, and calculate a third distance between the third target data point and other data points in the third queue of data points to be processed;
[0154] A slope determination module, used to determine the slopes corresponding to the third target data point and other data points in the third queue of data points to be processed according to each of the third distances;
[0155] A smoothing processing module is used to smooth the third target data point according to the slope and the third queue of data points to be processed to obtain a smoothed original laser radar point cloud.
[0156] Optionally, the smoothing processing module may include:
[0157] a slope range determining unit, configured to determine a slope range to which the slope belongs, and obtain a second number of data points corresponding to the slope range;
[0158] A second candidate data point selection unit, configured to select the second number of second candidate data points from the third queue of data points to be processed according to a preset selection method;
[0159] A third candidate data point acquisition unit, configured to acquire a third candidate data point that satisfies a first preset condition from among the second candidate data points;
[0160] a maximum third candidate data point determining unit, configured to determine a maximum third candidate data point and a minimum third candidate data point among the third candidate data points;
[0161] a fourth distance calculation unit, configured to calculate a fourth distance between the maximum third candidate data point and the minimum third candidate data point;
[0162] A smoothing processing unit is used to calculate a second average value corresponding to the third candidate data point if the fourth distance is less than a third threshold value, and use the second average value to update the third target data point to obtain a smoothed original lidar point cloud.
[0163] In a possible implementation, the slope determination module may include:
[0164] a maximum distance determining unit, configured to determine a maximum distance and a minimum distance among the third distances;
[0165] The slope determination unit is used to calculate the distance difference between the maximum distance and the minimum distance, and determine the distance difference as the slope corresponding to the third target data point and other data points in the third queue of data points to be processed.
[0166] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0167] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, 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. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, 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 software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0168] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0169] An embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0170] If 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, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0171] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0172] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0173] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0174] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0175] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A laser radar point cloud processing method, characterized in that: include: Obtaining an original laser radar point cloud, and obtaining a third queue of data points to be processed from the original laser radar point cloud; Determining a third target data point in the third queue of data points to be processed, and calculating a third distance between the third target data point and other data points in the third queue of data points to be processed; Determining, based on each of the third distances, a slope corresponding to the third target data point and each of the other data points in the third queue of data points to be processed; Smoothing the third target data point according to the slope and the third queue of data points to be processed to obtain a smoothed original lidar point cloud; Obtaining a first queue of data points to be processed from the smoothed original lidar point cloud; determining a first target data point in the first queue of data points to be processed; Calculating a first distance between the first target data point and each of the other data points in the first queue of data points to be processed, and counting a first number of data points for which the first distance is less than a first threshold; When the first number is less than a preset number, the first target data point is deleted from the smoothed original lidar point cloud to obtain a target lidar point cloud.
2. The laser radar point cloud processing method according to claim 1, characterized in that: After obtaining the raw LiDAR point cloud, it also includes: Obtaining a second queue of data points to be processed from the original lidar point cloud; determining a second target data point in the second queue of data points to be processed, and determining whether the second target data point satisfies a first preset condition; If the second target data point does not meet the first preset condition, obtaining a first candidate data point in the second queue of data points to be processed that meets the first preset condition; Determine a first number corresponding to each of the first candidate data points and a second number corresponding to the second target data point; It is determined whether the first candidate data point meets a second preset condition according to a size relationship between each of the first numbers and the second numbers.
3. The laser radar point cloud processing method according to claim 2, characterized in that: After determining whether the first candidate data point meets a second preset condition, the method includes: If the first candidate data points meet the second preset condition, determining a maximum first candidate data point and a minimum first candidate data point among the first candidate data points; Calculating a second distance between the maximum first candidate data point and the minimum first candidate data point; If the second distance is less than a second threshold, calculating a first average value corresponding to the first candidate data point; The second target data points are interpolated using the first average value to obtain an interpolated original lidar point cloud.
4. The laser radar point cloud processing method according to any one of claims 1 to 3, characterized in that: The step of smoothing the third target data point according to the slope and the third queue of data points to be processed to obtain a smoothed original lidar point cloud includes: determining a slope range to which the slope belongs, and obtaining a second number of data points corresponding to the slope range; selecting the second number of second candidate data points from the third queue of data points to be processed according to a preset selection method; Obtaining a third candidate data point that meets a first preset condition among the second candidate data points; determining a maximum third candidate data point and a minimum third candidate data point among the third candidate data points; Calculating a fourth distance between the maximum third candidate data point and the minimum third candidate data point; If the fourth distance is less than the third threshold, the second average value corresponding to the third candidate data point is calculated, and the second average value is used to update the third target data point to obtain a smoothed original lidar point cloud.
5. The point cloud processing method according to any one of claims 1 to 3, characterized in that: Determining the slopes corresponding to the third target data point and other data points in the third queue of data points to be processed according to the third distances includes: determining a maximum distance and a minimum distance among the third distances; A distance difference between the maximum distance and the minimum distance is calculated, and the distance difference is determined as a slope corresponding to the third target data point and other data points in the third queue of data points to be processed.
6. A laser radar point cloud processing device, characterized in that: include: An original point cloud acquisition module is used to acquire an original laser radar point cloud and obtain a third queue of data points to be processed from the original laser radar point cloud; Determine a third target data point in the third queue of data points to be processed, and calculate a third distance between the third target data point and each other data point in the third queue of data points to be processed; determine a slope corresponding to the third target data point and each other data point in the third queue of data points to be processed based on each of the third distances; smooth the third target data point based on the slope and the third queue of data points to be processed to obtain a smoothed original lidar point cloud; and obtain a first queue of data points to be processed from the smoothed original lidar point cloud; A first target data point determination module, configured to determine a first target data point in the first queue of data points to be processed; a first quantity counting module, configured to calculate a first distance between the first target data point and each of the other data points in the first queue of data points to be processed, and to count a first quantity of data points for which the first distance is less than a first threshold; The first target data point deletion module is used to delete the first target data point from the original lidar point cloud when the first number is less than a preset number to obtain a target lidar point cloud.
7. The laser radar point cloud processing device according to claim 6, characterized in that: The laser radar point cloud processing device further includes: A second data point queue acquisition module is used to acquire a second queue of data points to be processed from the original lidar point cloud; a second target data point determination module, configured to determine a second target data point in the second queue of data points to be processed, and determine whether the second target data point satisfies a first preset condition; a first candidate data point acquisition module, configured to acquire a first candidate data point in the second queue of data points to be processed that meets the first preset condition if the second target data point does not meet the first preset condition; a number determination module, configured to determine a first number corresponding to each of the first candidate data points and a second number corresponding to each of the second target data points; The first candidate data point judgment module is configured to determine whether the first candidate data point satisfies a second preset condition based on a size relationship between each of the first numbers and the second numbers.
8. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the lidar point cloud processing method according to any one of claims 1 to 5 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the laser radar point cloud processing method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Noisy point identifying method capable of being used for laser radar, and laser radar system
CN110031822A