WO2023155793A1 - Point cloud processing method and apparatus, and laser radar - Google Patents

Point cloud processing method and apparatus, and laser radar Download PDF

Info

Publication number
WO2023155793A1
WO2023155793A1 PCT/CN2023/076111 CN2023076111W WO2023155793A1 WO 2023155793 A1 WO2023155793 A1 WO 2023155793A1 CN 2023076111 W CN2023076111 W CN 2023076111W WO 2023155793 A1 WO2023155793 A1 WO 2023155793A1
Authority
WO
WIPO (PCT)
Prior art keywords
point
point cloud
euclidean distance
points
outliers
Prior art date
Application number
PCT/CN2023/076111
Other languages
French (fr)
Chinese (zh)
Inventor
陈森柯
王栋
崔鹏飞
夏冰冰
石拓
Original Assignee
苏州一径科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州一径科技有限公司 filed Critical 苏州一径科技有限公司
Publication of WO2023155793A1 publication Critical patent/WO2023155793A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/4802Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00 using analysis of echo signal for target characterisation; Target signature; Target cross-section
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Definitions

  • the present disclosure relates to the technical field of laser radar, and in particular to a point cloud processing method, device and laser radar.
  • LiDAR light detection and ranging
  • Point cloud data contains a variety of feature information, such as: three-dimensional coordinate information, color information, reflection intensity information, etc.
  • lidar At present, with the wide application of lidar, higher and higher requirements are put forward for the measurement accuracy of lidar, and higher requirements are also put forward for the reliability of point cloud data. In order to ensure the accuracy and reliability of the point cloud data, it is necessary to remove the noise points in the point cloud, such as outliers. However, the algorithms associated with identifying outliers are computationally intensive and inefficient.
  • the present disclosure provides a point cloud processing method, device and laser radar, so as to quickly identify outliers from the point cloud.
  • a point cloud processing method including: obtaining the first point cloud of the lidar, the point cloud generated by the lidar is an unordered point cloud; traversing the first point cloud, by querying The point cloud neighbor table calculates the first Euclidean distance from each point in the first point cloud to the nearest neighbor point, wherein the point cloud neighbor table is generated based on the preset angle calibration data of the lidar; at least based on the first Euclidean distance, Identify outliers from the first point cloud.
  • determining outliers from the first point cloud includes: for the i-th point in the first point cloud, from the i-th Determine the number of the first point whose first Euclidean distance is less than the first threshold in the nearest neighbor of the point, and i is a positive integer; if the number of the first point is less than the second threshold, the i-th point is determined as an outlier.
  • the method further includes: traversing the first point cloud, and calculating each point in the first point cloud by querying the point cloud neighbor table a second Euclidean distance to the second nearest neighbor; determining outliers from the first point cloud based on at least the first Euclidean distance, including: determining outliers from the first point cloud based on the first Euclidean distance and the second Euclidean distance point.
  • determining outliers from the first point cloud based on the first Euclidean distance and the second Euclidean distance includes: determining outliers from the first point cloud based on the first Euclidean distance Determine the suspected outliers; determine the outliers from the suspected outliers based on the second Euclidean distance.
  • determining suspected outliers from the first point cloud based on the first Euclidean distance includes: for the i-th point in the first point cloud, from the i-th Determine the number of the second point whose first Euclidean distance is less than the third threshold in the nearest neighbor of the point, i is a positive integer; if the number of the second point is less than the fourth threshold, then determine the i-th point as a suspected outlier .
  • determining the outliers from the suspected outliers based on the second Euclidean distance includes: for the jth suspected outlier in the first point cloud, from the Determine the number of third points whose second Euclidean distance is less than the fifth threshold among the second nearest neighbor points of j suspected outliers, and j is a positive integer; if the number of the third points is less than or equal to the sixth threshold, then the jth Suspected outliers are identified as outliers.
  • the method further includes: generating a second point cloud at a preset detection distance based on the angle calibration data of the lidar; the second point cloud is the same as the first point cloud Corresponding; traversing the second point cloud, searching for the nearest neighbor of each point; at least based on the nearest neighbor, generating a point cloud neighbor table.
  • the method after generating the second point cloud, the method It also includes: traversing the second point cloud, searching for the second nearest neighbor point of each point; generating a point cloud neighbor table based on the nearest neighbor point and the second nearest neighbor point.
  • a point cloud processing device the processing device includes: a data acquisition module, used to obtain the first point cloud of the laser radar, the point cloud generated by the laser radar is disordered Point cloud; the distance calculation module is used to traverse the first point cloud, and calculate the first Euclidean distance from each point in the first point cloud to the nearest neighbor by querying the point cloud neighbor table, wherein the point cloud neighbor table is based on the laser
  • the radar preset angle calibration data is generated;
  • the data analysis module is configured to determine outliers from the first point cloud based at least on the first Euclidean distance.
  • the data analysis module is further configured to, for the i-th point in the first point cloud, determine from the nearest neighbors of the i-th point that the first Euclidean distance is less than the first The quantity of the first point of a threshold, i is a positive integer; if the quantity of the first point is less than the second threshold, the i-th point is determined as an outlier.
  • the distance calculation module is also used to traverse the first point cloud, and calculate the second distance between each point in the first point cloud and the next nearest neighbor point by querying the point cloud neighbor table. Euclidean distance; the data analysis module is also used to determine outliers from the first point cloud based on the first Euclidean distance and the second Euclidean distance.
  • the data analysis module is further configured to determine suspected outliers from the first point cloud based on the first Euclidean distance; and, based on the second Euclidean distance, from Identify outliers among suspected outliers.
  • the data analysis module is further configured to, for the i-th point in the first point cloud, determine from the nearest neighbors of the i-th point that the first Euclidean distance is less than the first The number of the second points of the three thresholds, i is a positive integer; if the number of the second points is less than the fourth threshold, the i-th point is determined as a suspected outlier.
  • the data analysis module is further configured to, for the jth suspected outlier point in the first point cloud, determine from the second nearest neighbors of the jth suspected outlier point The number of third points whose second Euclidean distance is less than the fifth threshold, j is a positive integer; if the number of third points is less than or is equal to the sixth threshold, then the jth suspected outlier point is determined as an outlier point.
  • a laser radar including: a memory storing computer-executable instructions; a processor connected to the memory for executing the computer-executable instructions to implement the first aspect and the method described in any exemplary embodiment thereof.
  • a computer storage medium stores computer-executable instructions, and the computer-executable instructions can implement the first aspect and any exemplary method thereof after being executed by a processor. The method described in the embodiment.
  • the nearest neighbor point of each point in the point cloud is determined by querying the point cloud neighbor table, and the outlier point in the point cloud is determined according to the Euclidean distance from each point to the nearest neighbor point.
  • the present disclosure uses laser radar angle calibration data to generate a simulation point cloud, and generates a point cloud neighbor table according to the positional relationship of points in the simulation point cloud. Because the simulated point cloud and the unknown point cloud have the same launch angle, the arrangement of points in the simulated point cloud and the arrangement of points in the unknown point cloud are in one-to-one correspondence.
  • the unknown point cloud uses the neighbor table generated by the simulated point cloud to determine the nearest neighbor point of any point in the unknown point cloud, and the nearest neighbor point determined by this method is more accurate.
  • FIG. 1 is a schematic structural diagram of a laser radar in the related art
  • FIG. 2 is a flowchart of a point cloud processing method in an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of a point cloud arrangement in an embodiment of the present disclosure.
  • FIG. 4 is a flow chart of point cloud processing in an embodiment of the present disclosure
  • FIG. 5 is another flow chart of point cloud processing in an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a point cloud processing device in an embodiment of the present disclosure.
  • FIG. 7 is a configuration block diagram of an electronic device according to an embodiment of the present disclosure.
  • LiDAR is an object detection technology.
  • the laser radar emits a laser beam through a laser.
  • the laser beam encounters a target object and undergoes diffuse reflection.
  • the detector receives the reflected beam and determines the distance, orientation, height, speed, Features such as posture and shape.
  • LiDAR has a wide range of applications. In addition to being used in the military field, it is also widely used in the field of life, including but not limited to: intelligent driving vehicles, intelligent driving aircraft, three-dimensional (3-Dimension, 3D) printing, virtual reality, augmented reality, service robots and other fields .
  • intelligent driving vehicles intelligent driving aircraft
  • 3D three-dimensional
  • virtual reality virtual reality
  • augmented reality service robots
  • the lidar is set in the intelligent driving vehicle, and the lidar can scan the surrounding environment by emitting laser beams quickly and repeatedly, so as to obtain the shape and position of one or more target objects in the surrounding environment , moving point clouds, etc.
  • the above intelligent driving technology may refer to unmanned driving, automatic driving, assisted driving and other technologies.
  • FIG. 1 is a schematic structural diagram of a laser radar in the related art.
  • the laser radar 10 may include: a light emitting device 101 , a light receiving device 102 and a processor 103 . Wherein, both the light emitting device 101 and the light receiving device 102 are connected to the processor 103 .
  • connection relationship among the above-mentioned components may be an electrical connection, and may also be an optical fiber connection.
  • the light emitting device 101 and the light receiving device 102 may also respectively include a plurality of optical devices, and the connection relationship between these optical devices may also be a spatial optical transmission connection.
  • the processor 103 is used to control the light emitting device 101 and the light receiving device 102, so that the light emitting device 101 and the light receiving device 102 can work normally.
  • the processor 103 may provide driving voltages for the light emitting device 101 and the light receiving device 102 respectively, and the processor 103 may also provide control signals for the light emitting device 101 and the light receiving device 102 .
  • the processor 103 can be a general-purpose processor, such as a central processing unit (central processing unit, CPU), a network processor (network processor, NP), etc.; the processor 103 can also be a digital signal processor (digital signal processing , DSP), application specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a central processing unit central processing unit, CPU
  • NP network processor
  • DSP digital signal processing
  • ASIC application specific integrated circuit
  • FPGA field-programmable gate array
  • the light emitting device 101 also includes a light source (not shown in FIG. 1 ).
  • a light source may refer to a laser, and the number of the laser may be one or more.
  • the laser may specifically be a pulsed laser diode (pulsed laser diode, PLD), a semiconductor laser, a fiber laser, or the like.
  • PLD pulsed laser diode
  • the above-mentioned light sources are used to emit laser beams.
  • the processor 103 may send an emission control signal to the light source, thereby triggering the light source to emit the laser beam.
  • laser beams may also be referred to as laser pulses, lasers, emitted light beams, and the like.
  • the laser beam propagates along the emission direction.
  • the laser beam encounters the target object 104 , it is reflected on the surface of the target object 104 , and the reflected beam is received by the light receiving device 102 of the laser radar.
  • the beam reflected by the target object 104 may be referred to as an echo beam (the laser beam and the echo beam are marked by solid lines in FIG. 1 ).
  • the light receiving device 102 After receiving the echo beam, the light receiving device 102 performs photoelectric conversion on the echo beam, that is, converts the echo beam into an electrical signal, and the light receiving device 102 outputs the electrical signal corresponding to the echo beam to the processor 103, and the processor 103 can obtain the shape, position, and moving point cloud of the target object 104 according to the electrical signal of the echo beam.
  • the laser of the micro-electro-mechanical system (MEMS) scanning laser radar in the laser radar is fixedly connected, and the light can only propagate along the corresponding angle, so that the laser in the MEMS scanning laser radar
  • MEMS micro-electro-mechanical system
  • Individual lasers often only have a limited field of view.
  • multiple lasers with different angles can be configured in the MEMS scanning laser radar.
  • the field of view becomes a large field of view.
  • there is often a certain overlapping area between small fields of view in order to prevent blind spots between different small fields of view and affect the detection accuracy, there is often a certain overlapping area between small fields of view.
  • the existence of the overlapping area makes the point cloud with orderly distribution of point numbers in the small field of view (that is, ordered point cloud) become a point cloud with disordered point number distribution in the entire lidar field of view (that is, unordered point cloud).
  • random noise occurs in lidar, for example, avalanche photodiode (avalanche photon diode, APD) array part of the receiver is damaged, APD is exposed to direct sunlight, etc.
  • APD avalanche photon diode
  • the appearance of random noise will cause defects in the point cloud acquired by lidar scanning (usually manifested as outliers in the point cloud), which will affect the detection accuracy of lidar.
  • the points in the point cloud have the characteristics that the sequence numbers of adjacent points are not adjacent. It is not possible to remove outliers from the point cloud based on the serial number of the point.
  • the statistical outlier removal (SOR) in the point cloud library (PCL) algorithm is used to remove the outlier points in the point cloud.
  • the SOR algorithm has the advantage of strong versatility, but the SOR algorithm needs to search for the nearest neighbor of each point in three-dimensional space after each input point cloud, which takes a very long time and is unstable.
  • an embodiment of the present disclosure provides a point cloud processing method. This method can be applied to lidars that generate disordered point clouds, such as MEMS scanning lidars.
  • lidar referred to in the embodiments of the present disclosure may be all lidars that can obtain factory angle calibration files or lidars that can know the emission angle of the transmitter in the lidar. That is, all lidars that can obtain point cloud neighbor tables based on preset files and data. For the convenience of description, the following are collectively referred to as lidar.
  • FIG. 2 is a flow chart of a point cloud processing method in an embodiment of the present disclosure. Referring to the solid line in Fig. 2, the method includes steps S201 to S203.
  • the point cloud generated by lidar is an unordered point cloud.
  • the first point cloud is an unordered point cloud.
  • the lidar can scan the target object to obtain a point cloud for describing the relevant characteristics of the target object, and use the point cloud as the first point cloud.
  • lidar can be obtained by obtaining a historical point cloud that has been scanned and stored in the past, and use this point cloud as the first point cloud.
  • the lidar can also obtain the first point cloud in other ways, which is not specifically limited in this embodiment of the present disclosure.
  • the first point cloud may include information such as serial numbers of points, three-dimensional coordinates of points, and the like.
  • the point cloud neighbor table may be generated based on the preset angle calibration data of the lidar.
  • the point cloud neighbor table may also include the nearest neighbor points of each point in the lidar point cloud.
  • the nearest neighbor point can be understood as the point with the closest distance to each point in the point cloud in the three-dimensional space.
  • the nearest neighbor of a point can be one point or multiple points, then, the number of the nearest neighbor of a point can be set as K1, and K1 is a positive integer.
  • the number of nearest neighbors can be set according to the resources of the algorithm computing platform and the real-time requirements of the application scenario. Exemplarily, if computing resources are sufficient or computing real-time requirements are low, the number K1 of nearest neighbors can be set to 8; if computing resources are limited, or computing real-time requirements are high, the number K1 of nearest neighbors can be Set to 4. Of course, other situations may also exist, which are not specifically limited in this embodiment of the present disclosure.
  • the aforementioned point cloud neighbor table is pre-stored in the lidar. Then, after the lidar obtains the first point cloud through S101, it can traverse each point in the first point cloud (hereinafter referred to as point A As an example), by querying the point cloud neighbor table, K1 nearest neighbor points of point A are obtained, and the first Euclidean distance from point A to K1 nearest neighbor points is calculated. That is to say, the lidar determines the K1 nearest neighbor points of each point in the first point cloud by querying the point cloud neighbor table, and calculates the Euclidean distance between each point and its K1 nearest neighbor points. At this time, a total of K1 points are calculated First Euclidean distance.
  • the point cloud for generating the point cloud proximity table and the first point cloud are generated by a laser beam emitted by a laser on the same lidar. Since the emission angle of the laser is fixed and the emission beam propagates along a straight line, the arrangement of points in the lidar point cloud is relatively fixed. Then, the nearest neighbor point of any point in the first point cloud can be obtained by querying the point cloud neighbor table.
  • the lidar determines the K1 nearest neighbors of point A and the corresponding first Euclidean distances, it can determine whether point A is a distance from group points.
  • the lidar obtains the first Euclidean distance from the i-th point to the nearest neighbor point through S202, and there are K1 in total. Then, the lidar executes S203 to find out the nearest neighbor point (that is, the first point) whose first Euclidean distance is less than the first threshold from the K1 nearest neighbor points, and determines whether the i-th point is a distance from the first point according to the number of first points. group points. If the number of the first point is less than the second threshold, the lidar determines that the i-th point is an outlier point, otherwise, the lidar determines that the i-th point is a non-outlier point, and repeats the above steps for the i+1th point .
  • the above-mentioned first point is a set of nearest neighbor points whose first Euclidean distance is smaller than the first threshold, and this set is a subset of K1 nearest neighbor points.
  • the number of first points may be less than or equal to K1.
  • the lidar can traverse the first point cloud, perform the above judgment process for each point, and determine whether each point is an outlier point one by one. For example, taking point A as an example, the lidar determines from the K1 nearest neighbor points of point A that satisfy the condition that the first Euclidean distance is less than the first threshold The first point, a total of S1. If the number of the first points (S1) is less than the second threshold, the laser radar may determine point A as an outlier point. Conversely, the lidar determines point A as a non-outlier and repeats the above steps for the next point.
  • first threshold and the second threshold are set according to actual conditions such as the application scenario and accuracy requirements of the lidar.
  • the first threshold and the second threshold may be empirical values.
  • the first threshold is 5 cm
  • S202 to S203 are executed for each point in the first point cloud to determine whether each point in the first point cloud is an outlier point.
  • the outliers are determined from the first point cloud according to the nearest neighbor points, which is not only simple and convenient, but also has a small amount of calculation, and can effectively improve the screening efficiency of outliers.
  • the above-mentioned point cloud neighbor table may further include the second nearest neighbor points of each point in the point cloud.
  • the second nearest neighbor point can be understood as the second closest point to each point in the point cloud in three-dimensional space.
  • the second nearest neighbor of a point can be one point or multiple points, then, the number of nearest neighbors of a point can be set as K2, and K2 is a positive integer.
  • next-nearest neighbor points can be set according to the resources of the algorithm computing platform and the real-time requirements of the application scenario. Exemplarily, if the calculation resources are sufficient or the calculation real-time requirements are low, the number K2 of the second nearest neighbor points can be set to 16; if the calculation resources are limited, or the calculation real-time requirements are high, the number K2 of the second nearest neighbor points can be Set to 8. Of course, other situations may also exist, which are not specifically limited in this embodiment of the present disclosure.
  • the above method may further include S204 and S205.
  • S204 is executed after S201, and may be executed simultaneously with S202, or may be executed successively with S202.
  • the lidar can also traverse each point in the first point cloud, and obtain each point in the first point cloud by querying the point cloud neighbor table (still take point A as an example for description) K2 second-nearest neighbors, and calculate the second Euclidean distance from point A to its K2 second-nearest neighbors, a total of K2 second Euclidean distances. Then, the lidar executes S205 to determine whether point A is an outlier based on the first Euclidean distance from point A to the nearest neighbor point and the second Euclidean distance from point A to the second nearest neighbor point, and then determine from the first point cloud Outlier.
  • S205 may include: determining suspected outliers from the first point cloud based on the first Euclidean distance; determining outliers from the suspected outliers based on the second Euclidean distance.
  • the lidar After the lidar obtains the first Euclidean distance and the second Euclidean distance of each point in the first point cloud, it can Quantity, to determine whether point A is a suspected outlier. Then, if the point A is a suspected outlier point, it is determined whether the point A is an outlier point according to the quantity of the second nearest neighbor points satisfying the second Euclidean distance of the second preset condition. Through two judgments, the non-outlier points are avoided from being mistakenly deleted, making the identification of outlier points more accurate.
  • the lidar obtains the first Euclidean distance from the i-th point to the nearest neighbor point through S202, and there are K1 in total. Then, the lidar executes S205 to find out the nearest neighbor point (that is, the second point) whose first Euclidean distance is less than the third threshold from the K1 nearest neighbor points, and determine whether the i-th point is suspected according to the number of second points Outlier. If the number of the second point is less than the fourth threshold, the lidar determines that the i-th point is a suspected outlier point, otherwise, the lidar determines that the i-th point is a non-suspected outlier point, and for the i-th point Repeat the above steps for i+1 points.
  • the above-mentioned second point is a set of nearest neighbor points whose first Euclidean distance is smaller than the third threshold, and this set is a subset of K1 nearest neighbor points.
  • the number of second points may be less than or equal to K1.
  • the lidar can traverse the first point cloud, perform the above judgment process for each point, and determine whether each point is a suspected outlier point one by one. For example, taking point A as an example, the lidar determines the second point satisfying the condition that the first Euclidean distance is less than the third threshold from the K1 nearest neighbor points of point A, a total of S2 points. If the number of the second points (S2) is less than the fourth threshold, the lidar may determine point A as a suspected outlier point. Conversely, LiDAR identifies point A as not a suspected outlier and repeats the above steps for the next point.
  • the third threshold and the fourth threshold are set according to actual conditions such as the application scenario and accuracy requirements of the lidar.
  • the third threshold and the fourth threshold may be empirical values.
  • the third threshold may be the same as or different from the first threshold, and the second threshold may be the same as or different from the fourth threshold, which is not specifically limited in this embodiment of the present disclosure.
  • the second point and the first point may be the same or different, which is not specifically limited in this embodiment of the present disclosure.
  • the third threshold is 5 cm
  • the lidar obtains the second distance between the jth suspected outlier point and the second nearest neighbor point through S204. Euclidean distance, a total of K2. Then, the lidar executes S205 to find out the second nearest neighbor point (that is, the third point) whose second Euclidean distance is less than the fifth threshold from the K2 second nearest neighbor points, and determine the jth suspected outlier point according to the number of the third point Whether it is an outlier point.
  • the lidar determines that the jth suspected outlier point is an outlier point, otherwise, the lidar determines that the jth suspected outlier point is a non-outlier point, and for the first Repeat the above steps for j+1 points.
  • the above-mentioned third point is a set of next-nearest neighbor points whose second Euclidean distance is smaller than the fifth threshold, and this set is a subset of K2 second-nearest neighbor points.
  • the number of third points may be less than or equal to K2.
  • the lidar can traverse the first point cloud, perform the above judgment process for each suspected outlier point, and determine whether each suspected outlier point is an outlier point one by one. For example, taking point A as an example, the lidar determines the third point satisfying the condition that the second Euclidean distance is less than the fifth threshold from the K2 second nearest neighbor points of point A, totaling S3 points. If the number of the third points (S3) is less than or equal to the sixth threshold, the laser radar may determine point A as an outlier point. Conversely, the lidar determines point A as a non-outlier and repeats the above steps for the next point.
  • the fifth threshold and the sixth threshold are set according to actual conditions such as the application scenario and accuracy requirements of the lidar.
  • the fifth threshold and the sixth threshold may be empirical values.
  • the fifth threshold is greater than the third threshold, and the sixth threshold is greater than the fourth threshold.
  • point A is a suspected outlier.
  • the fifth threshold is 8 cm
  • S202 to S205 are executed for each point in the first point cloud to determine whether each point in the first point cloud is an outlier point.
  • the outlier points are determined from the first point cloud according to the nearest neighbor point and the second nearest neighbor point, not only judging The accuracy of breaking outliers is higher, and it can effectively reduce the occurrence of mistakenly deleted points.
  • the nearest neighbor point of each point in the point cloud is determined, and the point cloud is determined according to the Euclidean distance from each point to the nearest neighbor point Outliers in .
  • the data calculation amount is small, convenient and efficient, thus effectively improving the processing efficiency of the point cloud.
  • the above method may further include the step of generating a point cloud neighbor list. Then, still referring to the solid line in Figure 2, before S201, the above method may also include:
  • the above steps of generating point cloud neighbor tables can be performed when the lidar leaves the factory, or it can be executed every time the lidar is powered on and initialized. In other words, lidar does not need to be performed every time before ranging.
  • the angle calibration data of the lidar is stored before the lidar leaves the factory.
  • the laser radar can obtain the emission angle of each laser in the laser radar.
  • the preset detection distance (which can be recorded as distance) can be understood as the preset scanning range of the lidar, which is set according to the actual situation. distance is a positive integer.
  • the lidar can generate a frame of simulated point cloud according to the emission angle of each laser and the preset detection distance (that is, the point cloud or second point cloud). Since the emission angle of the lidar laser is fixed and the laser travels along a straight line, the overlapping area of the simulated point cloud is fixed and has nothing to do with the emission distance of the laser. The arrangement of each point and its neighbors in the simulation point cloud is also relatively fixed. Then, the arrangement of points in any unknown point cloud generated by the laser of the lidar is consistent with the simulation point cloud, that is, the arrangement of points in the first point cloud is the same as the arrangement of points in the second point cloud is corresponding.
  • the simulation point cloud can be understood as At the same detection distance, the two-dimensional angle calibration data is restored to the three-dimensional angle space, so that the found neighbor points are more in line with the actual situation.
  • FIG. 3 is a schematic diagram of a point cloud arrangement in an embodiment of the present disclosure.
  • the preset detection distance (distance) is 2 meters
  • the simulation point cloud lasers with different angles form different fields of view, and different fields of view form overlapping areas.
  • the enlarged schematic part in Figure 3 is used to represent the distribution of point clouds in the overlapping area.
  • the circles represent points
  • the numbers in the circles represent the serial numbers of the points.
  • point 49178 is adjacent to point 3294, point 3302, point 3314, point 49394, point 49402, point 2014, point 48761 and point 48537, that is, the positions of the points are adjacent but the serial numbers of the point clouds are not the same adjacent.
  • point 3302, point 49394, point 48761 and point 49402 are the nearest neighbors of point 49178
  • point 3294, point 3314, point 2014 and point 8537 are the second nearest neighbors of point 49178.
  • the lidar records the nearest neighbor point and the second nearest neighbor point of each point in the simulation point cloud to generate a point cloud neighbor table.
  • the lidar traverses the second point cloud, and searches for the nearest neighbor point of each point in the second point cloud.
  • the lidar can search the K1 nearest neighbors of each point through a search algorithm (such as the KD tree (K-dimensional Tree) algorithm), and record these nearest neighbors to generate a fixed point cloud neighbor table.
  • a search algorithm such as the KD tree (K-dimensional Tree) algorithm
  • the lidar may also use other search algorithms to search for the nearest neighbor of each point, which is not specifically limited in this embodiment of the present disclosure.
  • S206 it may further include: S209 , traversing the second point cloud, and searching for the second nearest neighbor point of each point in the second point cloud.
  • lidar can search for K2 next-nearest neighbors of each point through the KD tree algorithm.
  • S210. Generate a point cloud neighbor table based on the nearest neighbor point and the second nearest neighbor point, that is, record these nearest neighbor points and the second nearest neighbor point to generate a fixed point cloud neighbor table.
  • search algorithm may be used to search for the nearest neighbor point and the second nearest neighbor point, or different search algorithms may be used to search for the nearest neighbor point and the second nearest neighbor point, which is not specifically limited in this embodiment of the present disclosure.
  • FIG. 4 is a flow chart of point cloud processing in an embodiment of the present disclosure.
  • FIG. 5 is another flow chart of point cloud processing in an embodiment of the present disclosure. The point cloud processing method will be described with reference to FIG. 4 and FIG. 5 .
  • point A in the first point cloud is taken as an example.
  • the processing method of point cloud can comprise the following steps:
  • S403 query the neighbor table, and calculate the first Euclidean distance from point A to K1 nearest neighbor points in the first point cloud; enter S404;
  • the outlier point can be determined based on the Euclidean distance from any point in the first point cloud to the nearest neighbor point by traversing the input first point cloud and querying the point cloud neighbor table.
  • the point cloud processing method may include the following steps:
  • S504 query the neighbor table, calculate the first Euclidean distance from point A to K1 nearest neighbor points in the first point cloud, and enter S505;
  • the point is a suspected outlier point, query the neighbor table, and calculate the suspected outlier point to K2 times The second Euclidean distance of the nearest neighbor point; enter S508;
  • steps S501-S510 that the first point cloud input is traversed, the point cloud neighbor table is generated and the point cloud neighbor table is queried, based on the Euclidean distance from any point in the first point cloud to the nearest neighbor point and the second nearest neighbor point, namely Outliers can be identified.
  • the nearest neighbor point of each point in the point cloud is determined by querying the point cloud neighbor table, and the outlier point in the point cloud is determined according to the Euclidean distance from each point to the nearest neighbor point.
  • the present disclosure uses laser radar angle calibration data to generate a simulation point cloud, and generates a point cloud neighbor table according to the positional relationship of points in the simulation point cloud. Because the simulated point cloud and the unknown point cloud have the same launch angle, the arrangement of points in the simulated point cloud and the arrangement of points in the unknown point cloud are in one-to-one correspondence.
  • the unknown point cloud uses the neighbor table generated by the simulated point cloud to determine the nearest neighbor point of any point in the unknown point cloud, and the nearest neighbor point determined by this method is more accurate.
  • an embodiment of the present disclosure provides a point cloud processing device, which can be a chip or a system-on-chip in a laser radar device, and can also be used in a laser radar device to implement the above-mentioned various embodiments.
  • the device can realize the point cloud processing functions in the above-mentioned embodiments, and these functions can be realized by executing corresponding software through hardware.
  • These hardware or software include one or more modules with corresponding functions mentioned above.
  • FIG. 6 is a schematic structural diagram of a point cloud processing device in an embodiment of the present disclosure. Referring to FIG.
  • the processing device 600 may include: a data acquisition module 601 for acquiring the first point cloud of the lidar,
  • the point cloud generated by the lidar is an unordered point cloud;
  • the distance calculation module 602 is used to traverse the first point cloud, and calculate the first Euclidean distance from each point in the first point cloud to the nearest neighbor point by querying the point cloud neighbor table , where the point cloud neighbors
  • the table is generated based on the preset angle calibration data of the lidar;
  • the data analysis module 603 is configured to determine outliers from the first point cloud based at least on the first Euclidean distance.
  • the value of the first value can be set according to the actual situation.
  • the data analysis module 603 is further configured to, for the i-th point in the first point cloud, determine from the nearest neighbors of the i-th point that the first Euclidean distance is less than the first threshold The number of one point, i is a positive integer; if the number of the first point is less than the second threshold, the i-th point is determined as an outlier point.
  • the distance calculation module 602 is also used to traverse the first point cloud, and calculate the second Euclidean distance from each point in the first point cloud to the second nearest neighbor point by querying the point cloud neighbor table; the data The analysis module 603 is further configured to determine outliers from the first point cloud based on the first Euclidean distance and the second Euclidean distance.
  • the value of the third value can be set according to the actual situation.
  • the data analysis module 603 is further configured to determine suspected outliers from the first point cloud based on the first Euclidean distance; Identify outliers.
  • the data analysis module 603 is further configured to, for the i-th point in the first point cloud, determine from the nearest neighbors of the i-th point that the first Euclidean distance is less than the third threshold The number of two points, i is a positive integer; if the number of the second point is less than the fourth threshold, the i-th point is determined as a suspected outlier.
  • the data analysis module 603 is further configured to, for the jth suspected outlier in the first point cloud, determine the second Euclidean distance from the second nearest neighbors of the jth suspected outlier
  • the number of the third points less than the fifth threshold, j is a positive integer; if the number of the third points is less than or equal to the sixth threshold, the jth suspected outlier point is determined as an outlier point.
  • the processing device 600 further includes:
  • the point cloud generation module is used to generate a second point cloud at a preset detection distance based on the angle calibration data of the lidar; the second point cloud is in one-to-one correspondence with the first point cloud;
  • Search module for traversing the second point cloud, search for the nearest neighbor point and second nearest neighbor point of each point;
  • the point cloud neighbor table generation module is used to generate a point cloud neighbor table based on the nearest neighbor point and the second nearest neighbor point of each point.
  • the data acquisition module 601 , the distance calculation module 602 and the data analysis module 603 mentioned in the embodiments of the present disclosure may be one or more processors.
  • an embodiment of the present disclosure provides a laser radar, including: a memory storing computer-executable instructions; a processor connected to the memory for executing the computer-executable instructions and being able to implement the above-mentioned one or The point cloud processing method described in multiple embodiments.
  • the present disclosure provides a computer storage medium.
  • the computer storage medium stores computer-executable instructions. After the computer-executable instructions are executed by a processor, the point cloud as described in one or more of the above-mentioned embodiments can be realized. processing method.
  • FIG. 7 shows a configuration block diagram of an electronic device 700 according to an embodiment of the present disclosure.
  • Electronic device 700 may be any type of general or special purpose computing device, such as a desktop computer, laptop computer, server, mainframe computer, cloud-based computer, tablet computer, wearable device, vehicle electronics, or the like.
  • an electronic device 700 includes an input/output (Input/Output, I/O) interface 701 , a network interface 702 , a processor 703 and a memory 704 .
  • I/O input/output
  • I/O interface 701 is a collection of components that can receive input from a user and/or provide output to a user.
  • I/O interface 701 may include, but is not limited to, buttons, keyboards, keypads, LCD displays, LED displays, or other similar display devices, including display devices with touch screen capabilities to enable interaction between the user and the electronic device.
  • Network interface 702 may include various adapters and circuitry implemented in software and/or hardware to enable communication with the lidar using wired or wireless protocols.
  • the wired protocol is, for example, any one or more of serial port protocol, parallel port protocol, Ethernet protocol, USB protocol or other wired communication protocols.
  • the wireless protocol is, for example, any IEEE 802.11 Wi-Fi protocol, cellular network communication protocol, or the like.
  • Memory 704 includes a single memory or one or more memories or storage locations including, but not limited to, Random Access Memory (RAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Read Only Memory (ROM) ), EPROM, EEPROM, flash memory, logic blocks of FPGAs, hard disks, or any other layers of the memory hierarchy.
  • RAM Random Access Memory
  • DRAM Dynamic Random Access Memory
  • SRAM Static Random Access Memory
  • ROM Read Only Memory
  • EPROM Electrically erasable programmable read-only Memory
  • EEPROM Electrically erasable programmable read-only Memory
  • flash memory logic blocks of FPGAs, hard disks, or any other layers of the memory hierarchy.
  • Memory 704 may be used to store any type of instructions, software or algorithms, including instructions 705 for controlling the general functions and operations of electronic device 700 .
  • the processor 703 controls general operations of the electronic device 700 .
  • Processor 703 may include but not limited to CPU, hardware microprocessor, hardware processor, multi-core processor, single-core processor, microcontroller, application specific integrated circuit (ASIC), DSP or other similar processing devices, capable of executing according to Any type of instructions, algorithms or software for controlling the operation and functionality of the electronic device 700 of the embodiments described in this disclosure.
  • Processor 703 can be various implementations of digital circuitry, analog circuitry, or mixed-signal (combination of analog and digital) circuitry that performs functions in a computing system.
  • the processor 703 may include, for example, portions or circuits such as an integrated circuit (IC), a separate processor core, an entire processor core, a separate processor, a programmable hardware device such as a field programmable gate array (FPGA), and/or A system that includes multiple processors.
  • IC integrated circuit
  • FPGA field programmable gate array
  • Communication between components of electronic device 700 may be established using internal bus 706 .
  • Electronic device 700 is communicatively coupled to the lidar to be calibrated to control the operation of the lidar.
  • the point cloud processing method according to the present disclosure may be stored in the memory 704 of the electronic device 700 in the form of computer readable instructions.
  • the processor 703 implements the point cloud processing method by reading the stored computer-readable instructions.
  • electronic device 700 is described using certain components, in alternative embodiments, different components may be present in electronic device 700 .
  • electronic device 700 may include one or more additional processors, memory, network interfaces, and/or I/O interfaces. Additionally, one or more of the components may not be present in electronic device 700 . Additionally, although separate components are shown in FIG. 7 , in some embodiments some or all of a given component may be integrated into one or more of the other components in electronic device 700 .
  • the present disclosure can be implemented as any combination of an apparatus, system, integrated circuit, and computer program or program product on a non-transitory computer readable medium.
  • the computer-readable storage medium or the computer-executable instructions in the program product may be configured to perform operations corresponding to the above-mentioned device and method embodiments.
  • the embodiments of the computer-readable storage medium or the program product will be obvious to those skilled in the art, so the description will not be repeated.
  • Computer-readable storage media and program products for carrying or including the computer-executable instructions described above also fall within the scope of the present disclosure.
  • Such storage media may include, but are not limited to, floppy disks, optical disks, magneto-optical disks, memory cards, memory sticks, and the like.
  • a plurality of functions included in one unit in the above embodiments may be realized by separate devices.
  • a plurality of functions implemented by a plurality of units in the above embodiments may be respectively implemented by separate devices.
  • one of the above functions may be realized by a plurality of units. Such a configuration is included in the technical scope of the present disclosure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Electromagnetism (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Optical Radar Systems And Details Thereof (AREA)

Abstract

The present disclosure discloses a point cloud processing method. The method comprises: obtaining a first point cloud of a laser radar; traversing the first point cloud, and by means of looking up a point cloud neighbor table, calculating a first Euclidean distance from each point in the first point cloud to a nearest neighbor point; and determining outliers from within the first point cloud on the basis of at least the first Euclidean distances.

Description

一种点云的处理方法、装置及激光雷达A point cloud processing method, device and laser radar
相关申请的交叉引用Cross References to Related Applications
本公开主张在2022年02月16日在中国提交的中国专利申请No.202210140658.7的优先权,其全部内容通过引用包含于此。This disclosure claims priority to Chinese Patent Application No. 202210140658.7 filed in China on Feb. 16, 2022, the entire contents of which are hereby incorporated by reference.
技术领域technical field
本公开涉及激光雷达技术领域,尤其涉及一种点云的处理方法、装置及激光雷达。The present disclosure relates to the technical field of laser radar, and in particular to a point cloud processing method, device and laser radar.
背景技术Background technique
激光雷达(light detection and ranging,LiDAR)的数据形式是点云。点云数据中包含多种特征信息,例如:三维坐标信息、颜色信息、反射强度信息等。The data form of LiDAR (light detection and ranging, LiDAR) is point cloud. Point cloud data contains a variety of feature information, such as: three-dimensional coordinate information, color information, reflection intensity information, etc.
目前,随着激光雷达的广泛应用,对激光雷达的测量精度提出了越来越高的要求,对点云数据的可靠性也提出了更高的要求。为了确保点云数据的准确可靠,就需要对点云中的噪点,例如离群点进行剔除。然而,相关确定离群点的算法计算量大且效率低下。At present, with the wide application of lidar, higher and higher requirements are put forward for the measurement accuracy of lidar, and higher requirements are also put forward for the reliability of point cloud data. In order to ensure the accuracy and reliability of the point cloud data, it is necessary to remove the noise points in the point cloud, such as outliers. However, the algorithms associated with identifying outliers are computationally intensive and inefficient.
发明内容Contents of the invention
本公开提供了一种点云的处理方法、装置及激光雷达,以实现从点云中快速识别出离群点。The present disclosure provides a point cloud processing method, device and laser radar, so as to quickly identify outliers from the point cloud.
根据本公开实施例的第一方面,提供一种点云的处理方法,包括:获取激光雷达的第一点云,激光雷达产生的点云为无序点云;遍历第一点云,通过查询点云近邻表,计算第一点云中每一个点到最近邻点的第一欧式距离,其中,点云近邻表是基于激光雷达的预设角度标定数据生成的;至少基于第一欧式距离,从第一点云中确定离群点。 According to the first aspect of an embodiment of the present disclosure, a point cloud processing method is provided, including: obtaining the first point cloud of the lidar, the point cloud generated by the lidar is an unordered point cloud; traversing the first point cloud, by querying The point cloud neighbor table calculates the first Euclidean distance from each point in the first point cloud to the nearest neighbor point, wherein the point cloud neighbor table is generated based on the preset angle calibration data of the lidar; at least based on the first Euclidean distance, Identify outliers from the first point cloud.
在根据第一方面的一些示例性的实施例中,至少基于第一欧式距离,从第一点云中确定离群点,包括:针对第一点云中的第i个点,从第i个点的最近邻点中确定第一欧式距离小于第一阈值的第一点的数量,i为正整数;若第一点的数量小于第二阈值,则将第i个点确定为离群点。In some exemplary embodiments according to the first aspect, at least based on the first Euclidean distance, determining outliers from the first point cloud includes: for the i-th point in the first point cloud, from the i-th Determine the number of the first point whose first Euclidean distance is less than the first threshold in the nearest neighbor of the point, and i is a positive integer; if the number of the first point is less than the second threshold, the i-th point is determined as an outlier.
在根据第一方面的一些示例性的实施例中,在获得输入的第一点云之后,方法还包括:遍历第一点云,通过查询点云近邻表,计算第一点云中每一个点到次近邻点的第二欧式距离;至少基于第一欧式距离,从第一点云中确定离群点,包括:基于第一欧式距离和第二欧式距离,从第一点云中确定离群点。In some exemplary embodiments according to the first aspect, after obtaining the input first point cloud, the method further includes: traversing the first point cloud, and calculating each point in the first point cloud by querying the point cloud neighbor table a second Euclidean distance to the second nearest neighbor; determining outliers from the first point cloud based on at least the first Euclidean distance, including: determining outliers from the first point cloud based on the first Euclidean distance and the second Euclidean distance point.
在根据第一方面的一些示例性的实施例中,基于第一欧式距离和第二欧式距离,从第一点云中确定离群点,包括:基于第一欧式距离,从第一点云中确定疑似离群点;基于第二欧式距离,从疑似离群点中确定离群点。In some exemplary embodiments according to the first aspect, determining outliers from the first point cloud based on the first Euclidean distance and the second Euclidean distance includes: determining outliers from the first point cloud based on the first Euclidean distance Determine the suspected outliers; determine the outliers from the suspected outliers based on the second Euclidean distance.
在根据第一方面的一些示例性的实施例中,基于第一欧式距离,从第一点云中确定疑似离群点,包括:针对第一点云中的第i个点,从第i个点的最近邻点中确定第一欧式距离小于第三阈值的第二点的数量,i为正整数;若第二点的数量小于第四阈值,则将第i个点确定为疑似离群点。In some exemplary embodiments according to the first aspect, determining suspected outliers from the first point cloud based on the first Euclidean distance includes: for the i-th point in the first point cloud, from the i-th Determine the number of the second point whose first Euclidean distance is less than the third threshold in the nearest neighbor of the point, i is a positive integer; if the number of the second point is less than the fourth threshold, then determine the i-th point as a suspected outlier .
在根据第一方面的一些示例性的实施例中,基于第二欧式距离,从疑似离群点中确定离群点,包括:针对第一点云中的第j个疑似离群点,从第j个疑似离群点的次近邻点中确定第二欧式距离小于第五阈值的第三点的数量,j为正整数;若第三点的数量小于或等于第六阈值,则将第j个疑似离群点确定为离群点。In some exemplary embodiments according to the first aspect, determining the outliers from the suspected outliers based on the second Euclidean distance includes: for the jth suspected outlier in the first point cloud, from the Determine the number of third points whose second Euclidean distance is less than the fifth threshold among the second nearest neighbor points of j suspected outliers, and j is a positive integer; if the number of the third points is less than or equal to the sixth threshold, then the jth Suspected outliers are identified as outliers.
在根据第一方面的一些示例性的实施例中,方法还包括:基于激光雷达的角度标定数据,在预设探测距离下,生成第二点云;第二点云与第一点云一一对应;遍历第二点云,搜索每一点的最近邻点;至少基于最近邻点,生成点云近邻表。In some exemplary embodiments according to the first aspect, the method further includes: generating a second point cloud at a preset detection distance based on the angle calibration data of the lidar; the second point cloud is the same as the first point cloud Corresponding; traversing the second point cloud, searching for the nearest neighbor of each point; at least based on the nearest neighbor, generating a point cloud neighbor table.
在根据第一方面的一些示例性的实施例中,在生成第二点云之后,方法 还包括:遍历第二点云,搜索每一点的次近邻点;基于最近邻点和次近邻点,生成点云近邻表。In some exemplary embodiments according to the first aspect, after generating the second point cloud, the method It also includes: traversing the second point cloud, searching for the second nearest neighbor point of each point; generating a point cloud neighbor table based on the nearest neighbor point and the second nearest neighbor point.
根据本公开实施例的第二方面,提供了一种点云的处理装置,该处理装置,包括:数据获取模块,用于获取激光雷达的第一点云,激光雷达产生的点云为无序点云;距离计算模块,用于遍历第一点云,通过查询点云近邻表,计算第一点云中每一个点到最近邻点的第一欧式距离,其中,点云近邻表是基于激光雷达的预设角度标定数据生成的;数据分析模块,用于至少基于第一欧式距离,从第一点云中确定离群点。According to the second aspect of the embodiments of the present disclosure, there is provided a point cloud processing device, the processing device includes: a data acquisition module, used to obtain the first point cloud of the laser radar, the point cloud generated by the laser radar is disordered Point cloud; the distance calculation module is used to traverse the first point cloud, and calculate the first Euclidean distance from each point in the first point cloud to the nearest neighbor by querying the point cloud neighbor table, wherein the point cloud neighbor table is based on the laser The radar preset angle calibration data is generated; the data analysis module is configured to determine outliers from the first point cloud based at least on the first Euclidean distance.
在根据第二方面的一些示例性的实施例中,数据分析模块,还用于针对第一点云中的第i个点,从第i个点的最近邻点中确定第一欧式距离小于第一阈值的第一点的数量,i为正整数;若第一点的数量小于第二阈值,则将第i个点确定为离群点。In some exemplary embodiments according to the second aspect, the data analysis module is further configured to, for the i-th point in the first point cloud, determine from the nearest neighbors of the i-th point that the first Euclidean distance is less than the first The quantity of the first point of a threshold, i is a positive integer; if the quantity of the first point is less than the second threshold, the i-th point is determined as an outlier.
在根据第二方面的一些示例性的实施例中,距离计算模块,还用于遍历第一点云,通过查询点云近邻表,计算第一点云中每一个点到次近邻点的第二欧式距离;数据分析模块,还用于基于第一欧式距离和第二欧式距离,从第一点云中确定离群点。In some exemplary embodiments according to the second aspect, the distance calculation module is also used to traverse the first point cloud, and calculate the second distance between each point in the first point cloud and the next nearest neighbor point by querying the point cloud neighbor table. Euclidean distance; the data analysis module is also used to determine outliers from the first point cloud based on the first Euclidean distance and the second Euclidean distance.
在根据第二方面的一些示例性的实施例中,数据分析模块,还用于基于第一欧式距离,从第一点云中确定疑似离群点;以及,用于基于第二欧式距离,从疑似离群点中确定离群点。In some exemplary embodiments according to the second aspect, the data analysis module is further configured to determine suspected outliers from the first point cloud based on the first Euclidean distance; and, based on the second Euclidean distance, from Identify outliers among suspected outliers.
在根据第二方面的一些示例性的实施例中,数据分析模块,还用于针对第一点云中的第i个点,从第i个点的最近邻点中确定第一欧式距离小于第三阈值的第二点的数量,i为正整数;若第二点的数量小于第四阈值,则将第i个点确定为疑似离群点。In some exemplary embodiments according to the second aspect, the data analysis module is further configured to, for the i-th point in the first point cloud, determine from the nearest neighbors of the i-th point that the first Euclidean distance is less than the first The number of the second points of the three thresholds, i is a positive integer; if the number of the second points is less than the fourth threshold, the i-th point is determined as a suspected outlier.
在根据第二方面的一些示例性的实施例中,数据分析模块,还用于针对第一点云中的第j个疑似离群点,从第j个疑似离群点的次近邻点中确定第二欧式距离小于第五阈值的第三点的数量,j为正整数;若第三点的数量小于或 等于第六阈值,则将第j个疑似离群点确定为离群点。In some exemplary embodiments according to the second aspect, the data analysis module is further configured to, for the jth suspected outlier point in the first point cloud, determine from the second nearest neighbors of the jth suspected outlier point The number of third points whose second Euclidean distance is less than the fifth threshold, j is a positive integer; if the number of third points is less than or is equal to the sixth threshold, then the jth suspected outlier point is determined as an outlier point.
根据本公开实施例的第三方面,提供了一种激光雷达,包括:存储器,存储有计算机可执行指令;处理器,与存储器相连,用于通过执行计算机可执行指令,以实现如第一方面及其任一示例性的实施方式所述的方法。According to a third aspect of the embodiments of the present disclosure, there is provided a laser radar, including: a memory storing computer-executable instructions; a processor connected to the memory for executing the computer-executable instructions to implement the first aspect and the method described in any exemplary embodiment thereof.
根据本公开实施例的第四方面,提供了一种计算机存储介质,计算机存储介质存储有计算机可执行指令,计算机可执行指令被处理器执行后能够实现如第一方面及其任一示例性的实施方式所述的方法。According to a fourth aspect of the embodiments of the present disclosure, a computer storage medium is provided, the computer storage medium stores computer-executable instructions, and the computer-executable instructions can implement the first aspect and any exemplary method thereof after being executed by a processor. The method described in the embodiment.
本公开提供的技术方案与相关技术相比存在的有益效果是:Compared with the related art, the beneficial effect of the technical solution provided by the present disclosure is:
在本公开中,通过查询点云近邻表,确定点云中每个点的最近邻点,并根据每个点到最近邻点的欧式距离来确定点云中的离群点。在对未知点云进行分析时,只需要查表获得近邻点,而无需每次都对近邻点进行搜寻,数据计算量小且方便高效,从而有效提升点云的处理效率。In the present disclosure, the nearest neighbor point of each point in the point cloud is determined by querying the point cloud neighbor table, and the outlier point in the point cloud is determined according to the Euclidean distance from each point to the nearest neighbor point. When analyzing the unknown point cloud, it is only necessary to look up the table to obtain the neighbor points, instead of searching for the neighbor points every time, the data calculation amount is small, convenient and efficient, thus effectively improving the processing efficiency of the point cloud.
进一步地,本公开采用激光雷达角度标定数据生成仿真点云,并根据仿真点云中点的位置关系生成点云近邻表。因为仿真点云与未知点云拥有同样的发射角度,所以仿真点云的点的排布与未知点云的点的排布是一一对应的。未知点云通过使用仿真点云生成的近邻表来确定未知点云中任意一点的最近邻点,这种方法确定的最近邻点更加准确。Further, the present disclosure uses laser radar angle calibration data to generate a simulation point cloud, and generates a point cloud neighbor table according to the positional relationship of points in the simulation point cloud. Because the simulated point cloud and the unknown point cloud have the same launch angle, the arrangement of points in the simulated point cloud and the arrangement of points in the unknown point cloud are in one-to-one correspondence. The unknown point cloud uses the neighbor table generated by the simulated point cloud to determine the nearest neighbor point of any point in the unknown point cloud, and the nearest neighbor point determined by this method is more accurate.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开的保护范围。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not intended to limit the scope of the present disclosure.
附图说明Description of drawings
图1为相关技术中的一种激光雷达的结构示意图;FIG. 1 is a schematic structural diagram of a laser radar in the related art;
图2为本公开实施例中的一种点云的处理方法的流程图;FIG. 2 is a flowchart of a point cloud processing method in an embodiment of the present disclosure;
图3为本公开实施例中的一种点云排布的示意图;FIG. 3 is a schematic diagram of a point cloud arrangement in an embodiment of the present disclosure;
图4为本公开实施例中的一种处理点云的流程图;FIG. 4 is a flow chart of point cloud processing in an embodiment of the present disclosure;
图5为本公开实施例中的另一种处理点云的流程图; FIG. 5 is another flow chart of point cloud processing in an embodiment of the present disclosure;
图6为本公开实施例中的点云的处理装置的一种结构示意图;FIG. 6 is a schematic structural diagram of a point cloud processing device in an embodiment of the present disclosure;
图7为本公开实施例的电子设备的配置框图。FIG. 7 is a configuration block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本公开实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本公开。在其它情况中省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本公开的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and techniques are presented for a thorough understanding of the embodiments of the present disclosure. It will be apparent, however, to one skilled in the art that the present disclosure may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present disclosure with unnecessary detail.
为了说明本公开所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions described in the present disclosure, specific examples are used below to illustrate.
激光雷达是一种目标探测技术。激光雷达通过激光器发出激光光束,激光光束遇到目标物体后发生漫反射,通过探测器接收反射回的光束,并根据发射的光束和反射回的光束确定目标物体的距离、方位、高度、速度、姿态、形状等特征量。LiDAR is an object detection technology. The laser radar emits a laser beam through a laser. The laser beam encounters a target object and undergoes diffuse reflection. The detector receives the reflected beam and determines the distance, orientation, height, speed, Features such as posture and shape.
激光雷达的应用领域非常广泛。除了运用在军事领域之外,目前还被广泛应用于生活领域,包括但不限于:智能驾驶车辆、智能驾驶飞机、三维(3-Dimension,3D)打印、虚拟现实、增强现实、服务机器人等领域。以智能驾驶技术为例,在智能驾驶车辆中设置激光雷达,激光雷达可通过快速且重复地发射激光束来扫描周围环境,以获取反映周围环境中的一个或多个目标对象的形貌、位置、运动的点云等。LiDAR has a wide range of applications. In addition to being used in the military field, it is also widely used in the field of life, including but not limited to: intelligent driving vehicles, intelligent driving aircraft, three-dimensional (3-Dimension, 3D) printing, virtual reality, augmented reality, service robots and other fields . Taking the intelligent driving technology as an example, the lidar is set in the intelligent driving vehicle, and the lidar can scan the surrounding environment by emitting laser beams quickly and repeatedly, so as to obtain the shape and position of one or more target objects in the surrounding environment , moving point clouds, etc.
需要说明的是,上述智能驾驶技术可以指无人驾驶、自动驾驶、辅助驾驶等技术。It should be noted that the above intelligent driving technology may refer to unmanned driving, automatic driving, assisted driving and other technologies.
图1为相关技术中的一种激光雷达的结构示意图,参见图1所示,激光雷达10可以包括:光发射装置101、光接收装置102和处理器103。其中,光发射装置101、光接收装置102均与处理器103连接。FIG. 1 is a schematic structural diagram of a laser radar in the related art. Referring to FIG. 1 , the laser radar 10 may include: a light emitting device 101 , a light receiving device 102 and a processor 103 . Wherein, both the light emitting device 101 and the light receiving device 102 are connected to the processor 103 .
其中,上述各器件之间的连接关系可以是电性连接,还可以是光纤连接。 更具体的,在光发射装置101和光接收装置102中,还可能分别包括多个光学器件,这些光学器件之间的连接关系还可能是空间光传输连接。Wherein, the connection relationship among the above-mentioned components may be an electrical connection, and may also be an optical fiber connection. More specifically, the light emitting device 101 and the light receiving device 102 may also respectively include a plurality of optical devices, and the connection relationship between these optical devices may also be a spatial optical transmission connection.
处理器103用于实现对光发射装置101和光接收装置102的控制,以使光发射装置101和光接收装置102能够正常工作。示例性的,处理器103可以为光发射装置101和光接收装置102分别提供驱动电压,处理器103还可以为光发射装置101和光接收装置102提供控制信号。The processor 103 is used to control the light emitting device 101 and the light receiving device 102, so that the light emitting device 101 and the light receiving device 102 can work normally. Exemplarily, the processor 103 may provide driving voltages for the light emitting device 101 and the light receiving device 102 respectively, and the processor 103 may also provide control signals for the light emitting device 101 and the light receiving device 102 .
示例性的,处理器103可以是通用处理器,如中央处理器(central processing unit,CPU)、网络处理器(network processor,NP)等;处理器103还可以是数字信号处理器(digital signal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。Exemplary, the processor 103 can be a general-purpose processor, such as a central processing unit (central processing unit, CPU), a network processor (network processor, NP), etc.; the processor 103 can also be a digital signal processor (digital signal processing , DSP), application specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
光发射装置101中还包括光源(图1未示出)。可以理解的,上述光源可以指激光器,激光器的数量可以是一个或者多个。可选地,激光器可以具体为脉冲激光二极管(pulsed laser diode,PLD)、半导体激光器、光纤激光器等。上述光源用于发射激光束。具体的,处理器103可以向光源发送发射控制信号,从而触发光源发射激光束。The light emitting device 101 also includes a light source (not shown in FIG. 1 ). It can be understood that the above-mentioned light source may refer to a laser, and the number of the laser may be one or more. Optionally, the laser may specifically be a pulsed laser diode (pulsed laser diode, PLD), a semiconductor laser, a fiber laser, or the like. The above-mentioned light sources are used to emit laser beams. Specifically, the processor 103 may send an emission control signal to the light source, thereby triggering the light source to emit the laser beam.
可以理解的,上述激光束也可以称为激光脉冲、激光、发射光束等。It can be understood that the above-mentioned laser beams may also be referred to as laser pulses, lasers, emitted light beams, and the like.
下面结合图1所示的激光雷达的结构,简单描述激光雷达对目标物体104的探测过程。In the following, the detection process of the target object 104 by the laser radar will be briefly described in combination with the structure of the laser radar shown in FIG. 1 .
参见图1所示,激光束沿发射方向进行传播,当激光束遇到目标物体104后,在目标物体104的表面发生反射,反射回的光束被激光雷达的光接收装置102接收。这里,可以将激光束被目标物体104反射回的光束称为回波光束(图1中激光束和回波光束采用实线标识)。As shown in FIG. 1 , the laser beam propagates along the emission direction. When the laser beam encounters the target object 104 , it is reflected on the surface of the target object 104 , and the reflected beam is received by the light receiving device 102 of the laser radar. Here, the beam reflected by the target object 104 may be referred to as an echo beam (the laser beam and the echo beam are marked by solid lines in FIG. 1 ).
光接收装置102接收到回波光束后,对回波光束进行光电转换,即,将回波光束转换为电信号,光接收装置102将回波光束对应的电信号输出至处 理器103,处理器103可以根据回波光束的电信号,获取目标物体104的形貌、位置、运动的点云等。After receiving the echo beam, the light receiving device 102 performs photoelectric conversion on the echo beam, that is, converts the echo beam into an electrical signal, and the light receiving device 102 outputs the electrical signal corresponding to the echo beam to the processor 103, and the processor 103 can obtain the shape, position, and moving point cloud of the target object 104 according to the electrical signal of the echo beam.
在实际应用中,激光雷达中的微机电系统(micro-electro-mechanical system,MEMS)扫描式激光雷达的激光器为固定连接,光只能沿着相应的角度传播,使得MEMS扫描式激光雷达中的单个激光器往往只具有有限的视场。为了实现激光雷达大视场,甚至全视场覆盖的应用要求,可以在MEMS扫描式激光雷达中配置多个不同角度的激光器,不同角度的激光器通过小视场拼接的方式扩大MEMS扫描式激光雷达的视场变为大视场。同时,为了防止不同小视场之间具有盲区,影响探测准确性,小视场之间常常具有一定的交叠区。交叠区的存在,使本来在小视场中点的序号分布有序的点云(即有序点云),在整个激光雷达视场中变成了点的序号分布无序的点云(即无序点云)。In practical applications, the laser of the micro-electro-mechanical system (MEMS) scanning laser radar in the laser radar is fixedly connected, and the light can only propagate along the corresponding angle, so that the laser in the MEMS scanning laser radar Individual lasers often only have a limited field of view. In order to achieve the application requirements of large field of view or even full coverage of the laser radar, multiple lasers with different angles can be configured in the MEMS scanning laser radar. The field of view becomes a large field of view. At the same time, in order to prevent blind spots between different small fields of view and affect the detection accuracy, there is often a certain overlapping area between small fields of view. The existence of the overlapping area makes the point cloud with orderly distribution of point numbers in the small field of view (that is, ordered point cloud) become a point cloud with disordered point number distribution in the entire lidar field of view (that is, unordered point cloud).
在一些特殊情况,激光雷达出现随机噪声,例如,雪崩光电二极管(avalanche photon diode,APD)阵列部分接收器损坏、APD被阳光直射等。随机噪声的出现,会致使激光雷达扫描获取的点云出现缺陷(通常表现为点云中出现离群点),进而影响激光雷达的探测准确性。In some special cases, random noise occurs in lidar, for example, avalanche photodiode (avalanche photon diode, APD) array part of the receiver is damaged, APD is exposed to direct sunlight, etc. The appearance of random noise will cause defects in the point cloud acquired by lidar scanning (usually manifested as outliers in the point cloud), which will affect the detection accuracy of lidar.
因为无序点云的存在,使点云中的点具有位置相邻点的序号并不相邻的特点。无法根据点的序号对点云进行离群点剔除。通常采用点云库(point cloud library,PCL)算法中的统计异常值删除(statistical outlier removal,SOR)对点云中的离群点进行剔除。SOR算法具有通用性强的优点,但是SOR算法在每次输入点云后,需要对每个点在三维空间上的最近邻进行搜寻,耗时非常久并且不稳定。Because of the existence of unordered point cloud, the points in the point cloud have the characteristics that the sequence numbers of adjacent points are not adjacent. It is not possible to remove outliers from the point cloud based on the serial number of the point. Usually, the statistical outlier removal (SOR) in the point cloud library (PCL) algorithm is used to remove the outlier points in the point cloud. The SOR algorithm has the advantage of strong versatility, but the SOR algorithm needs to search for the nearest neighbor of each point in three-dimensional space after each input point cloud, which takes a very long time and is unstable.
为了解决上述问题,本公开实施例提供一种点云的处理方法。该方法可以应用于产生无序点云的激光雷达,如MEMS扫描式激光雷达。In order to solve the above problems, an embodiment of the present disclosure provides a point cloud processing method. This method can be applied to lidars that generate disordered point clouds, such as MEMS scanning lidars.
应理解的,本公开实施例所指的激光雷达可以为能够获得出厂角度标定文件的所有激光雷达或者能够知道激光雷达中发射器发射角度的激光雷达。 即所有可以根据预设的文件和数据得到点云近邻表的激光雷达。为了方便说明,下文统称为激光雷达。It should be understood that the lidar referred to in the embodiments of the present disclosure may be all lidars that can obtain factory angle calibration files or lidars that can know the emission angle of the transmitter in the lidar. That is, all lidars that can obtain point cloud neighbor tables based on preset files and data. For the convenience of description, the following are collectively referred to as lidar.
图2为本公开实施例中的一种点云的处理方法的流程图。参见图2中实线所示,该方法包括步骤S201至S203。FIG. 2 is a flow chart of a point cloud processing method in an embodiment of the present disclosure. Referring to the solid line in Fig. 2, the method includes steps S201 to S203.
S201,获取激光雷达的第一点云。S201. Acquire the first point cloud of the lidar.
这里,激光雷达产生的点云为无序点云。相应的,第一点云即为无序点云。Here, the point cloud generated by lidar is an unordered point cloud. Correspondingly, the first point cloud is an unordered point cloud.
应理解的,激光雷达可以通过对目标物体进行扫描,获得用于描述目标物体相关特性的点云,并将该点云作为第一点云。或者,激光雷达可以通过获取过去扫描并存储的历史点云,并将该点云作为第一点云。当然,激光雷达还可以通过其他方式获得第一点云,本公开实施例对此不作具体限定。It should be understood that the lidar can scan the target object to obtain a point cloud for describing the relevant characteristics of the target object, and use the point cloud as the first point cloud. Alternatively, lidar can be obtained by obtaining a historical point cloud that has been scanned and stored in the past, and use this point cloud as the first point cloud. Of course, the lidar can also obtain the first point cloud in other ways, which is not specifically limited in this embodiment of the present disclosure.
示例性的,第一点云可以包括点的序号、点的三维坐标等信息。Exemplarily, the first point cloud may include information such as serial numbers of points, three-dimensional coordinates of points, and the like.
S202,遍历第一点云,通过查询点云近邻表,计算第一点云中每一个点到最近邻点的第一欧式距离。S202. Traverse the first point cloud, and calculate the first Euclidean distance from each point in the first point cloud to the nearest neighbor point by querying the point cloud neighbor table.
其中,点云近邻表可以是基于激光雷达的预设角度标定数据生成的。点云近邻表还可以包括激光雷达的点云中各个点的最近邻点。这里,最近邻点可以理解为在三维空间内与点云中每一个点的距离最近的点。在实际应用中,一个点的最近邻点可以为一个点或者多个点,那么,一个点的最近邻点的个数可以设置为K1,K1为正整数。Wherein, the point cloud neighbor table may be generated based on the preset angle calibration data of the lidar. The point cloud neighbor table may also include the nearest neighbor points of each point in the lidar point cloud. Here, the nearest neighbor point can be understood as the point with the closest distance to each point in the point cloud in the three-dimensional space. In practical application, the nearest neighbor of a point can be one point or multiple points, then, the number of the nearest neighbor of a point can be set as K1, and K1 is a positive integer.
需要说明的是,最近邻点的个数可以根据算法计算平台的资源以及应用场景对实时性的要求设置。示例性的,若计算资源充分或计算实时性要求较低,最近邻点的个数K1可以设置为8;若计算资源有限,或计算实时性要求较高时,最近邻点的个数K1可以设置为4。当然,还可以存在其他情况,本公开实施例对此不做具体限定。It should be noted that the number of nearest neighbors can be set according to the resources of the algorithm computing platform and the real-time requirements of the application scenario. Exemplarily, if computing resources are sufficient or computing real-time requirements are low, the number K1 of nearest neighbors can be set to 8; if computing resources are limited, or computing real-time requirements are high, the number K1 of nearest neighbors can be Set to 4. Of course, other situations may also exist, which are not specifically limited in this embodiment of the present disclosure.
应理解的,激光雷达中预先存储有上述点云近邻表。那么,激光雷达在通过S101获得第一点云之后,可以遍历第一点云中的每一个点(下面以点A 为例进行描述),通过查询点云近邻表,获得点A的K1个最近邻点,并计算点A到K1个最近邻点的第一欧式距离。也就是说,激光雷达通过查询点云近邻表,确定第一点云中每一个点的K1个最近邻点,并计算各个点与其K1个最近邻点的欧式距离,此时,共计算K1个第一欧式距离。It should be understood that the aforementioned point cloud neighbor table is pre-stored in the lidar. Then, after the lidar obtains the first point cloud through S101, it can traverse each point in the first point cloud (hereinafter referred to as point A As an example), by querying the point cloud neighbor table, K1 nearest neighbor points of point A are obtained, and the first Euclidean distance from point A to K1 nearest neighbor points is calculated. That is to say, the lidar determines the K1 nearest neighbor points of each point in the first point cloud by querying the point cloud neighbor table, and calculates the Euclidean distance between each point and its K1 nearest neighbor points. At this time, a total of K1 points are calculated First Euclidean distance.
在本公开实施例中,生成点云邻近表的点云与第一点云是同一激光雷达上的激光器发射的激光束产生的。由于激光器的发射角度固定,且发射光束沿直线传播,所以激光雷达点云中的点的排布是相对固定的。那么,通过查询点云近邻表可以获知第一点云中任意一点的最近邻点。In the embodiment of the present disclosure, the point cloud for generating the point cloud proximity table and the first point cloud are generated by a laser beam emitted by a laser on the same lidar. Since the emission angle of the laser is fixed and the emission beam propagates along a straight line, the arrangement of points in the lidar point cloud is relatively fixed. Then, the nearest neighbor point of any point in the first point cloud can be obtained by querying the point cloud neighbor table.
S203,基于第一欧式距离,从第一点云中确定离群点。S203. Determine outliers from the first point cloud based on the first Euclidean distance.
应理解的,激光雷达在确定了点A的K1个最近邻点和相应的第一欧式距离之后,可以根据满足预设条件的第一欧式距离的最近邻点的数量,确定点A是否为离群点。It should be understood that after the lidar determines the K1 nearest neighbors of point A and the corresponding first Euclidean distances, it can determine whether point A is a distance from group points.
具体来说,S203可以包括:针对第一点云中的第i(i=1、2、3…)个点,从第i个点的最近邻点中确定第一欧式距离小于第一阈值的第一点的数量。若第一点的数量小于第二阈值,则将第i个点确定为离群点。Specifically, S203 may include: for the i-th (i=1, 2, 3...) point in the first point cloud, determine from the nearest neighbors of the i-th point that the first Euclidean distance is less than the first threshold Number of first points. If the number of the first points is less than the second threshold, the ith point is determined as an outlier point.
应理解的,激光雷达通过S202获得第i个点到最近邻点的第一欧式距离,共K1个。然后,激光雷达执行S203,从K1个最近邻点中找出第一欧式距离小于第一阈值的最近邻点(即第一点),并根据第一点的数量确定第i个点是否为离群点。若第一点的数量小于第二阈值,则激光雷达确定第i个点为离群点,反之,激光雷达确定第i个点为非离群点,并针对第i+1个点重复上述步骤。It should be understood that the lidar obtains the first Euclidean distance from the i-th point to the nearest neighbor point through S202, and there are K1 in total. Then, the lidar executes S203 to find out the nearest neighbor point (that is, the first point) whose first Euclidean distance is less than the first threshold from the K1 nearest neighbor points, and determines whether the i-th point is a distance from the first point according to the number of first points. group points. If the number of the first point is less than the second threshold, the lidar determines that the i-th point is an outlier point, otherwise, the lidar determines that the i-th point is a non-outlier point, and repeats the above steps for the i+1th point .
在实际应用中,上述第一点为第一欧式距离小于第一阈值的最近邻点的集合,该集合为K1个最近邻点的子集。第一点的数量可以小于或者等于K1。In practical applications, the above-mentioned first point is a set of nearest neighbor points whose first Euclidean distance is smaller than the first threshold, and this set is a subset of K1 nearest neighbor points. The number of first points may be less than or equal to K1.
需要说明的是,激光雷达可以遍历第一点云,对每一个点都执行上述判断过程,逐个确定每一个点是否为离群点。例如,以点A为例,激光雷达从点A的K1个最近邻点中确定出满足第一欧式距离小于第一阈值这一条件的 第一点,共S1个。若第一点的数量(S1个)小于第二阈值,则激光雷达可以将点A确定为离群点。反之,激光雷达将点A确定为非离群点,并针对下一个点重复上述步骤。It should be noted that the lidar can traverse the first point cloud, perform the above judgment process for each point, and determine whether each point is an outlier point one by one. For example, taking point A as an example, the lidar determines from the K1 nearest neighbor points of point A that satisfy the condition that the first Euclidean distance is less than the first threshold The first point, a total of S1. If the number of the first points (S1) is less than the second threshold, the laser radar may determine point A as an outlier point. Conversely, the lidar determines point A as a non-outlier and repeats the above steps for the next point.
应理解的,第一阈值和第二阈值是根据激光雷达的应用场景、精度要求等实际情况自行设定的。第一阈值和第二阈值可以为经验值。It should be understood that the first threshold and the second threshold are set according to actual conditions such as the application scenario and accuracy requirements of the lidar. The first threshold and the second threshold may be empirical values.
示例性的,假设,第一阈值为5厘米,第二阈值为2个。如果激光雷达通过S203在点A的4个最近邻点(K1=4)中确定第一欧式距离小于5厘米(即第一阈值)的第一点为3个(可以记为点B、点C以及点D),又因为3大于2(即第二阈值),则可以确定点A不是离群点。如果激光雷达通过S203在点A的4个最近邻点(K1=4)中确定第一欧式距离小于5厘米(即第一阈值)的第一点为1个(可以记为点E),又因为1小于2(即第二阈值),则可以确定点A是离群点。Exemplarily, it is assumed that the first threshold is 5 cm, and the second threshold is 2. If the lidar determines that the first Euclidean distance is less than 5 cm (that is, the first threshold) among the 4 nearest neighbor points (K1=4) of point A through S203, there are 3 first points (can be recorded as point B, point C and point D), and because 3 is greater than 2 (ie the second threshold), it can be determined that point A is not an outlier. If the lidar determines that the first point whose first Euclidean distance is less than 5 cm (i.e. the first threshold) is 1 (can be recorded as point E) among the 4 nearest neighbor points (K1=4) of point A through S203, and Since 1 is smaller than 2 (ie, the second threshold), it can be determined that point A is an outlier.
在实际应用中,针对于第一点云中各个点均执行S202至S203,以判断第一点云中的各个点是否为离群点。In practical applications, S202 to S203 are executed for each point in the first point cloud to determine whether each point in the first point cloud is an outlier point.
至此,便根据最近邻点从第一点云中确定出离群点,不仅简单便捷,计算量小,能够有效提升对离群点的筛查效率。So far, the outliers are determined from the first point cloud according to the nearest neighbor points, which is not only simple and convenient, but also has a small amount of calculation, and can effectively improve the screening efficiency of outliers.
在一些示例性的实施例中,上述点云近邻表还可以包括点云中各个点的次近邻点。这里,次近邻点可以理解为在三维空间中与点云中每一个点的距离次近的点。在实际应用中,一个点的次近邻点可以为一个点或者多个点,那么,一个点的最近邻点的个数可以设置为K2,K2为正整数。In some exemplary embodiments, the above-mentioned point cloud neighbor table may further include the second nearest neighbor points of each point in the point cloud. Here, the second nearest neighbor point can be understood as the second closest point to each point in the point cloud in three-dimensional space. In practical applications, the second nearest neighbor of a point can be one point or multiple points, then, the number of nearest neighbors of a point can be set as K2, and K2 is a positive integer.
需要说明的是,次近邻点的个数可以根据算法计算平台的资源以及应用场景对实时性的要求设置。示例性的,若计算资源充分或计算实时性要求较低,次近邻点的个数K2可以设置为16;若计算资源有限,或计算实时性要求较高时,次近邻点的个数K2可以设置为8。当然,还可以存在其他情况,本公开实施例对此不做具体限定。It should be noted that the number of next-nearest neighbor points can be set according to the resources of the algorithm computing platform and the real-time requirements of the application scenario. Exemplarily, if the calculation resources are sufficient or the calculation real-time requirements are low, the number K2 of the second nearest neighbor points can be set to 16; if the calculation resources are limited, or the calculation real-time requirements are high, the number K2 of the second nearest neighbor points can be Set to 8. Of course, other situations may also exist, which are not specifically limited in this embodiment of the present disclosure.
那么,参见图2中虚线所示,上述方法还可以包括S204和S205。其中, S204在S201之后执行,可以与S202同时执行,也可以与S202先后执行。Then, referring to the dotted line in FIG. 2 , the above method may further include S204 and S205. in, S204 is executed after S201, and may be executed simultaneously with S202, or may be executed successively with S202.
S204,遍历第一点云,通过查询点云近邻表,计算第一点云中每一个点到次近邻点的第二欧式距离;S204, traversing the first point cloud, and calculating the second Euclidean distance from each point in the first point cloud to the next nearest neighbor point by querying the point cloud neighbor table;
S205,基于第一欧式距离和第二欧式距离,从第一点云中确定离群点。S205. Determine outliers from the first point cloud based on the first Euclidean distance and the second Euclidean distance.
应理解的,激光雷达在S201之后,还可以遍历第一点云中的每一个点,通过查询点云近邻表,可以获得第一点云中每一个点(仍以点A为例进行描述)的K2个次近邻点,并计算点A到其K2个次近邻点的第二欧式距离,共K2个第二欧式距离。然后,激光雷达执行S205,基于点A到最近邻点的第一欧式距离和点A到次近邻点的第二欧式距离,确定点A是否为离群点,进而从第一点云中确定出离群点。It should be understood that after S201, the lidar can also traverse each point in the first point cloud, and obtain each point in the first point cloud by querying the point cloud neighbor table (still take point A as an example for description) K2 second-nearest neighbors, and calculate the second Euclidean distance from point A to its K2 second-nearest neighbors, a total of K2 second Euclidean distances. Then, the lidar executes S205 to determine whether point A is an outlier based on the first Euclidean distance from point A to the nearest neighbor point and the second Euclidean distance from point A to the second nearest neighbor point, and then determine from the first point cloud Outlier.
具体来说,S205可以包括:基于第一欧式距离,从第一点云中确定疑似离群点;基于第二欧式距离,从疑似离群点中确定离群点。Specifically, S205 may include: determining suspected outliers from the first point cloud based on the first Euclidean distance; determining outliers from the suspected outliers based on the second Euclidean distance.
应理解的,通过S202和S204,激光雷达在获得第一点云中各个点的第一欧式距离和第二欧式距离后,可以根据满足第一预设条件的第一欧式距离的最近邻点的数量,确定点A是否为疑似离群点。然后,若点A为疑似离群点,则根据满足第二预设条件的第二欧式距离的次近邻点的数量,确定点A是否为离群点。通过两次判断,避免非离群点被误删,使得对离群点的识别更加准确。It should be understood that through S202 and S204, after the lidar obtains the first Euclidean distance and the second Euclidean distance of each point in the first point cloud, it can Quantity, to determine whether point A is a suspected outlier. Then, if the point A is a suspected outlier point, it is determined whether the point A is an outlier point according to the quantity of the second nearest neighbor points satisfying the second Euclidean distance of the second preset condition. Through two judgments, the non-outlier points are avoided from being mistakenly deleted, making the identification of outlier points more accurate.
具体来说,在S205可以包括:针对第一点云中的第i(i=1、2、3…)个点,从第i个点的最近邻点中确定第一欧式距离小于第三阈值的第二点的数量。若第二点的数量小于第四阈值,则将第i个点确定为疑似离群点。Specifically, S205 may include: for the i-th (i=1, 2, 3...) point in the first point cloud, determining from the nearest neighbors of the i-th point that the first Euclidean distance is less than the third threshold The number of second points. If the number of the second points is less than the fourth threshold, the i-th point is determined as a suspected outlier point.
应理解的,激光雷达通过S202获得第i个点到最近邻点的第一欧式距离,共K1个。然后,激光雷达执行S205,从K1个最近邻点中找出第一欧式距离小于第三阈值的最近邻点(即第二点),并根据第二点的数量确定第i个点是否为疑似离群点。若第二点的数量小于第四阈值,则激光雷达确定第i个点为疑似离群点,反之,激光雷达确定第i个点为非疑似离群点,并针对第 i+1个点重复上述步骤。It should be understood that the lidar obtains the first Euclidean distance from the i-th point to the nearest neighbor point through S202, and there are K1 in total. Then, the lidar executes S205 to find out the nearest neighbor point (that is, the second point) whose first Euclidean distance is less than the third threshold from the K1 nearest neighbor points, and determine whether the i-th point is suspected according to the number of second points Outlier. If the number of the second point is less than the fourth threshold, the lidar determines that the i-th point is a suspected outlier point, otherwise, the lidar determines that the i-th point is a non-suspected outlier point, and for the i-th point Repeat the above steps for i+1 points.
在实际应用中,上述第二点为第一欧式距离小于第三阈值的最近邻点的集合,该集合为K1个最近邻点的子集。第二点的数量可以小于或者等于K1。In practical applications, the above-mentioned second point is a set of nearest neighbor points whose first Euclidean distance is smaller than the third threshold, and this set is a subset of K1 nearest neighbor points. The number of second points may be less than or equal to K1.
需要说明的是,激光雷达可以遍历第一点云,对每一个点都执行上述判断过程,逐个确定每一个点是否为疑似离群点。例如,以点A为例,激光雷达从点A的K1个最近邻点中确定出满足第一欧式距离小于第三阈值这一条件的第二点,共S2个。若第二点的数量(S2个)小于第四阈值,则激光雷达可以将点A确定为疑似离群点。反之,激光雷达将点A确定为非疑似离群点,并针对下一个点重复上述步骤。It should be noted that the lidar can traverse the first point cloud, perform the above judgment process for each point, and determine whether each point is a suspected outlier point one by one. For example, taking point A as an example, the lidar determines the second point satisfying the condition that the first Euclidean distance is less than the third threshold from the K1 nearest neighbor points of point A, a total of S2 points. If the number of the second points (S2) is less than the fourth threshold, the lidar may determine point A as a suspected outlier point. Conversely, LiDAR identifies point A as not a suspected outlier and repeats the above steps for the next point.
应理解的,第三阈值和第四阈值是根据激光雷达的应用场景、精度要求等实际情况自行设定的。第三阈值和第四阈值可以为经验值。第三阈值可以与第一阈值相同或不同,第二阈值可以与第四阈值相同或不同,本公开实施例对此不做具体限定。第二点与第一点可以为相同的点,也可以为不同的点,本公开实施例对此不做具体限定。It should be understood that the third threshold and the fourth threshold are set according to actual conditions such as the application scenario and accuracy requirements of the lidar. The third threshold and the fourth threshold may be empirical values. The third threshold may be the same as or different from the first threshold, and the second threshold may be the same as or different from the fourth threshold, which is not specifically limited in this embodiment of the present disclosure. The second point and the first point may be the same or different, which is not specifically limited in this embodiment of the present disclosure.
示例性的,假设第三阈值为5厘米,第四阈值为2个。如果激光雷达通过S205在点A的4个最近邻点(K1=4)中确定第一欧式距离小于5厘米(即第一阈值)的第一点为3个(可以记为点B、点C以及点D),又因为3大于2(即第二阈值),则可以确定点A不是疑似离群点。如果激光雷达通过S203在点A的4个最近邻点(K1=4)中确定第一欧式距离小于5厘米(即第一阈值)的第一点为1个(可以记为点E),又因为1小于2(即第二阈值),则可以确定点A是疑似离群点。Exemplarily, it is assumed that the third threshold is 5 cm, and the fourth threshold is 2. If the lidar determines that the first Euclidean distance is less than 5 cm (that is, the first threshold) among the 4 nearest neighbor points (K1=4) of point A through S205, there are 3 first points (can be recorded as point B, point C and point D), and because 3 is greater than 2 (ie the second threshold), it can be determined that point A is not a suspected outlier. If the lidar determines that the first point whose first Euclidean distance is less than 5 cm (i.e. the first threshold) is 1 (can be recorded as point E) among the 4 nearest neighbor points (K1=4) of point A through S203, and Because 1 is smaller than 2 (ie the second threshold), it can be determined that point A is a suspected outlier point.
进一步地,S205还可以包括:针对第一点云中的第j(=1、2、3…)个疑似离群点,从第j个疑似离群点的次近邻点中确定第二欧式距离小于第五阈值的第三点的数量。若第三点的数量小于或等于第六阈值,则第j个疑似离群点确定为离群点。Further, S205 may also include: for the jth (=1, 2, 3...) suspected outlier point in the first point cloud, determining the second Euclidean distance from the second nearest neighbor of the jth suspected outlier point The number of third points less than the fifth threshold. If the number of the third points is less than or equal to the sixth threshold, the jth suspected outlier point is determined as an outlier point.
应理解的,激光雷达通过S204获得第j个疑似离群点到次近邻点的第二 欧式距离,共K2个。然后,激光雷达执行S205,从K2个次近邻点中找出第二欧式距离小于第五阈值的次近邻点(即第三点),并根据第三点的数量确定第j个疑似离群点是否为离群点。若第三点的数量小于或等于第六阈值,则激光雷达确定第j个疑似离群点为离群点,反之,激光雷达确定第j个疑似离群点为非离群点,并针对第j+1个点重复上述步骤。It should be understood that the lidar obtains the second distance between the jth suspected outlier point and the second nearest neighbor point through S204. Euclidean distance, a total of K2. Then, the lidar executes S205 to find out the second nearest neighbor point (that is, the third point) whose second Euclidean distance is less than the fifth threshold from the K2 second nearest neighbor points, and determine the jth suspected outlier point according to the number of the third point Whether it is an outlier point. If the number of the third point is less than or equal to the sixth threshold, the lidar determines that the jth suspected outlier point is an outlier point, otherwise, the lidar determines that the jth suspected outlier point is a non-outlier point, and for the first Repeat the above steps for j+1 points.
在实际应用中,上述第三点为第二欧式距离小于第五阈值的次近邻点的集合,该集合为K2个次近邻点的子集。第三点的数量可以小于或者等于K2。In practical applications, the above-mentioned third point is a set of next-nearest neighbor points whose second Euclidean distance is smaller than the fifth threshold, and this set is a subset of K2 second-nearest neighbor points. The number of third points may be less than or equal to K2.
需要说明的是,激光雷达可以遍历第一点云,对每一个疑似离群点都执行上述判断过程,逐个确定每一个疑似离群点是否为离群点。例如,以点A为例,激光雷达从点A的K2个次近邻点中确定出满足第二欧式距离小于第五阈值这一条件的第三点,共S3个。若第三点的数量(S3个)小于或等于第六阈值,则激光雷达可以将点A确定为离群点。反之,激光雷达将点A确定为非离群点,并针对下一个点重复上述步骤。It should be noted that the lidar can traverse the first point cloud, perform the above judgment process for each suspected outlier point, and determine whether each suspected outlier point is an outlier point one by one. For example, taking point A as an example, the lidar determines the third point satisfying the condition that the second Euclidean distance is less than the fifth threshold from the K2 second nearest neighbor points of point A, totaling S3 points. If the number of the third points (S3) is less than or equal to the sixth threshold, the laser radar may determine point A as an outlier point. Conversely, the lidar determines point A as a non-outlier and repeats the above steps for the next point.
应理解的,第五阈值和第六阈值是根据激光雷达的应用场景、精度要求等实际情况自行设定的。第五阈值和第六阈值可以为经验值。第五阈值大于第三阈值,第六阈值大于第四阈值。It should be understood that the fifth threshold and the sixth threshold are set according to actual conditions such as the application scenario and accuracy requirements of the lidar. The fifth threshold and the sixth threshold may be empirical values. The fifth threshold is greater than the third threshold, and the sixth threshold is greater than the fourth threshold.
示例性的,假设点A为疑似离群点。第五阈值为8厘米,第六阈值为2个。如果激光雷达通过S205在点A的8个次近邻点(K2=8)中确定第二欧式距离小于8厘米(即第三阈值)的第三点为4个(可以记为点F、点G、点H以及点I),又因为4大于2(即第四阈值),则可以确定点A不是离群点。如果激光雷达通过S203在点A的8个次近邻点(K2=8)中确定第二欧式距离小于8厘米的第三点为2个(可以记为点H和点J),又因为1小于2,则可以确定点A是离群点。Exemplarily, it is assumed that point A is a suspected outlier. The fifth threshold is 8 cm, and the sixth threshold is 2. If the lidar determines that the second Euclidean distance is less than 8 cm (that is, the third threshold) among the 8 second-nearest neighbor points (K2=8) of point A through S205, there are 4 third points (can be recorded as point F, point G , point H and point I), and because 4 is greater than 2 (ie the fourth threshold), it can be determined that point A is not an outlier. If the lidar determines that there are 2 third points whose second Euclidean distance is less than 8 cm among the 8 second-nearest neighbor points (K2=8) of point A through S203 (can be recorded as point H and point J), and because 1 is less than 2, then it can be determined that point A is an outlier.
在实际应用中,针对于第一点云中各个点均执行S202至S205,以判断第一点云中的各个点是否为离群点。In practical applications, S202 to S205 are executed for each point in the first point cloud to determine whether each point in the first point cloud is an outlier point.
至此,便根据最近邻点和次近邻点从第一点云中确定出离群点,不仅判 断离群点的准确性更高,而且有效减少误删点情况的发生。So far, the outlier points are determined from the first point cloud according to the nearest neighbor point and the second nearest neighbor point, not only judging The accuracy of breaking outliers is higher, and it can effectively reduce the occurrence of mistakenly deleted points.
在本公开实施例中,由上述步骤S201-S205可知,通过查询点云近邻表,确定点云中每个点的最近邻点,并根据每个点到最近邻点的欧式距离来确定点云中的离群点。在对未知点云进行处理时,只需要查表获得近邻点,而无需每次都对近邻点进行搜寻,数据计算量小且方便高效,从而有效提升点云的处理效率。In the embodiment of the present disclosure, it can be seen from the above steps S201-S205 that by querying the point cloud neighbor table, the nearest neighbor point of each point in the point cloud is determined, and the point cloud is determined according to the Euclidean distance from each point to the nearest neighbor point Outliers in . When processing an unknown point cloud, it is only necessary to look up the table to obtain the neighbor points, instead of searching for the neighbor points every time, the data calculation amount is small, convenient and efficient, thus effectively improving the processing efficiency of the point cloud.
在一些示例性的实施例中,上述方法还可以包括生成点云近邻表步骤。那么,仍参见图2中实线所示,在S201之前,上述方法还可以包括:In some exemplary embodiments, the above method may further include the step of generating a point cloud neighbor list. Then, still referring to the solid line in Figure 2, before S201, the above method may also include:
S206,基于激光雷达的角度标定数据,在预设探测距离下,生成第二点云;S206, generating a second point cloud at a preset detection distance based on the angle calibration data of the lidar;
S207,遍历第二点云,搜索每一点的最近邻点;S207, traverse the second point cloud, and search for the nearest neighbor point of each point;
S208,至少基于最近邻点,生成点云近邻表。S208. Generate a point cloud neighbor table at least based on the nearest neighbor point.
在实际应用中,上述生成点云近邻表步骤可以在激光雷达出厂时执行,也可以在每次激光雷达上电初始化时执行。也就是说,激光雷达并不需要每次进行测距前执行。In practical applications, the above steps of generating point cloud neighbor tables can be performed when the lidar leaves the factory, or it can be executed every time the lidar is powered on and initialized. In other words, lidar does not need to be performed every time before ranging.
在实际应用中,激光雷达的角度标定数据是在激光雷达出厂前存储的。激光雷达根据该角度标定数据,可以获得激光雷达中每个激光器的发射角度。预设探测距离(可以记为distance)可以理解为激光雷达预设的扫描范围,是根据实际情况设置的。distance为正整数。In practical applications, the angle calibration data of the lidar is stored before the lidar leaves the factory. According to the angle calibration data, the laser radar can obtain the emission angle of each laser in the laser radar. The preset detection distance (which can be recorded as distance) can be understood as the preset scanning range of the lidar, which is set according to the actual situation. distance is a positive integer.
应理解的,在S206中,激光雷达能够根据每个激光器的发射角度和预设的探测距离生成一帧仿真点云(即上述实施例中所述的用于生成点云近邻表的点云或者第二点云)。由于激光雷达激光器的发射角度固定且激光沿直线传播,所以,仿真点云重叠的区域是固定的,与激光器的发射距离无关。仿真点云中每一点与其近邻点的排布也是相对固定的。那么,由激光雷达的激光器所产生的任意未知点云中各点的排布与仿真点云是一致的,即第一点云中各点的排布与第二点云中各点的排布是对应的。这里,仿真点云可以理解为 在相同探测距离下将二维的角度标定数据还原到三维角度空间中,这样找到的近邻点更加符合实际情况。It should be understood that in S206, the lidar can generate a frame of simulated point cloud according to the emission angle of each laser and the preset detection distance (that is, the point cloud or second point cloud). Since the emission angle of the lidar laser is fixed and the laser travels along a straight line, the overlapping area of the simulated point cloud is fixed and has nothing to do with the emission distance of the laser. The arrangement of each point and its neighbors in the simulation point cloud is also relatively fixed. Then, the arrangement of points in any unknown point cloud generated by the laser of the lidar is consistent with the simulation point cloud, that is, the arrangement of points in the first point cloud is the same as the arrangement of points in the second point cloud is corresponding. Here, the simulation point cloud can be understood as At the same detection distance, the two-dimensional angle calibration data is restored to the three-dimensional angle space, so that the found neighbor points are more in line with the actual situation.
示例性的,图3为本公开实施例中的一种点云排布的示意图。假设,预设探测距离(distance)为2米,激光雷达根据角度标定数据和distance=2,生成如图3所示的仿真点云。在仿真点云中,不同角度的激光器形成不同的视场,不同的视场之间形成交叠区域。图3中放大示意部分用于表示交叠区域中点云的分布情况。其中,圆圈代表点,圆圈中的数字代表该点的序号。由图3可以看出,点49178的四周紧邻点3294、点3302、点3314、点49394、点49402、点2014、点48761和点48537,即点的位置相邻而点云的序号并不相邻。其中,点3302、点49394、点48761以及点49402为点49178的最近邻点,点3294、点3314、点2014以及点8537为点49178的次近邻点。进一步地,激光雷达记录仿真点云中的每一个点的最近邻点和次近邻点,生成点云近邻表。Exemplarily, FIG. 3 is a schematic diagram of a point cloud arrangement in an embodiment of the present disclosure. Assume that the preset detection distance (distance) is 2 meters, and the lidar generates a simulation point cloud as shown in FIG. 3 according to the angle calibration data and distance=2. In the simulation point cloud, lasers with different angles form different fields of view, and different fields of view form overlapping areas. The enlarged schematic part in Figure 3 is used to represent the distribution of point clouds in the overlapping area. Among them, the circles represent points, and the numbers in the circles represent the serial numbers of the points. It can be seen from Figure 3 that point 49178 is adjacent to point 3294, point 3302, point 3314, point 49394, point 49402, point 2014, point 48761 and point 48537, that is, the positions of the points are adjacent but the serial numbers of the point clouds are not the same adjacent. Among them, point 3302, point 49394, point 48761 and point 49402 are the nearest neighbors of point 49178, and point 3294, point 3314, point 2014 and point 8537 are the second nearest neighbors of point 49178. Further, the lidar records the nearest neighbor point and the second nearest neighbor point of each point in the simulation point cloud to generate a point cloud neighbor table.
应理解的,在S207至S208中,激光雷达遍历第二点云,搜索第二点云中每一点的最近邻点。具体来说,激光雷达可以通过搜索算法(如KD树(K-dimensional Tree)算法)搜索每个点的K1个最近邻点,并记录这些最近邻点,生成固定的点云近邻表。当然,激光雷达还可以采用其他搜索算法来搜索每个点的最近邻点,本公开实施例对此不做具体限定。It should be understood that, in S207 to S208, the lidar traverses the second point cloud, and searches for the nearest neighbor point of each point in the second point cloud. Specifically, the lidar can search the K1 nearest neighbors of each point through a search algorithm (such as the KD tree (K-dimensional Tree) algorithm), and record these nearest neighbors to generate a fixed point cloud neighbor table. Of course, the lidar may also use other search algorithms to search for the nearest neighbor of each point, which is not specifically limited in this embodiment of the present disclosure.
在一些示例性的实施例中,仍参见图2中虚线所示,在S206之后,还可以包括:S209,遍历第二点云,搜索第二点云中每一点的次近邻点。具体来说,激光雷达可以通过如KD树算法搜索每个点的K2个次近邻点。S210,基于最近邻点和次近邻点,生成点云近邻表,即记录这些最近邻点和次近邻点,生成固定的点云近邻表。In some exemplary embodiments, still referring to the dotted line in FIG. 2 , after S206 , it may further include: S209 , traversing the second point cloud, and searching for the second nearest neighbor point of each point in the second point cloud. Specifically, lidar can search for K2 next-nearest neighbors of each point through the KD tree algorithm. S210. Generate a point cloud neighbor table based on the nearest neighbor point and the second nearest neighbor point, that is, record these nearest neighbor points and the second nearest neighbor point to generate a fixed point cloud neighbor table.
需要说明,可以采用相同的搜索算法搜索最近邻点和次近邻点,也可以采用不同的搜索算法搜索最近邻点和次近邻点,本公开实施例对此不做具体限定。 It should be noted that the same search algorithm may be used to search for the nearest neighbor point and the second nearest neighbor point, or different search algorithms may be used to search for the nearest neighbor point and the second nearest neighbor point, which is not specifically limited in this embodiment of the present disclosure.
下面以具体实例来对上述点云的处理方法进行说明。The method for processing the above point cloud will be described below with specific examples.
图4为本公开实施例中的一种处理点云的流程图。图5为本公开实施例中的另一种处理点云的流程图。结合图4和图5所示对点云处理方法进行说明。在下述实施例中,均以第一点云中的点A为例。FIG. 4 is a flow chart of point cloud processing in an embodiment of the present disclosure. FIG. 5 is another flow chart of point cloud processing in an embodiment of the present disclosure. The point cloud processing method will be described with reference to FIG. 4 and FIG. 5 . In the following embodiments, point A in the first point cloud is taken as an example.
在一实施方式中,点云的处理方法可以包括以下步骤:In one embodiment, the processing method of point cloud can comprise the following steps:
S401,输入第一点云,进入S402;S401, input the first point cloud, enter S402;
S402,判断是否遍历完成;若是,进入S407;若否,进入S403;S402, judging whether the traversal is completed; if yes, go to S407; if not, go to S403;
S403,查询近邻表,计算第一点云中点A到K1个最近邻点的第一欧式距离;进入S404;S403, query the neighbor table, and calculate the first Euclidean distance from point A to K1 nearest neighbor points in the first point cloud; enter S404;
S404,判断K1个第一欧式距离小于第一设定阈值的数量是否大于2个;若是,进入S405;若否,进入S406;S404, judging whether the number of K1 first Euclidean distances smaller than the first set threshold is greater than 2; if yes, proceed to S405; if not, proceed to S406;
S405,该点不作处理,进入S402;S405, do not process this point, go to S402;
S406,该点为离群点,进入S402;S406, the point is an outlier point, enter into S402;
S407,输出去噪后点云,也就是剔除离群点的数据。S407, outputting the point cloud after denoising, that is, the data from which outliers are removed.
由步骤S401-S407可知,遍历输入的第一点云,并查询点云近邻表,基于第一点云中的任意一点到最近邻点的欧氏距离,即可实现确定离群点。It can be seen from steps S401-S407 that the outlier point can be determined based on the Euclidean distance from any point in the first point cloud to the nearest neighbor point by traversing the input first point cloud and querying the point cloud neighbor table.
在另一实施方式中,点云的处理方式可以包括以下步骤:In another embodiment, the point cloud processing method may include the following steps:
S501,读取角度标定文件,生成点云近邻表,进入S502;S501, read the angle calibration file, generate a point cloud neighbor table, and enter S502;
S502,输入第一点云,进入S503;S502, input the first point cloud, enter S503;
S503,判断是否遍历完成;若是,进入S510;若否,进入S504;S503, judging whether the traversal is completed; if yes, go to S510; if not, go to S504;
S504,查询近邻表,计算第一点云中点A到K1个最近邻点的第一欧式距离,进入S505;S504, query the neighbor table, calculate the first Euclidean distance from point A to K1 nearest neighbor points in the first point cloud, and enter S505;
S505,判断K1个第一欧式距离小于第一设定阈值的数量是否大于2个;若是,进入S506;若否,进入S507;S505, judging whether the number of K1 first Euclidean distances less than the first set threshold is greater than 2; if yes, proceed to S506; if not, proceed to S507;
S506,该点不作处理,进入S503;S506, do not process this point, go to S503;
S507,该点为疑似离群点,查询近邻表,计算该疑似离群点到K2个次 近邻点的第二欧式距离;进入S508;S507, the point is a suspected outlier point, query the neighbor table, and calculate the suspected outlier point to K2 times The second Euclidean distance of the nearest neighbor point; enter S508;
S508,判断K2个第二欧式距离小于第二设定阈值的数量是否小于3个;若是,进入S509;若否,进入S506;S508, judging whether the number of K2 second Euclidean distances smaller than the second set threshold is less than 3; if yes, proceed to S509; if not, proceed to S506;
S509,该点为离群点,进入S503;S509, the point is an outlier point, enter into S503;
S510,输出去噪后点云,也就是剔除离群点的数据。S510, outputting the point cloud after denoising, that is, the data of removing outliers.
由步骤S501-S510可知,遍历输入的第一点云,生成点云近邻表并查询点云近邻表,基于第一点云中的任意一点到最近邻点和次近邻点的欧氏距离,即可实现确定离群点。It can be seen from steps S501-S510 that the first point cloud input is traversed, the point cloud neighbor table is generated and the point cloud neighbor table is queried, based on the Euclidean distance from any point in the first point cloud to the nearest neighbor point and the second nearest neighbor point, namely Outliers can be identified.
本公开实施例中,通过查询点云近邻表,确定点云中每个点的最近邻点,并根据每个点到最近邻点的欧式距离来确定点云中的离群点。在对未知点云进行分析时,只需要查表获得近邻点,而无需每次都对近邻点进行搜寻,数据计算量小且方便高效,从而有效提升点云的处理效率。In the embodiment of the present disclosure, the nearest neighbor point of each point in the point cloud is determined by querying the point cloud neighbor table, and the outlier point in the point cloud is determined according to the Euclidean distance from each point to the nearest neighbor point. When analyzing the unknown point cloud, it is only necessary to look up the table to obtain the neighbor points, instead of searching for the neighbor points every time, the data calculation amount is small, convenient and efficient, thus effectively improving the processing efficiency of the point cloud.
进一步地,本公开采用激光雷达角度标定数据生成仿真点云,并根据仿真点云中点的位置关系生成点云近邻表。因为仿真点云与未知点云拥有同样的发射角度,所以仿真点云的点的排布与未知点云的点的排布是一一对应的。未知点云通过使用仿真点云生成的近邻表来确定未知点云中任意一点的最近邻点,这种方法确定的最近邻点更加准确。Further, the present disclosure uses laser radar angle calibration data to generate a simulation point cloud, and generates a point cloud neighbor table according to the positional relationship of points in the simulation point cloud. Because the simulated point cloud and the unknown point cloud have the same launch angle, the arrangement of points in the simulated point cloud and the arrangement of points in the unknown point cloud are in one-to-one correspondence. The unknown point cloud uses the neighbor table generated by the simulated point cloud to determine the nearest neighbor point of any point in the unknown point cloud, and the nearest neighbor point determined by this method is more accurate.
基于相同的发明构思,本公开实施例提供了一种点云的处理装置,该装置可以为激光雷达设备中的芯片或者片上系统,还可以为激光雷达设备中用于实现上述各个实施例所述的方法的功能模块。该装置可以实现上述各实施例中点云的处理功能,这些功能可以通过硬件执行相应的软件实现。这些硬件或软件包括一个或多个上述功能相应的模块。图6为本公开实施例中的点云的处理装置的一种结构示意图,参见图6所示,该处理装置600,可以包括:数据获取模块601,用于获取激光雷达的第一点云,激光雷达产生的点云为无序点云;距离计算模块602,用于遍历第一点云,通过查询点云近邻表,计算第一点云中每一个点到最近邻点的第一欧式距离,其中,点云近邻 表是基于激光雷达的预设角度标定数据生成的;数据分析模块603,用于至少基于第一欧式距离,从第一点云中确定离群点。第一值的取值都可以根据实际情况进行设置。Based on the same inventive concept, an embodiment of the present disclosure provides a point cloud processing device, which can be a chip or a system-on-chip in a laser radar device, and can also be used in a laser radar device to implement the above-mentioned various embodiments. The function module of the method. The device can realize the point cloud processing functions in the above-mentioned embodiments, and these functions can be realized by executing corresponding software through hardware. These hardware or software include one or more modules with corresponding functions mentioned above. FIG. 6 is a schematic structural diagram of a point cloud processing device in an embodiment of the present disclosure. Referring to FIG. 6, the processing device 600 may include: a data acquisition module 601 for acquiring the first point cloud of the lidar, The point cloud generated by the lidar is an unordered point cloud; the distance calculation module 602 is used to traverse the first point cloud, and calculate the first Euclidean distance from each point in the first point cloud to the nearest neighbor point by querying the point cloud neighbor table , where the point cloud neighbors The table is generated based on the preset angle calibration data of the lidar; the data analysis module 603 is configured to determine outliers from the first point cloud based at least on the first Euclidean distance. The value of the first value can be set according to the actual situation.
在一些示例性的实施例中,数据分析模块603,还用于针对第一点云中的第i个点,从第i个点的最近邻点中确定第一欧式距离小于第一阈值的第一点的数量,i为正整数;若第一点的数量小于第二阈值,则将第i个点确定为离群点。In some exemplary embodiments, the data analysis module 603 is further configured to, for the i-th point in the first point cloud, determine from the nearest neighbors of the i-th point that the first Euclidean distance is less than the first threshold The number of one point, i is a positive integer; if the number of the first point is less than the second threshold, the i-th point is determined as an outlier point.
在一些示例性的实施例中,距离计算模块602,还用于遍历第一点云,通过查询点云近邻表,计算第一点云中每一个点到次近邻点的第二欧式距离;数据分析模块603,还用于基于第一欧式距离和第二欧式距离,从第一点云中确定离群点。第三值的取值都可以根据实际情况进行设置。In some exemplary embodiments, the distance calculation module 602 is also used to traverse the first point cloud, and calculate the second Euclidean distance from each point in the first point cloud to the second nearest neighbor point by querying the point cloud neighbor table; the data The analysis module 603 is further configured to determine outliers from the first point cloud based on the first Euclidean distance and the second Euclidean distance. The value of the third value can be set according to the actual situation.
在一些示例性的实施例中,数据分析模块603,还用于基于第一欧式距离,从第一点云中确定疑似离群点;以及,用于基于第二欧式距离,从疑似离群点中确定离群点。In some exemplary embodiments, the data analysis module 603 is further configured to determine suspected outliers from the first point cloud based on the first Euclidean distance; Identify outliers.
在一些示例性的实施例中,数据分析模块603,还用于针对第一点云中的第i个点,从第i个点的最近邻点中确定第一欧式距离小于第三阈值的第二点的数量,i为正整数;若第二点的数量小于第四阈值,则将第i个点确定为疑似离群点。In some exemplary embodiments, the data analysis module 603 is further configured to, for the i-th point in the first point cloud, determine from the nearest neighbors of the i-th point that the first Euclidean distance is less than the third threshold The number of two points, i is a positive integer; if the number of the second point is less than the fourth threshold, the i-th point is determined as a suspected outlier.
在一些示例性的实施例中,数据分析模块603,还用于针对第一点云中的第j个疑似离群点,从第j个疑似离群点的次近邻点中确定第二欧式距离小于第五阈值的第三点的数量,j为正整数;若第三点的数量小于或等于第六阈值,则将第j个疑似离群点确定为离群点。In some exemplary embodiments, the data analysis module 603 is further configured to, for the jth suspected outlier in the first point cloud, determine the second Euclidean distance from the second nearest neighbors of the jth suspected outlier The number of the third points less than the fifth threshold, j is a positive integer; if the number of the third points is less than or equal to the sixth threshold, the jth suspected outlier point is determined as an outlier point.
在一些示例性的实施例中,处理装置600还包括:In some exemplary embodiments, the processing device 600 further includes:
点云生成模块,用于基于激光雷达的角度标定数据,在预设探测距离下,生成第二点云;第二点云与第一点云一一对应;The point cloud generation module is used to generate a second point cloud at a preset detection distance based on the angle calibration data of the lidar; the second point cloud is in one-to-one correspondence with the first point cloud;
搜索模块,用于遍历第二点云,搜索每一点的最近邻点和次近邻点; Search module, for traversing the second point cloud, search for the nearest neighbor point and second nearest neighbor point of each point;
点云近邻表生成模块,用于基于每一点的最近邻点和次近邻点,生成点云近邻表。The point cloud neighbor table generation module is used to generate a point cloud neighbor table based on the nearest neighbor point and the second nearest neighbor point of each point.
需要说明的是,上述数据获取模块601、距离计算模块602和数据分析模块603的具体实现过程可参考图2至图5实施例的详细描述,为了说明书的简洁,这里不再赘述。It should be noted that, the specific implementation process of the above-mentioned data acquisition module 601, distance calculation module 602 and data analysis module 603 can refer to the detailed description of the embodiment in Fig. 2 to Fig. 5 , and for the sake of brevity, details are not repeated here.
本公开实施例中提到的数据获取模块601、距离计算模块602和数据分析模块603可以为一个或者多个处理器。The data acquisition module 601 , the distance calculation module 602 and the data analysis module 603 mentioned in the embodiments of the present disclosure may be one or more processors.
基于相同的发明构思,本公开实施例提供一种激光雷达,包括:存储器,存储有计算机可执行指令;处理器,与存储器相连,用于通过执行计算机可执行指令,并能够实现如上述一个或者多个实施例所述的点云的处理方法。Based on the same inventive concept, an embodiment of the present disclosure provides a laser radar, including: a memory storing computer-executable instructions; a processor connected to the memory for executing the computer-executable instructions and being able to implement the above-mentioned one or The point cloud processing method described in multiple embodiments.
基于相同的发明构思,本公开提供一种计算机存储介质,计算机存储介质存储有计算机可执行指令,计算机可执行指令被处理器执行后,能够实现如上述一个或者多个实施例所述的点云的处理方法。Based on the same inventive concept, the present disclosure provides a computer storage medium. The computer storage medium stores computer-executable instructions. After the computer-executable instructions are executed by a processor, the point cloud as described in one or more of the above-mentioned embodiments can be realized. processing method.
图7示出了根据本公开的实施例的电子设备700的配置框图。电子设备700可为任何类型的通用或专用计算设备,诸如台式计算机、膝上型计算机、服务器、大型计算机、基于云的计算机、平板计算机、可穿戴设备、车辆电子装置等。如图7所示,电子设备700包括输入输出(Input/Output,I/O)接口701、网络接口702、处理器703和存储器704。FIG. 7 shows a configuration block diagram of an electronic device 700 according to an embodiment of the present disclosure. Electronic device 700 may be any type of general or special purpose computing device, such as a desktop computer, laptop computer, server, mainframe computer, cloud-based computer, tablet computer, wearable device, vehicle electronics, or the like. As shown in FIG. 7 , an electronic device 700 includes an input/output (Input/Output, I/O) interface 701 , a network interface 702 , a processor 703 and a memory 704 .
I/O接口701是可以从用户接收输入和/或向用户提供输出的组件的集合。I/O接口701可以包括但不限于按钮、键盘、小键盘、LCD显示器、LED显示器或其它类似的显示设备,包括具有触摸屏能力使得能够进行用户和电子设备之间的交互的显示设备。I/O interface 701 is a collection of components that can receive input from a user and/or provide output to a user. I/O interface 701 may include, but is not limited to, buttons, keyboards, keypads, LCD displays, LED displays, or other similar display devices, including display devices with touch screen capabilities to enable interaction between the user and the electronic device.
网络接口702可以包括各种适配器以及以软件和/或硬件实现的电路系统,以便能够使用有线或无线协议与激光雷达通信。有线协议例如是串口协议、并口协议、以太网协议、USB协议或其它有线通信协议中的任何一种或多种。无线协议例如是任何IEEE 802.11Wi-Fi协议、蜂窝网络通信协议等。 Network interface 702 may include various adapters and circuitry implemented in software and/or hardware to enable communication with the lidar using wired or wireless protocols. The wired protocol is, for example, any one or more of serial port protocol, parallel port protocol, Ethernet protocol, USB protocol or other wired communication protocols. The wireless protocol is, for example, any IEEE 802.11 Wi-Fi protocol, cellular network communication protocol, or the like.
存储器704包括单个存储器或一个或多个存储器或存储位置,包括但不限于随机存取存储器(RAM)、动态随机存取存储器(DRAM)、静态随机存取存储器(SRAM)、只读存储器(ROM)、EPROM、EEPROM、闪存、FPGA的逻辑块、硬盘或存储器层次结构的任何其他各层。存储器704可以用于存储任何类型的指令、软件或算法,包括用于控制电子设备700的一般功能和操作的指令705。Memory 704 includes a single memory or one or more memories or storage locations including, but not limited to, Random Access Memory (RAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Read Only Memory (ROM) ), EPROM, EEPROM, flash memory, logic blocks of FPGAs, hard disks, or any other layers of the memory hierarchy. Memory 704 may be used to store any type of instructions, software or algorithms, including instructions 705 for controlling the general functions and operations of electronic device 700 .
处理器703控制电子设备700的一般操作。处理器703可以包括但不限于CPU、硬件微处理器、硬件处理器、多核处理器、单核处理器、微控制器、专用集成电路(ASIC)、DSP或其他类似的处理设备,能够执行根据本公开中描述的实施例的用于控制电子设备700的操作和功能的任何类型的指令、算法或软件。处理器703可以是在计算系统中执行功能的数字电路系统、模拟电路系统或混合信号(模拟和数字的组合)电路系统的各种实现。处理器703可以包括例如诸如集成电路(IC)、单独处理器核心的部分或电路、整个处理器核心、单独的处理器、诸如现场可编程门阵列(FPGA)的可编程硬件设备、和/或包括多个处理器的系统。The processor 703 controls general operations of the electronic device 700 . Processor 703 may include but not limited to CPU, hardware microprocessor, hardware processor, multi-core processor, single-core processor, microcontroller, application specific integrated circuit (ASIC), DSP or other similar processing devices, capable of executing according to Any type of instructions, algorithms or software for controlling the operation and functionality of the electronic device 700 of the embodiments described in this disclosure. Processor 703 can be various implementations of digital circuitry, analog circuitry, or mixed-signal (combination of analog and digital) circuitry that performs functions in a computing system. The processor 703 may include, for example, portions or circuits such as an integrated circuit (IC), a separate processor core, an entire processor core, a separate processor, a programmable hardware device such as a field programmable gate array (FPGA), and/or A system that includes multiple processors.
可以使用内部总线706来建立电子设备700的组件之间的通信。Communication between components of electronic device 700 may be established using internal bus 706 .
电子设备700通信耦接到待校准的激光雷达,以控制激光雷达的操作。例如,可以将根据本公开的点云的处理方法以计算机可读指令的形式存储在电子设备700的存储器704上。处理器703通过读取所存储的计算机可读指令来实施点云的处理方法。Electronic device 700 is communicatively coupled to the lidar to be calibrated to control the operation of the lidar. For example, the point cloud processing method according to the present disclosure may be stored in the memory 704 of the electronic device 700 in the form of computer readable instructions. The processor 703 implements the point cloud processing method by reading the stored computer-readable instructions.
尽管使用特定组件来描述电子设备700,但是在替选实施例中,电子设备700中可以存在不同的组件。例如,电子设备700可以包括一个或多个附加处理器、存储器、网络接口和/或I/O接口。另外,电子设备700中可能不存在组件的一个或多个。另外,尽管在图7中示出单独的组件,但是在一些实施例中,给定组件的一些或全部可以集成到电子设备700中的其他组件中的一个或多个中。 Although electronic device 700 is described using certain components, in alternative embodiments, different components may be present in electronic device 700 . For example, electronic device 700 may include one or more additional processors, memory, network interfaces, and/or I/O interfaces. Additionally, one or more of the components may not be present in electronic device 700 . Additionally, although separate components are shown in FIG. 7 , in some embodiments some or all of a given component may be integrated into one or more of the other components in electronic device 700 .
本公开可以被实现为装置、系统、集成电路和非瞬时性计算机可读介质上的计算机程序或程序产品的任何组合。The present disclosure can be implemented as any combination of an apparatus, system, integrated circuit, and computer program or program product on a non-transitory computer readable medium.
应当理解,根据本公开实施例的计算机可读存储介质或程序产品中的计算机可执行指令可以被配置为执行与上述设备和方法实施例相应的操作。当参考上述设备和方法实施例时,计算机可读存储介质或程序产品的实施例对于本领域技术人员而言是明晰的,因此不再重复描述。用于承载或包括上述计算机可执行指令的计算机可读存储介质和程序产品也落在本公开的范围内。这样的存储介质可以包括但不限于软盘、光盘、磁光盘、存储卡、存储棒等等。It should be understood that the computer-readable storage medium or the computer-executable instructions in the program product according to the embodiments of the present disclosure may be configured to perform operations corresponding to the above-mentioned device and method embodiments. When referring to the above-mentioned apparatus and method embodiments, the embodiments of the computer-readable storage medium or the program product will be obvious to those skilled in the art, so the description will not be repeated. Computer-readable storage media and program products for carrying or including the computer-executable instructions described above also fall within the scope of the present disclosure. Such storage media may include, but are not limited to, floppy disks, optical disks, magneto-optical disks, memory cards, memory sticks, and the like.
另外,应当理解,上述系列处理和设备也可以通过软件和/或固件实现。在通过软件和/或固件实现的情况下,在相关设备的存储介质存储构成相应软件的相应程序,当所述程序被执行时,能够执行各种功能。In addition, it should be understood that the series of processes and devices described above may also be implemented by software and/or firmware. In the case of realization by software and/or firmware, corresponding programs constituting the corresponding software are stored in the storage medium of the related device, and various functions can be performed when the programs are executed.
例如,在以上实施例中包括在一个单元中的多个功能可以由分开的装置来实现。替选地,在以上实施例中由多个单元实现的多个功能可分别由分开的装置来实现。另外,以上功能之一可由多个单元来实现。这样的配置包括在本公开的技术范围内。For example, a plurality of functions included in one unit in the above embodiments may be realized by separate devices. Alternatively, a plurality of functions implemented by a plurality of units in the above embodiments may be respectively implemented by separate devices. In addition, one of the above functions may be realized by a plurality of units. Such a configuration is included in the technical scope of the present disclosure.
本领域技术人员可以理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本公开实施例的实施过程构成任何限定。Those skilled in the art can understand that the sequence numbers of the steps in the above embodiments do not mean the order of execution, and the execution order of each process should be determined by its functions and internal logic, rather than the implementation process of the embodiments of the present disclosure. constitute any limitation.
以上实施例仅用以说明本公开的技术方案,而非对其限制。尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解,其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行替换。而这些修改或者替换,并不使相应技术方案的本质脱离本公开各实施例技术方案的精神和范围,均应包含在本公开的保护范围之内。 The above embodiments are only used to illustrate the technical solution of the present disclosure, not to limit it. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions described in the foregoing embodiments can still be modified, or some of the technical features can be replaced. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included within the protection scope of the present disclosure.

Claims (16)

  1. 一种点云的处理方法,包括:A method for processing a point cloud, comprising:
    获取激光雷达的第一点云,所述激光雷达产生的点云为无序点云;Obtain the first point cloud of the laser radar, the point cloud produced by the laser radar is an unordered point cloud;
    遍历所述第一点云,通过查询点云近邻表,计算所述第一点云中每一个点到最近邻点的第一欧式距离,其中,所述点云近邻表是基于所述激光雷达的预设角度标定数据生成的;Traversing the first point cloud, calculating the first Euclidean distance from each point in the first point cloud to the nearest neighbor point by querying the point cloud neighbor table, wherein the point cloud neighbor table is based on the lidar generated from the preset angle calibration data;
    至少基于所述第一欧式距离,从所述第一点云中确定离群点。Outliers are determined from the first point cloud based at least on the first Euclidean distance.
  2. 根据权利要求1所述的方法,其中,所述至少基于所述第一欧式距离,从所述第一点云中确定离群点,包括:The method according to claim 1, wherein said determining outliers from said first point cloud based at least on said first Euclidean distance comprises:
    针对所述第一点云中的第i个点,从所述第i个点的最近邻点中确定所述第一欧式距离小于第一阈值的第一点的数量,i为正整数;For the i-th point in the first point cloud, determine the number of first points whose first Euclidean distance is less than a first threshold from the nearest neighbors of the i-th point, where i is a positive integer;
    若所述第一点的数量小于第二阈值,则将所述第i个点确定为所述离群点。If the number of the first points is less than a second threshold, the ith point is determined as the outlier point.
  3. 根据权利要求1所述的方法,其中,在所述获得输入的第一点云之后,所述方法还包括:The method according to claim 1, wherein, after said obtaining the first point cloud of input, said method further comprises:
    遍历所述第一点云,通过查询所述点云近邻表,计算所述第一点云中每一个点到次近邻点的第二欧式距离;Traversing the first point cloud, calculating the second Euclidean distance from each point in the first point cloud to the next nearest neighbor point by querying the point cloud neighbor table;
    所述至少基于所述第一欧式距离,从所述第一点云中确定离群点,包括:The determining outliers from the first point cloud based at least on the first Euclidean distance includes:
    基于所述第一欧式距离和所述第二欧式距离,从所述第一点云中确定离群点。Outliers are determined from the first point cloud based on the first Euclidean distance and the second Euclidean distance.
  4. 根据权利要求3所述的方法,其中,所述基于所述第一欧式距离和所述第二欧式距离,从所述第一点云中确定离群点,包括:The method according to claim 3, wherein said determining outliers from said first point cloud based on said first Euclidean distance and said second Euclidean distance comprises:
    基于所述第一欧式距离,从所述第一点云中确定疑似离群点;determining suspected outliers from the first point cloud based on the first Euclidean distance;
    基于所述第二欧式距离,从所述疑似离群点中确定离群点。Based on the second Euclidean distance, outliers are determined from the suspected outliers.
  5. 根据权利要求4所述的方法,其中,所述基于所述第一欧式距离,从 所述第一点云中确定疑似离群点,包括:The method according to claim 4, wherein, based on the first Euclidean distance, from Determining suspected outliers in the first point cloud includes:
    针对所述第一点云中的第i个点,从所述第i个点的最近邻点中确定所述第一欧式距离小于第三阈值的第二点的数量,i为正整数;For the i-th point in the first point cloud, determine the number of second points whose first Euclidean distance is less than a third threshold from the nearest neighbors of the i-th point, where i is a positive integer;
    若所述第二点的数量小于第四阈值,则将所述第i个点确定为所述疑似离群点。If the number of the second points is less than the fourth threshold, the ith point is determined as the suspected outlier point.
  6. 根据权利要求4所述的方法,其中,所述基于所述第二欧式距离,从所述疑似离群点中确定离群点,包括:The method according to claim 4, wherein said determining outliers from said suspected outliers based on said second Euclidean distance comprises:
    针对所述第一点云中的第j个疑似离群点,从所述第j个疑似离群点的次近邻点中确定所述第二欧式距离小于第五阈值的第三点的数量,j为正整数;For the jth suspected outlier point in the first point cloud, determine the number of third points whose second Euclidean distance is less than the fifth threshold from the second nearest neighbor points of the jth suspected outlier point, j is a positive integer;
    若所述第三点的数量小于或等于第六阈值,则将所述第j个疑似离群点确定为所述离群点。If the number of the third points is less than or equal to the sixth threshold, the jth suspected outlier point is determined as the outlier point.
  7. 根据权利要求1所述的方法,所述方法还包括:The method according to claim 1, said method further comprising:
    基于所述激光雷达的角度标定数据,在预设探测距离下,生成第二点云;所述第二点云与所述第一点云一一对应;Based on the angle calibration data of the lidar, at a preset detection distance, a second point cloud is generated; the second point cloud is in one-to-one correspondence with the first point cloud;
    遍历所述第二点云,搜索每一点的最近邻点和次近邻点;Traversing the second point cloud, searching for the nearest neighbor and second nearest neighbor of each point;
    基于所述每一点的最近邻点和次近邻点,生成所述点云近邻表。The point cloud neighbor table is generated based on the nearest neighbor point and the second nearest neighbor point of each point.
  8. 一种点云的处理装置,包括:A point cloud processing device, comprising:
    数据获取模块,用于获取激光雷达的第一点云,所述激光雷达产生的点云为无序点云;The data acquisition module is used to obtain the first point cloud of the laser radar, and the point cloud generated by the laser radar is a disordered point cloud;
    距离计算模块,用于遍历所述第一点云,通过查询点云近邻表,计算所述第一点云中每一个点到最近邻点的第一欧式距离,其中,所述点云近邻表是基于所述激光雷达的预设角度标定数据生成的;The distance calculation module is used to traverse the first point cloud, and calculate the first Euclidean distance from each point in the first point cloud to the nearest neighbor by querying the point cloud neighbor table, wherein the point cloud neighbor table is generated based on the preset angle calibration data of the lidar;
    数据分析模块,用于至少基于所述第一欧式距离,从所述第一点云中确定离群点。A data analysis module, configured to determine outliers from the first point cloud based at least on the first Euclidean distance.
  9. 根据权利要求8所述的装置,其中,所述数据分析模块,还用于针对所述第一点云中的第i个点,从所述第i个点的最近邻点中确定所述第一欧式 距离小于第一阈值的第一点的数量,i为正整数;The device according to claim 8, wherein the data analysis module is further configured to determine the i-th point from the nearest neighbors of the i-th point for the i-th point in the first point cloud a European style The number of first points whose distance is less than the first threshold, i is a positive integer;
    若所述第一点的数量小于第二阈值,则将所述第i个点确定为所述离群点。If the number of the first points is less than a second threshold, the ith point is determined as the outlier point.
  10. 根据权利要求8所述的装置,其中,所述距离计算模块,还用于遍历所述第一点云,通过查询所述点云近邻表,计算所述第一点云中每一个点到次近邻点的第二欧式距离;The device according to claim 8, wherein the distance calculation module is also used for traversing the first point cloud, by querying the point cloud neighbor table, calculating the time-to-time distance of each point in the first point cloud The second Euclidean distance of the neighbor point;
    所述数据分析模块,还用于基于所述第一欧式距离和所述第二欧式距离,从所述第一点云中确定离群点。The data analysis module is further configured to determine outliers from the first point cloud based on the first Euclidean distance and the second Euclidean distance.
  11. 根据权利要求10所述的装置,其中,所述数据分析模块,还用于基于所述第一欧式距离,从所述第一点云中确定疑似离群点;以及基于所述第二欧式距离,从所述疑似离群点中确定离群点。The device according to claim 10, wherein the data analysis module is further configured to determine suspected outliers from the first point cloud based on the first Euclidean distance; and based on the second Euclidean distance , determining outliers from the suspected outliers.
  12. 根据权利要求11所述的装置,其中,所述数据分析模块,还用于针对所述第一点云中的第i个点,从所述第i个点的最近邻点中确定所述第一欧式距离小于第三阈值的第二点的数量,i为正整数;若所述第二点的数量小于第四阈值,则将所述第i个点确定为所述疑似离群点。The device according to claim 11, wherein the data analysis module is further configured to determine the i-th point from the nearest neighbors of the i-th point for the i-th point in the first point cloud A number of second points whose Euclidean distance is less than the third threshold, i is a positive integer; if the number of the second points is less than the fourth threshold, the ith point is determined as the suspected outlier point.
  13. 根据权利要求11所述的装置,其中,所述数据分析模块,还用于针对所述第一点云中的第j个疑似离群点,从所述第j个疑似离群点的次近邻点中确定所述第二欧式距离小于第五阈值的第三点的数量,j为正整数;若所述第三点的数量小于或等于第六阈值,则将所述第j个疑似离群点确定为所述离群点。The device according to claim 11, wherein the data analysis module is further configured to, for the jth suspected outlier point in the first point cloud, obtain the second nearest neighbor of the jth suspected outlier point Determine the number of third points whose second Euclidean distance is less than the fifth threshold in the points, j is a positive integer; if the number of the third points is less than or equal to the sixth threshold, then the jth suspected outlier points are identified as the outliers.
  14. 根据权利要求8所述的装置,所述装置还包括:The apparatus of claim 8, further comprising:
    点云生成模块,用于基于所述激光雷达的角度标定数据,在预设探测距离下,生成第二点云;所述第二点云与所述第一点云一一对应;A point cloud generation module, configured to generate a second point cloud at a preset detection distance based on the angle calibration data of the lidar; the second point cloud is in one-to-one correspondence with the first point cloud;
    搜索模块,用于遍历所述第二点云,搜索每一点的最近邻点和次近邻点;A search module, configured to traverse the second point cloud, and search for the nearest neighbor and the second nearest neighbor of each point;
    点云近邻表生成模块,用于基于所述每一点的最近邻点和次近邻点,生成所述点云近邻表。 A point cloud neighbor table generating module, configured to generate the point cloud neighbor table based on the nearest neighbor point and the second nearest neighbor point of each point.
  15. 一种激光雷达,包括:A lidar, comprising:
    存储器,存储有计算机可执行指令;a memory storing computer-executable instructions;
    处理器,与所述存储器相连,用于通过执行所述计算机可执行指令,以实现如权利要求1至7任一项所述的方法。A processor, connected to the memory, configured to implement the method according to any one of claims 1 to 7 by executing the computer-executable instructions.
  16. 一种计算机存储介质,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令被处理器执行后能够实现如权利要求1至7任一项所述的方法。 A computer storage medium, the computer storage medium stores computer-executable instructions, and the computer-executable instructions can implement the method according to any one of claims 1 to 7 after being executed by a processor.
PCT/CN2023/076111 2022-02-16 2023-02-15 Point cloud processing method and apparatus, and laser radar WO2023155793A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210140658.7 2022-02-16
CN202210140658.7A CN114612598A (en) 2022-02-16 2022-02-16 Point cloud processing method and device and laser radar

Publications (1)

Publication Number Publication Date
WO2023155793A1 true WO2023155793A1 (en) 2023-08-24

Family

ID=81859588

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/076111 WO2023155793A1 (en) 2022-02-16 2023-02-15 Point cloud processing method and apparatus, and laser radar

Country Status (2)

Country Link
CN (1) CN114612598A (en)
WO (1) WO2023155793A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117055008A (en) * 2023-10-11 2023-11-14 武汉市品持科技有限公司 Processing method, device and equipment for point cloud tailing point and readable storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114612598A (en) * 2022-02-16 2022-06-10 苏州一径科技有限公司 Point cloud processing method and device and laser radar
CN115436912B (en) * 2022-11-02 2023-03-17 苏州一径科技有限公司 Point cloud processing method and device and laser radar
CN117665833B (en) * 2024-02-01 2024-04-09 北京亮道智能汽车技术有限公司 Radar data processing method, device, medium and equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090185746A1 (en) * 2008-01-22 2009-07-23 The University Of Western Australia Image recognition
CN106548520A (en) * 2016-11-16 2017-03-29 湖南拓视觉信息技术有限公司 A kind of method and system of cloud data denoising
CN106918813A (en) * 2017-03-08 2017-07-04 浙江大学 A kind of three-dimensional sonar point cloud chart image intensifying method based on distance statistics
CN111275810A (en) * 2020-01-17 2020-06-12 五邑大学 K nearest neighbor point cloud filtering method and device based on image processing and storage medium
CN111340728A (en) * 2020-02-26 2020-06-26 五邑大学 Point cloud denoising method and device based on 3D point cloud segmentation and storage medium
CN114612598A (en) * 2022-02-16 2022-06-10 苏州一径科技有限公司 Point cloud processing method and device and laser radar
CN115436912A (en) * 2022-11-02 2022-12-06 苏州一径科技有限公司 Point cloud processing method and device and laser radar

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107369161B (en) * 2017-07-19 2020-09-11 无锡信捷电气股份有限公司 Scattered workpiece point cloud segmentation method based on improved Euclidean clustering
CN110136072B (en) * 2018-02-08 2021-02-09 北京大学 Point cloud noise removing method, denoising system, computer device and storage medium
CN109033340B (en) * 2018-07-23 2021-03-16 武汉大学 Spark platform-based point cloud K neighborhood searching method and device
CN110109142B (en) * 2019-04-04 2021-04-02 深圳市速腾聚创科技有限公司 Point cloud filtering method and device, computer equipment and storage medium
US11403482B2 (en) * 2020-01-15 2022-08-02 Aptiv Technologies Limited Adaptive search for LiDAR-based clustering
CN111325837B (en) * 2020-01-23 2022-08-09 江西理工大学 Side slope DEM generation method based on ground three-dimensional laser point cloud
CN111487641B (en) * 2020-03-19 2022-04-22 福瑞泰克智能系统有限公司 Method and device for detecting object by using laser radar, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090185746A1 (en) * 2008-01-22 2009-07-23 The University Of Western Australia Image recognition
CN106548520A (en) * 2016-11-16 2017-03-29 湖南拓视觉信息技术有限公司 A kind of method and system of cloud data denoising
CN106918813A (en) * 2017-03-08 2017-07-04 浙江大学 A kind of three-dimensional sonar point cloud chart image intensifying method based on distance statistics
CN111275810A (en) * 2020-01-17 2020-06-12 五邑大学 K nearest neighbor point cloud filtering method and device based on image processing and storage medium
CN111340728A (en) * 2020-02-26 2020-06-26 五邑大学 Point cloud denoising method and device based on 3D point cloud segmentation and storage medium
CN114612598A (en) * 2022-02-16 2022-06-10 苏州一径科技有限公司 Point cloud processing method and device and laser radar
CN115436912A (en) * 2022-11-02 2022-12-06 苏州一径科技有限公司 Point cloud processing method and device and laser radar

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117055008A (en) * 2023-10-11 2023-11-14 武汉市品持科技有限公司 Processing method, device and equipment for point cloud tailing point and readable storage medium
CN117055008B (en) * 2023-10-11 2024-01-19 武汉市品持科技有限公司 Processing method, device and equipment for point cloud tailing point and readable storage medium

Also Published As

Publication number Publication date
CN114612598A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
WO2023155793A1 (en) Point cloud processing method and apparatus, and laser radar
JP7361682B2 (en) Multi-resolution, simultaneous localization and mapping based on 3D LIDAR measurements
JP2024010030A (en) Lidar data acquisition and control
US20200172095A1 (en) Surface Normal Determination for LIDAR Range Samples by Detecting Probe Pulse Stretching
CN114270215A (en) Interference mitigation for light detection and ranging
KR20190089196A (en) Method and system for classifying objects in a point cloud data set
KR101964100B1 (en) Object detection apparatus based on neural network learning and method of the same
WO2023185943A1 (en) Method, apparatus and device for determining lidar point cloud layering, and storage medium
CN115436912B (en) Point cloud processing method and device and laser radar
WO2022011974A1 (en) Distance measurement system and method, and computer-readable storage medium
US11703588B2 (en) Reflection object position calculating device, reflection object position calculating method, and reflection object position calculating program
WO2023185927A1 (en) Method, apparatus and device for determining layering of point cloud of lidar, and storage medium
WO2023179718A1 (en) Point cloud processing method and apparatus for lidar, and device and storage medium
WO2022143285A1 (en) Cleaning robot and distance measurement method therefor, apparatus, and computer-readable storage medium
CN107817484B (en) Amplification factor processing method and device of laser radar amplification circuit
WO2023179717A1 (en) Point cloud processing method and apparatus for laser radar, device, and storage medium
CN111931704A (en) Method, device, equipment and computer readable storage medium for evaluating map quality
CN110780276A (en) Tray identification method and system based on laser radar and electronic equipment
US20220179079A1 (en) Time-of-flight ranging device and time-of-flight ranging method
JP6214993B2 (en) Photoelectric sensor
WO2022068818A1 (en) Apparatus and method for calibrating three-dimensional scanner and refining point cloud data
CN107817501B (en) Point cloud data processing method with variable scanning frequency
CN109948979B (en) Inventory detection method, equipment and storage medium
WO2020237663A1 (en) Multi-channel lidar point cloud interpolation method and ranging apparatus
WO2022160879A1 (en) Method and apparatus for determining conversion parameters

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23755795

Country of ref document: EP

Kind code of ref document: A1