CN112581407A - Distance image noise suppression method and device, electronic equipment and storage medium - Google Patents
Distance image noise suppression method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112581407A CN112581407A CN202011589412.5A CN202011589412A CN112581407A CN 112581407 A CN112581407 A CN 112581407A CN 202011589412 A CN202011589412 A CN 202011589412A CN 112581407 A CN112581407 A CN 112581407A
- Authority
- CN
- China
- Prior art keywords
- distance
- cluster
- distances
- measurement
- measured
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 230000001629 suppression Effects 0.000 title claims abstract description 99
- 238000000034 method Methods 0.000 title claims abstract description 83
- 238000005259 measurement Methods 0.000 claims abstract description 269
- 238000012545 processing Methods 0.000 claims abstract description 54
- 238000012163 sequencing technique Methods 0.000 claims abstract description 22
- 238000004891 communication Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 10
- 238000001914 filtration Methods 0.000 description 26
- 238000010586 diagram Methods 0.000 description 15
- 230000008569 process Effects 0.000 description 7
- 230000002159 abnormal effect Effects 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000002547 anomalous effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000000779 smoke Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000011426 transformation method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10032—Satellite or aerial image; Remote sensing
- G06T2207/10044—Radar image
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
The embodiment of the invention provides a distance image noise suppression method, a distance image noise suppression device, electronic equipment and a storage medium, wherein the method comprises the following steps: firstly, taking each measured distance in the range profile to be processed as a current measured distance, and sequencing all measured distances in a neighborhood window of the current measured distance; then, starting from the second measurement distance in the sequenced measurement distances, selecting the first measurement distance as the measurement distance to be clustered, and clustering the measurement distances to be clustered based on the relation between the difference value of the measurement distance to be clustered and the adjacent previous measurement distance and the distance threshold value; selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, and repeating the steps until clusters of all measuring distances in the neighborhood window are obtained; and finally, when the number of the measured distances in the cluster where the current measured distance is located is judged to be smaller than the threshold value of the cluster number, noise suppression processing is carried out on the current measured distance. Thereby reducing the loss of detail information when noise suppression is performed on the range profile.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for noise suppression of a range profile, an electronic device, and a storage medium.
Background
The range profile is a three-dimensional laser radar image obtained by a laser radar ranging principle and a related angle transformation method, and can reflect the real distance of an object compared with a common two-dimensional color image. Therefore, the method is widely applied to the fields of distance measurement, detection, geographic drawing, laser guidance and the like. The obtained range image may be due to non-idealities of the optical channel, and the measured range value may have a large amount of noise, so that it is very important to perform noise suppression on the measured range image.
The noise in the range profile is mainly three, namely gaussian noise, dropout information and range anomaly noise. The Gaussian noise is mainly caused by the ranging precision of the laser radar, and the dropout information is caused by the fact that the laser radar does not receive an echo, or the time of the echo exceeds the time limit of an acceptance window of the radar, or the echo energy is smaller than the acceptance threshold of a receiving system. The distance abnormal noise is a remarkable difference between a measured value and a true value, and is mainly caused by factors such as smoke, cloud rain, thunder and lightning in the atmosphere.
However, in the process of implementing the present invention, the inventors found that, in the prior art, when noise suppression is performed on a range profile, detailed information such as a line and a vertex of the range profile is easily lost.
Disclosure of Invention
An embodiment of the present invention provides a method and an apparatus for noise suppression of a distance image, an electronic device, and a storage medium, so as to reduce loss of detail information when noise suppression is performed on the distance image. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for suppressing noise in a distance image, where the method includes:
acquiring all the measuring distances in the distance image to be processed;
taking each measured distance as a current measured distance, and sequencing all measured distances in a neighborhood window of the current measured distance to obtain sequenced measured distances;
according to the sequencing sequence, starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as a measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is smaller than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster; the cluster of the first measurement distance in the sequenced measurement distances is a pre-established cluster; the first measuring distance is any one of the measuring distances except the first measuring distance in the sequenced measuring distances;
selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained;
and acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
Optionally, the neighborhood window of the current measured distance is obtained by the following steps:
acquiring the preset actual size l of the windowcAnd the angular resolution omega of the lidar and the average value OA of all the measured distances in the range profile to be processed1And by the following formula:
calculating to obtain neighborhood window k of current measurement distance0*k0。
Optionally, the neighborhood window of the current measured distance is obtained by the following steps:
acquiring the preset actual size l of the windowcAnd the angular resolution ω of the lidar and the distance value OA of the current measured distance, and by the following formula:
calculating to obtain neighborhood window k of current measurement distance0*k0。
Optionally, a neighborhood window k for calculating the current measurement distance0*k0Thereafter, the method also includesThe method comprises the following steps:
the following formula is adopted:
neighborhood window k for the current measured distance0*k0Taking values, and taking the values k x k as the neighborhood window k of the current measurement distance0*k0。
Optionally, the threshold of the number of clusters is obtained by the following steps:
obtaining the size k of the neighborhood window for calculating the current measurement distance0And a preset proportional value r, and is obtained by the following formula:
calculating to obtain a clustering quantity threshold value theta2。
Optionally, the threshold of the number of clusters is obtained by the following steps:
obtaining a value k and a preset proportional value r which are carried out on the size of a neighborhood window of the current measurement distance, and passing through the following formula:
θ2=k2·r
calculating to obtain a clustering quantity threshold value theta2。
Optionally, performing noise suppression processing on the current measured distance based on the cluster with the largest number of measured distances includes:
and taking the cluster with the largest number of the measured distances as a target cluster, and taking the median or the mean of all the measured distances in the target cluster as the current measured distance.
In a second aspect, an embodiment of the present invention further provides a device for suppressing noise of a distance image, where the device includes:
the acquisition module is used for acquiring all the measurement distances in the range profile to be processed;
the sorting module is used for taking each measured distance as the current measured distance and sorting all the measured distances in a neighborhood window of the current measured distance to obtain the sorted measured distances;
the judging module is used for selecting a first measuring distance as a measuring distance to be clustered from a second measuring distance in the sorted measuring distances according to the sorting sequence, judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into a cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster; the cluster of the first measurement distance in the sequenced measurement distances is a pre-established cluster; the first measuring distance is any one of the measuring distances except the first measuring distance in the sequenced measuring distances;
the selecting module is used for selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, triggering the judging module to repeatedly judge whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained;
and the processing module is used for acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, acquiring the cluster with the largest number of the measured distances, and carrying out noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
Optionally, the apparatus further comprises: a neighborhood window calculation module to:
acquiring the preset actual size l of the windowcAnd the angular resolution omega of the lidar and the average value OA of all the measured distances in the range profile to be processed1And by the following formula:
calculating to obtain neighborhood window k of current measurement distance0*k0。
Optionally, the apparatus further comprises: a neighborhood window calculation module to:
acquiring the preset actual size l of the windowcAnd the angular resolution ω of the lidar and the distance value OA of the current measured distance, and by the following formula:
calculating to obtain neighborhood window k of current measurement distance0*k0。
Optionally, the apparatus further comprises: a value module for
The following formula is adopted:
neighborhood window k for the current measured distance0*k0Taking values, and taking the values k x k as the neighborhood window k of the current measurement distance0*k0。
Optionally, the apparatus further comprises: a cluster number threshold calculation module to:
obtaining the size k of the neighborhood window for calculating the current measurement distance0And a preset proportional value r, and is obtained by the following formula:
calculating to obtain a clustering quantity threshold value theta2。
Optionally, the apparatus further comprises: a cluster number threshold calculation module to:
obtaining a value k and a preset proportional value r which are carried out on the size of a neighborhood window of the current measurement distance, and passing through the following formula:
θ2=k2·r
calculating to obtain a clustering quantity threshold value theta2。
Optionally, the processing module is specifically configured to:
and taking the cluster with the largest number of the measured distances as a target cluster, and taking the median or the mean of all the measured distances in the target cluster as the current measured distance.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and a processor for implementing any of the above-described methods for noise suppression of range images when executing a program stored in the memory.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method for suppressing noise in a range profile is implemented as any one of the above methods.
In a fifth aspect, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the above-mentioned distance image noise suppression methods.
The embodiment of the invention has the following beneficial effects:
according to the noise suppression method, the noise suppression device, the electronic equipment and the storage medium for the range profile, all the measurement distances in the range profile to be processed can be obtained firstly, then each measurement distance is taken as the current measurement distance, all the measurement distances in a neighborhood window of the current measurement distance are sequenced, and the sequenced measurement distances are obtained; and according to the sequencing sequence, firstly establishing clusters for the first measurement distance in the sequenced measurement distances, then starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as the measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is less than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster. Selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained; in this way, the cluster where all the measured distances in the neighborhood window of the current measured distance are located can be obtained. And finally, acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, indicating that the current measured distance is a noise point, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
In the embodiment of the present invention, similar measured distances may be grouped into one class by clustering all measured distances in a neighborhood window of a current measured distance, so that the measured distances in the same cluster have higher similarity, and then, by determining whether the number of measured distances in a cluster where the current measured distance is located is greater than or equal to a cluster number threshold, and when the number of measured distances in a cluster where the current measured distance is located is less than the cluster number threshold, obtaining a cluster with the largest number of measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of measured distances, so that the cluster with the largest number of measured distances and the current measured distance after noise suppression processing has higher similarity compared to setting the current measured distance as a median or a mean of all measured distances of the neighborhood window of the current measured distance, loss of detail information when noise suppression is performed on the range profile can be reduced. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a flow chart of a method for noise suppression of a range profile according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a root mean square error curve obtained after different noise suppression processes are performed on a range profile;
FIG. 3 is a diagram illustrating a quantity curve of dropout information obtained after noise suppression processing is performed on a range profile in different manners;
FIG. 4 is a schematic diagram of a noise point curve obtained after different noise suppression processes are performed on a range profile;
FIG. 5a is a schematic diagram of a distance image after noise suppression by a median filtering method being converted into a point cloud image;
FIG. 5b is a schematic diagram of converting a range profile into a point cloud profile after noise suppression by the noise suppression method according to the embodiment of the present invention;
FIG. 5c is a schematic diagram of converting a range profile after noise suppression by a radius filtering method into a point cloud profile;
FIG. 6 is a schematic structural diagram of a distance image noise suppression apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the prior art, median filtering or mean filtering is generally adopted for noise suppression of a range profile, however, the two filtering methods can perform noise suppression on the range profile and simultaneously cause loss of detail information such as lines or spires in the range profile, and in order to reduce loss of information of details in the range profile, embodiments of the present invention provide a method, an apparatus, an electronic device, and a storage medium for noise suppression of the range profile.
First, a method for suppressing noise of a distance image according to an embodiment of the present invention is described below, as shown in fig. 1, which is a flowchart of a method for suppressing noise of a distance image according to an embodiment of the present invention, and the method may include:
s110, acquiring all the measuring distances in the distance image to be processed;
in some examples, a range image may be formed after radar ranging is performed on an object or a scene by the laser radar, however, due to the influence of environmental factors, noise may exist in the range image, and the range image needs to be subjected to noise suppression processing, and at this time, the range image may be used as a range image to be processed.
In still other examples, the range image includes a measured distance corresponding to each measuring point, and therefore, all measured distances in the range image to be processed may be acquired.
S120, taking each measured distance as a current measured distance, and sequencing all measured distances in a neighborhood window of the current measured distance to obtain sequenced measured distances;
after all the measured distances in the range profile to be processed are acquired, for convenience of subsequent noise suppression processing, here, each measured distance may be used as a current measured distance, and whether the current measured distance is a noise point is determined, and if so, noise suppression processing is performed on the current measured distance.
In some examples, after each measured distance is taken as a current measured distance, in order to determine whether the current measured distance is a noise point, all measured distances in a neighborhood window of the current measured distance may be sorted first, so that the sorted measured distances may be obtained.
For example, assuming that the current measured distance is b1, and all measured distances in the neighborhood window of the current measured distance b1 are b2, b3, b4, b5, b6, b7, b8, and b9, the sorted measured distances may be b2, b3, b4, b5, b1, b6, b7, b8, and b 9.
S130, according to the sequencing sequence, starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as a to-be-clustered measurement distance, judging whether the difference value between the to-be-clustered measurement distance and the adjacent previous measurement distance is smaller than or equal to a distance threshold value, if so, adding the to-be-clustered measurement distance into a cluster where the previous measurement distance adjacent to the to-be-clustered measurement distance is located, otherwise, establishing a new cluster and adding the to-be-clustered measurement distance into the new cluster; the cluster of the first measurement distance in the sequenced measurement distances is a pre-established cluster; the first measuring distance is any one of the measuring distances except the first measuring distance in the sequenced measuring distances;
s140, selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly executing the step S130, judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all clusters of the measuring distances in a neighborhood window in the current measuring distance are obtained;
after the sorted measuring distances are obtained, a cluster may be established for a first measuring distance in the sorted measuring distances, for example, a cluster may be established for b2, then a first measuring distance is selected as a measuring distance to be clustered from a second measuring distance in the sorted measuring distances, whether a difference between the measuring distance to be clustered and an adjacent previous measuring distance is less than or equal to a distance threshold is determined, if so, the measuring distance to be clustered is added to a cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, a new cluster is established and the measuring distance to be clustered is added to the new cluster.
For example, b3 is selected as the distance to be clustered, then whether the difference between b3 and b2 is smaller than or equal to the distance threshold is judged, if yes, b3 is added to the cluster where b2 is located, otherwise, a new cluster is established, and b3 is added to the new cluster. Here, assuming that the difference between b3 and b2 is less than the distance threshold, b3 is added to the cluster where b2 is located.
After clustering the first measured distance, selecting the next measured distance of the first measured distance as the measured distance to be clustered, and repeating step S130 to determine whether the difference between the measured distance to be clustered and the previous measured distance adjacent to the measured distance to be clustered is less than or equal to the distance threshold, if so, adding the measured distance to be clustered to the cluster where the previous measured distance adjacent to the measured distance to be clustered is located, otherwise, establishing a new cluster and adding the measured distance to be clustered to the new cluster until all clusters of the measured distances in the neighborhood window in the current measured distance are obtained. After obtaining clusters of all measured distances in the neighborhood window in the current measured distance, step S150 may be performed.
For example, after b3 is clustered, the next measured distance b4 of b3 may be selected as the measured distance to be clustered, and it is determined whether the difference between b4 and b3 is less than or equal to the distance threshold, if so, b4 is added to the cluster where b3 is located, otherwise, a new cluster is established, and b4 is added to the new cluster.
After the cluster of b4 is obtained, b5, b1, b6, b7, b8 and b9 can be sequentially selected as the measured distances to be clustered, and clustering is performed, so that clusters of all the measured distances in the neighborhood window of b1 can be obtained. For example, assume that the resulting cluster of all measured distances within the neighborhood window of b1 is: cluster 1(b2, b3, b4), cluster 2(b5, b1), and cluster 3(b6, b7, b8, b 9).
S150, obtaining the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, obtaining the cluster with the largest number of the measured distances, and carrying out noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
After the clusters of all the measured distances in the neighborhood window of the current measured distance are obtained, whether the current measured distance is a noise point or not can be judged based on the obtained clusters, and when the current measured distance is a noise point, noise suppression processing is performed.
Specifically, the number of measured distances in the cluster where the current measured distance b1 is located may be obtained, for example, the cluster where the current measured distance b1 is located is cluster 2, and the number of measured distances in cluster 2 is 2. And then judging whether the number of the measured distances in the cluster where the current measured distance is located is smaller than a cluster number threshold value, if not, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
For example, assuming that the threshold of the number of clusters is 3, the number 2 of measured distances in the cluster 2 where the current measured distance b1 is located is smaller than the threshold of the number of clusters 3, at this time, the cluster with the largest number of measured distances may be obtained, for example, the cluster 3, and then the noise suppression processing may be performed on the current measured distance based on the cluster 3.
In some examples, when noise suppression processing is performed on the current measured distance based on the cluster with the largest number of measured distances, a median or a mean of all measured distances in the cluster with the largest number of measured distances may be used as the current measured distance, for example, a median or a mean of all measured distances in the cluster 3 may be used as the current measured distance.
In the embodiment of the present invention, similar measured distances may be grouped into one class by clustering all measured distances in a neighborhood window of a current measured distance, so that the measured distances in the same cluster have higher similarity, and then, by determining whether the number of measured distances in a cluster where the current measured distance is located is greater than or equal to a cluster number threshold, and when the number of measured distances in a cluster where the current measured distance is located is less than the cluster number threshold, obtaining a cluster with the largest number of measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of measured distances, so that the cluster with the largest number of measured distances and the current measured distance after noise suppression processing has higher similarity compared to setting the current measured distance as a median or a mean of all measured distances of the neighborhood window of the current measured distance, loss of detail information when noise suppression is performed on the range profile can be reduced.
In some examples, the neighborhood window described above may be preset.
However, in still other examples, as the distance between the measurement point and the lidar is greater, the distance between adjacent points may be greater, thereby causing a decrease in the density of adjacent points of the measurement point. For this reason, the embodiment of the present invention also provides a possible implementation manner, that is, the neighborhood window is adaptively adjusted according to the distance between the measurement point and the laser radar.
Specifically, when the neighborhood window is adaptively adjusted according to the distance between the measuring point and the laser radar, the preset actual size l of the window may be obtained firstcAnd the angular resolution omega of the lidar and the average value OA of all the measured distances in the range profile to be processed1Then by the following formula:
the neighborhood window for calculating the current measurement distance is k0*k0。
In this way, neighborhood windows of different sizes can be generated for different to-be-processed range profiles, and the amount of computation can be reduced.
In another embodiment, when adaptively adjusting the neighborhood window according to the distance between the measuring point and the laser radar, the preset actual window size l may be obtained firstcAnd the angular resolution ω of the lidar and the range value OA of the currently measured range, then by the following formula:
calculating to obtain neighborhood window k of current measurement distance0*k0。
In this way, different neighborhood windows can be generated for different current measurement distances, so that more accurate resolution can be achieved.
Wherein the preset window actual size lcThe window, which may be a virtual window, is the size of the window containing the measurement points in the measurement environment of the lidar.
In still other examples, if the neighborhood window is too small, the number of clusters may be too small, which may degrade the noise suppression effect, and if the neighborhood window is too large, the complexity of ranking the measured distances within the neighborhood window may be too high, which may increase the time overhead of noise suppression.
For this, a neighborhood window k can be obtained0*k0And then, carrying out value limitation on the neighborhood window.
Specifically, the following formula can be adopted:
neighborhood window k for the current measured distance0*k0Taking values, and taking the values k x k as the neighborhood window k of the current measurement distance0*k0。
For example, assume a neighborhood window k of the current measured distance0*k0K in (1)0If < 6, k can be adjusted0Taking the value of k as 5, and then taking 5 x 5 as a neighborhood window of the current measuring distance; assume again the neighborhood window k of the current measured distance0*k0K is not less than 60If < 8, k can be adjusted0Taking the value of k as 7, and then taking 7 as a neighborhood window of the current measurement distance; assume again the neighborhood window k of the current measured distance0*k0K in (1)0K is not less than 8, k can be adjusted0Taking the value of k as 9, and then taking 9 as a neighborhood window of the current measurement distance;
in some examples, the distance threshold may also be a preset value, for example, half of the height of an object of interest in the distance image to be processed, for example, half of the height of a vehicle in the distance image to be processed.
In some examples, after the size of the neighborhood window is adaptively adjusted, the number of measurement distances in the neighborhood window may be changed, and if a fixed threshold of the number of clusters is used, the accuracy of determining the noise point may also be reduced.
Specifically, the size k of the neighborhood window for calculating the current measurement distance may be obtained0And a preset proportional value r, and is obtained by the following formula:
calculating to obtain a clustering quantity threshold value theta2。
Or acquiring a value k and a preset proportional value r which are carried out on the size of a neighborhood window of the current measurement distance, and passing through the following formula:
θ2=k2·r
calculating to obtain a clustering quantity threshold value theta2。
By the embodiment of the invention, the size of the threshold value of the cluster quantity can be adapted to the size of the window, namely, when the window is enlarged, the threshold value of the cluster quantity is enlarged, and when the window is reduced, the threshold value of the cluster quantity is reduced, so that the accuracy of distinguishing the noise points can be improved.
To more clearly illustrate the effects of the embodiments of the present invention, a distance image captured when the horizontal distance of the laser radar is 740m, the height is 500m, the viewing angle is 3 ° × 3 °, and the pixel resolution is 256 × 256 is taken as an example, and as shown in fig. 2, a schematic diagram of a root mean square error curve obtained after noise suppression processing is performed on the distance image in different manners is illustrated.
Referring to fig. 2, it can be seen that the root mean square error of the range profile processed by the noise suppression method according to the embodiment of the present invention increases more stably when the ratio of the distance to the abnormal noise is different, and is far better than the median filtering method and the median-plus-mean filtering method. Since the radius filtering only filters abnormal points, normal data cannot be operated, and abnormal values cannot be processed into pseudo normal values, the distortion is minimum, but the result is obtained by increasing the number of missing information. Meanwhile, when the radius filtering method and the statistical filtering method are used for calculating the root mean square error, the dropout information does not participate in any calculation, so that the radius filtering method and the statistical filtering method have certain advantages. In the early stage of noise suppression by adopting a statistical filtering method. The rms error is small but when the ratio to the anomalous noise reaches the upper limit of the parameter capability, a sharp rise in noise results.
As shown in fig. 3, for a schematic diagram of a drop-out information quantity curve obtained after noise suppression processing in different ways is performed on a distance image, referring to fig. 3, for performing a noise suppression algorithm on the distance image, since the drop-out information is set to a pseudo normal point, the quantity of the drop-out information is 0. Therefore, in fig. 3, the missing information quantity curves corresponding to the noise suppression method, the median-plus-average filtering method, and the median filtering method according to the embodiment of the present invention are not shown in fig. 3. For filtering algorithms performed on point cloud images, the amount of missing information increases as the proportion of distance from anomalous noise increases, since points are deleted. For example, the amount of dropout information corresponding to the radius filtering method and the statistical filtering method, especially the amount of dropout information corresponding to the statistical filtering method, when the distance abnormal noise ratio is 0, a large number of relatively sharp normal points are removed to achieve the effect of removing the parameter, so that the details of the image are lost.
As shown in fig. 4, in order to obtain a schematic diagram of a noise point curve after performing noise suppression processing in different manners on the range profile, it can be seen from fig. 4 that the noise point curve corresponding to the radius filtering method is preferable, and substantially all range anomalous noise points can be removed. The noise point quantity of the noise suppression method of the embodiment of the invention is slightly higher, because the noise points are set as pseudo noise points, and the noise points are still far away from normal points, and still can be judged as noise points. The median filtering method and the median plus mean filtering method calculate the corresponding pseudo-normal value for each point, so the number of corresponding noise points is large, and when the proportion of the distance from the abnormal noise is large, the median plus mean filtering method is even higher than that without any processing.
In order to more conveniently compare different noise suppression methods, distance images subjected to noise suppression by different noise suppression methods are converted into point cloud images for comparison, as shown in fig. 5a, a schematic diagram of distance images subjected to noise suppression by a median filtering method is converted into point cloud images, fig. 5b is a schematic diagram of distance images subjected to noise suppression by a noise suppression method according to an embodiment of the present invention are converted into point cloud images, and fig. 5c is a schematic diagram of distance images subjected to noise suppression by a radius filtering method are converted into point cloud images. The point cloud image processed by the noise suppression method of the embodiment of the invention is good, and the condition of large amount of distortion or detail loss does not exist. Although the point cloud image processed by the radius filtering method has no certain distortion and can also keep certain details, due to the characteristics of the algorithm, a large number of defects are caused, so that the point cloud becomes sparse.
Compared with the prior art, the noise suppression method provided by the embodiment of the invention has the advantage that the better performance is met under the condition that the time can be ensured to be faster. Compared with other methods for noise suppression of the distance image, the method is slower in speed, but leads to the advanced parameters of all aspects of the processed image. Compared with the algorithm for processing the point cloud image, the processing speed is greatly advanced, the integrity of the processed image can be ensured, and the density of the midpoint of the point cloud cannot be reduced.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a noise suppression apparatus for a distance image, as shown in fig. 6, which is a structural diagram of the noise suppression apparatus for a distance image according to the embodiment of the present invention, and the apparatus may include:
an obtaining module 610, configured to obtain all measurement distances in the to-be-processed distance image;
a sorting module 620, configured to take each measured distance as a current measured distance, and sort all measured distances in a neighborhood window of the current measured distance to obtain sorted measured distances;
a judging module 630, configured to select a first measured distance as a to-be-clustered measured distance from a second measured distance in the sorted measured distances according to the sorting order, judge whether a difference between the to-be-clustered measured distance and an adjacent previous measured distance is smaller than or equal to a distance threshold, add the to-be-clustered measured distance to a cluster where the previous measured distance adjacent to the to-be-clustered measured distance is located if the difference is smaller than or equal to the distance threshold, otherwise, establish a new cluster and add the to-be-clustered measured distance to the new cluster; the cluster of the first measurement distance in the sequenced measurement distances is a pre-established cluster; the first measuring distance is any one of the measuring distances except the first measuring distance in the sequenced measuring distances;
a selecting module 640, configured to select a next measurement distance of the first measurement distance as a to-be-clustered measurement distance, and trigger the determining module 630 to repeatedly perform determining whether a difference between the to-be-clustered measurement distance and an adjacent previous measurement distance is smaller than or equal to a distance threshold, if so, add the to-be-clustered measurement distance to a cluster where the previous measurement distance adjacent to the to-be-clustered measurement distance is located, otherwise, establish a new cluster and add the to-be-clustered measurement distance to the new cluster until all clusters of the measurement distances in a neighborhood window in the current measurement distance are obtained;
the processing module 650 is configured to obtain the number of measured distances in a cluster where the current measured distance is located, determine whether the number of measured distances in the cluster where the current measured distance is located is greater than or equal to a cluster number threshold, if not, obtain a cluster where the number of measured distances is the largest, and perform noise suppression processing on the current measured distance based on the cluster where the number of measured distances is the largest.
The noise suppression device for the range profile provided by the embodiment of the invention can acquire all the measurement distances in the range profile to be processed, then take each measurement distance as the current measurement distance, and sequence all the measurement distances in the neighborhood window of the current measurement distance to obtain the sequenced measurement distances; and according to the sequencing sequence, firstly establishing clusters for the first measurement distance in the sequenced measurement distances, then starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as the measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is less than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster. Selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained; in this way, the cluster where all the measured distances in the neighborhood window of the current measured distance are located can be obtained. And finally, acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, indicating that the current measured distance is a noise point, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
In the embodiment of the present invention, similar measured distances may be grouped into one class by clustering all measured distances in a neighborhood window of a current measured distance, so that the measured distances in the same cluster have higher similarity, and then, by determining whether the number of measured distances in a cluster where the current measured distance is located is greater than or equal to a cluster number threshold, and when the number of measured distances in a cluster where the current measured distance is located is less than the cluster number threshold, obtaining a cluster with the largest number of measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of measured distances, so that the cluster with the largest number of measured distances and the current measured distance after noise suppression processing has higher similarity compared to setting the current measured distance as a median or a mean of all measured distances of the neighborhood window of the current measured distance, loss of detail information when noise suppression is performed on the range profile can be reduced.
In some examples, the apparatus further comprises: a neighborhood window calculation module to:
acquiring the preset actual size l of the windowcAnd the angular resolution omega of the lidar and the average value OA of all the measured distances in the range profile to be processed1And by the following formula:
calculating to obtain neighborhood window k of current measurement distance0*k0。
In some examples, the apparatus further comprises: a neighborhood window calculation module to:
acquiring the preset actual size l of the windowcAnd the angular resolution ω of the lidar and the distance value OA of the current measured distance, and by the following formula:
calculating to obtain neighborhood window k of current measurement distance0*k0。
In some examples, the apparatus further comprises: a value module for
The following formula is adopted:
neighborhood window k for the current measured distance0*k0Taking values, and taking the values k x k as the neighborhood window k of the current measurement distance0*k0。
In some examples, the apparatus further comprises: a cluster number threshold calculation module to:
obtaining the size k of the neighborhood window for calculating the current measurement distance0And a preset proportional value r, and is obtained by the following formula:
calculating to obtain a clustering quantity threshold value theta2。
In some examples, the apparatus further comprises: a cluster number threshold calculation module to:
obtaining a value k and a preset proportional value r which are carried out on the size of a neighborhood window of the current measurement distance, and passing through the following formula:
θ2=k2·r
calculating to obtain a clustering quantity threshold value theta2。
In some examples, the processing module 650 is specifically configured to:
and taking the cluster with the largest number of the measured distances as a target cluster, and taking the median or the mean of all the measured distances in the target cluster as the current measured distance.
An embodiment of the present invention further provides an electronic device, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 complete mutual communication through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to implement the steps of the method for suppressing noise of a distance image according to any of the embodiments described above when executing the program stored in the memory 703, and may implement the following steps, for example:
acquiring all the measuring distances in the distance image to be processed;
taking each measured distance as a current measured distance, and sequencing all measured distances in a neighborhood window of the current measured distance to obtain sequenced measured distances;
according to the sequencing sequence, starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as a measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is smaller than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster; the cluster of the first measurement distance in the sequenced measurement distances is a pre-established cluster; the first measuring distance is any one of the measuring distances except the first measuring distance in the sequenced measuring distances;
selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained;
and acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
According to the electronic device provided by the embodiment of the invention, all the measured distances in the range profile to be processed can be obtained firstly, then each measured distance is taken as the current measured distance, all the measured distances in the neighborhood window of the current measured distance are sorted, and the sorted measured distances are obtained; and according to the sequencing sequence, firstly establishing clusters for the first measurement distance in the sequenced measurement distances, then starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as the measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is less than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster. Selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained; in this way, the cluster where all the measured distances in the neighborhood window of the current measured distance are located can be obtained. And finally, acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, indicating that the current measured distance is a noise point, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
In the embodiment of the present invention, similar measured distances may be grouped into one class by clustering all measured distances in a neighborhood window of a current measured distance, so that the measured distances in the same cluster have higher similarity, and then, by determining whether the number of measured distances in a cluster where the current measured distance is located is greater than or equal to a cluster number threshold, and when the number of measured distances in a cluster where the current measured distance is located is less than the cluster number threshold, obtaining a cluster with the largest number of measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of measured distances, so that the cluster with the largest number of measured distances and the current measured distance after noise suppression processing has higher similarity compared to setting the current measured distance as a median or a mean of all measured distances of the neighborhood window of the current measured distance, loss of detail information when noise suppression is performed on the range profile can be reduced.
In another embodiment provided by the present invention, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for suppressing noise of a distance image shown in any of the above embodiments are implemented, for example, the following steps may be implemented:
acquiring all the measuring distances in the distance image to be processed;
taking each measured distance as a current measured distance, and sequencing all measured distances in a neighborhood window of the current measured distance to obtain sequenced measured distances;
according to the sequencing sequence, starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as a measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is smaller than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster; the cluster of the first measurement distance in the sequenced measurement distances is a pre-established cluster; the first measuring distance is any one of the measuring distances except the first measuring distance in the sequenced measuring distances;
selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained;
and acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
The computer-readable storage medium provided by the embodiment of the invention can be used for firstly acquiring all the measurement distances in a to-be-processed range profile, then taking each measurement distance as the current measurement distance, and sequencing all the measurement distances in a neighborhood window of the current measurement distance to obtain the sequenced measurement distances; and according to the sequencing sequence, firstly establishing clusters for the first measurement distance in the sequenced measurement distances, then starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as the measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is less than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster. Selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained; in this way, the cluster where all the measured distances in the neighborhood window of the current measured distance are located can be obtained. And finally, acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, indicating that the current measured distance is a noise point, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
In the embodiment of the present invention, similar measured distances may be grouped into one class by clustering all measured distances in a neighborhood window of a current measured distance, so that the measured distances in the same cluster have higher similarity, and then, by determining whether the number of measured distances in a cluster where the current measured distance is located is greater than or equal to a cluster number threshold, and when the number of measured distances in a cluster where the current measured distance is located is less than the cluster number threshold, obtaining a cluster with the largest number of measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of measured distances, so that the cluster with the largest number of measured distances and the current measured distance after noise suppression processing has higher similarity compared to setting the current measured distance as a median or a mean of all measured distances of the neighborhood window of the current measured distance, loss of detail information when noise suppression is performed on the range profile can be reduced.
In another embodiment, the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to perform the steps of a distance image noise suppression method shown in any one of the above embodiments, for example, the following steps may be performed:
acquiring all the measuring distances in the distance image to be processed;
taking each measured distance as a current measured distance, and sequencing all measured distances in a neighborhood window of the current measured distance to obtain sequenced measured distances;
according to the sequencing sequence, starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as a measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is smaller than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster; the cluster of the first measurement distance in the sequenced measurement distances is a pre-established cluster; the first measuring distance is any one of the measuring distances except the first measuring distance in the sequenced measuring distances;
selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained;
and acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
The computer program product containing the instruction provided by the embodiment of the invention can acquire all the measurement distances in the range profile to be processed, then take each measurement distance as the current measurement distance, and sequence all the measurement distances in the neighborhood window of the current measurement distance to obtain the sequenced measurement distances; and according to the sequencing sequence, firstly establishing clusters for the first measurement distance in the sequenced measurement distances, then starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as the measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is less than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster. Selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained; in this way, the cluster where all the measured distances in the neighborhood window of the current measured distance are located can be obtained. And finally, acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, indicating that the current measured distance is a noise point, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
In the embodiment of the present invention, similar measured distances may be grouped into one class by clustering all measured distances in a neighborhood window of a current measured distance, so that the measured distances in the same cluster have higher similarity, and then, by determining whether the number of measured distances in a cluster where the current measured distance is located is greater than or equal to a cluster number threshold, and when the number of measured distances in a cluster where the current measured distance is located is less than the cluster number threshold, obtaining a cluster with the largest number of measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of measured distances, so that the cluster with the largest number of measured distances and the current measured distance after noise suppression processing has higher similarity compared to setting the current measured distance as a median or a mean of all measured distances of the neighborhood window of the current measured distance, loss of detail information when noise suppression is performed on the range profile can be reduced.
In another embodiment of the present invention, there is provided a computer program which, when running on a computer, causes the computer to execute the steps of a distance image noise suppression method shown in any one of the above embodiments, for example, the following steps may be executed:
acquiring all the measuring distances in the distance image to be processed;
taking each measured distance as a current measured distance, and sequencing all measured distances in a neighborhood window of the current measured distance to obtain sequenced measured distances;
according to the sequencing sequence, starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as a measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is smaller than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster; the cluster of the first measurement distance in the sequenced measurement distances is a pre-established cluster; the first measuring distance is any one of the measuring distances except the first measuring distance in the sequenced measuring distances;
selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained;
and acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
The computer program provided by the embodiment of the invention can acquire all the measured distances in the range profile to be processed, then take each measured distance as the current measured distance, and sequence all the measured distances in the neighborhood window of the current measured distance to obtain the sequenced measured distances; and according to the sequencing sequence, firstly establishing clusters for the first measurement distance in the sequenced measurement distances, then starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as the measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is less than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster. Selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, repeatedly judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all the clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained; in this way, the cluster where all the measured distances in the neighborhood window of the current measured distance are located can be obtained. And finally, acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, indicating that the current measured distance is a noise point, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
In the embodiment of the present invention, similar measured distances may be grouped into one class by clustering all measured distances in a neighborhood window of a current measured distance, so that the measured distances in the same cluster have higher similarity, and then, by determining whether the number of measured distances in a cluster where the current measured distance is located is greater than or equal to a cluster number threshold, and when the number of measured distances in a cluster where the current measured distance is located is less than the cluster number threshold, obtaining a cluster with the largest number of measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of measured distances, so that the cluster with the largest number of measured distances and the current measured distance after noise suppression processing has higher similarity compared to setting the current measured distance as a median or a mean of all measured distances of the neighborhood window of the current measured distance, loss of detail information when noise suppression is performed on the range profile can be reduced.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for embodiments of devices, electronic devices, and the like, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (10)
1. A method for noise suppression of a range profile, the method comprising:
acquiring all the measuring distances in the distance image to be processed;
taking each measured distance as a current measured distance, and sequencing all measured distances in a neighborhood window of the current measured distance to obtain sequenced measured distances;
according to the sequencing sequence, starting from the second measurement distance in the sequenced measurement distances, selecting a first measurement distance as a measurement distance to be clustered, judging whether the difference value between the measurement distance to be clustered and the adjacent previous measurement distance is smaller than or equal to a distance threshold value, if so, adding the measurement distance to be clustered into the cluster where the previous measurement distance adjacent to the measurement distance to be clustered is located, otherwise, establishing a new cluster and adding the measurement distance to be clustered into the new cluster; wherein, the cluster of the first measuring distance in the sequenced measuring distances is a pre-established cluster; the first measurement distance is any one measurement distance except the first measurement distance in the sequenced measurement distances;
selecting the next measuring distance of the first measuring distance as the measuring distance to be clustered, and repeatedly executing the step of judging whether the difference value between the measuring distance to be clustered and the adjacent previous measuring distance is smaller than or equal to a distance threshold value, if so, adding the measuring distance to be clustered into the cluster where the previous measuring distance adjacent to the measuring distance to be clustered is located, otherwise, establishing a new cluster and adding the measuring distance to be clustered into the new cluster until all clusters of the measuring distances in the neighborhood window in the current measuring distance are obtained;
and acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, acquiring the cluster with the largest number of the measured distances, and performing noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
2. The method of claim 1, wherein the neighborhood window of the current measured distance is obtained by:
acquiring the preset actual size l of the windowcAnd the angular resolution omega of the lidar and the average value OA of all the measured distances in the range profile to be processed1And by the following formula:
calculating to obtain a neighborhood window k of the current measurement distance0*k0。
3. The method of claim 1, wherein the neighborhood window of the current measured distance is obtained by:
acquiring the preset actual size l of the windowcAnd the angular resolution ω of the lidar and the range value OA of the current measured range, and by the following formula:
calculating to obtain a neighborhood window k of the current measurement distance0*k0。
4. A method according to claim 2 or 3, characterized in that in said neighborhood window k in which said current measurement distance is calculated0*k0Thereafter, the method further comprises:
the following formula is adopted:
for the current measured distanceNeighborhood window k0*k0Taking values, and taking the values k x k as the neighborhood window k of the current measurement distance0*k0。
5. The method according to claim 2 or 3, wherein the threshold of the number of clusters is obtained by the following steps:
obtaining the size k of the neighborhood window of the current measurement distance obtained by calculation0And a preset proportional value r, and is obtained by the following formula:
calculating to obtain the threshold value theta of the clustering quantity2。
6. The method of claim 4, wherein the threshold number of clusters is obtained by:
obtaining a value k and a preset proportional value r for the size of the neighborhood window of the current measurement distance, and obtaining the value k and the preset proportional value r according to the following formula:
θ2=k2·r
calculating to obtain the threshold value theta of the clustering quantity2。
7. The method of claim 1, wherein the performing noise suppression processing on the current measured distance based on the cluster with the largest number of measured distances comprises:
and taking the cluster with the largest number of the measured distances as a target cluster, and taking the median or the mean of all the measured distances in the target cluster as the current measured distance.
8. An apparatus for suppressing noise in a distance image, the apparatus comprising:
the acquisition module is used for acquiring all the measurement distances in the range profile to be processed;
the sorting module is used for taking each measured distance as a current measured distance and sorting all the measured distances in a neighborhood window of the current measured distance to obtain the sorted measured distances;
a judging module, configured to select a first measurement distance as a to-be-clustered measurement distance from a second measurement distance in the sorted measurement distances according to a sorting order, judge whether a difference between the to-be-clustered measurement distance and an adjacent previous measurement distance is smaller than or equal to a distance threshold, add the to-be-clustered measurement distance to a cluster where the previous measurement distance adjacent to the to-be-clustered measurement distance is located if the difference is smaller than or equal to the distance threshold, and otherwise, establish a new cluster and add the to-be-clustered measurement distance to the new cluster; wherein, the cluster of the first measuring distance in the sequenced measuring distances is a pre-established cluster; the first measurement distance is any one measurement distance except the first measurement distance in the sequenced measurement distances;
a selecting module, configured to select a next measurement distance of the first measurement distance as the to-be-clustered measurement distance, and trigger the determining module to repeatedly perform the step of determining whether a difference between the to-be-clustered measurement distance and an adjacent previous measurement distance is smaller than or equal to a distance threshold, if so, add the to-be-clustered measurement distance to a cluster where the previous measurement distance adjacent to the to-be-clustered measurement distance is located, otherwise, establish a new cluster and add the to-be-clustered measurement distance to the new cluster until clusters of all measurement distances in a neighborhood window in the current measurement distance are obtained;
and the processing module is used for acquiring the number of the measured distances in the cluster where the current measured distance is located, judging whether the number of the measured distances in the cluster where the current measured distance is located is larger than or equal to a cluster number threshold value, if not, acquiring the cluster with the largest number of the measured distances, and carrying out noise suppression processing on the current measured distance based on the cluster with the largest number of the measured distances.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011589412.5A CN112581407A (en) | 2020-12-29 | 2020-12-29 | Distance image noise suppression method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011589412.5A CN112581407A (en) | 2020-12-29 | 2020-12-29 | Distance image noise suppression method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112581407A true CN112581407A (en) | 2021-03-30 |
Family
ID=75143829
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011589412.5A Pending CN112581407A (en) | 2020-12-29 | 2020-12-29 | Distance image noise suppression method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112581407A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102830404A (en) * | 2012-08-28 | 2012-12-19 | 中国人民解放军国防科学技术大学 | Method for identifying laser imaging radar ground target based on range profile |
CN108256570A (en) * | 2018-01-13 | 2018-07-06 | 惠州学院 | Data clustering method, device and storage medium based on K neighborhood similarities |
CN110018461A (en) * | 2019-04-16 | 2019-07-16 | 西安电子工程研究所 | Group of Targets Recognition Method based on High Range Resolution and Monopulse estimation |
-
2020
- 2020-12-29 CN CN202011589412.5A patent/CN112581407A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102830404A (en) * | 2012-08-28 | 2012-12-19 | 中国人民解放军国防科学技术大学 | Method for identifying laser imaging radar ground target based on range profile |
CN108256570A (en) * | 2018-01-13 | 2018-07-06 | 惠州学院 | Data clustering method, device and storage medium based on K neighborhood similarities |
CN110018461A (en) * | 2019-04-16 | 2019-07-16 | 西安电子工程研究所 | Group of Targets Recognition Method based on High Range Resolution and Monopulse estimation |
Non-Patent Citations (7)
Title |
---|
吴尚: "基于统计排序的图像随机值脉冲噪声检测方法研究", 《中国优秀硕士学位论文全文数据库》 * |
姜云,李泰华: "一种弹载线阵激光雷达距离像噪声的抑制算法", 《激光与红外》 * |
李琦: "相干激光雷达距离像的噪声抑制算法研究", 《光学学报》 * |
李自勤: "激光雷达距离像背景抑制算法研究", 《中国激光》 * |
滕蓉: "基于改进模糊聚类算法的脑MR图像分割研究", 《中国优秀硕士学位论文全文数据库》 * |
金晓峰: "基于成像激光雷达距离像的噪声抑制和边缘提取", 《中国优秀硕士学位论文全文数据库》 * |
韩延玲: "智能交通系统中视频车辆检测与定位技术研究", 《中国优秀硕士学位论文全文数据库》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110991311B (en) | Target detection method based on dense connection deep network | |
WO2021218314A1 (en) | Event identification method and apparatus based on position locating, and device and storage medium | |
CN111340787B (en) | Method and device for detecting and identifying wire defects of power transmission line and computer equipment | |
CN108550166B (en) | Spatial target image matching method | |
CN113970734B (en) | Method, device and equipment for removing snowfall noise points of road side multi-line laser radar | |
CN111275821B (en) | Power line fitting method, system and terminal | |
CN113971653A (en) | Target detection method, device and equipment for remote sensing image and storage medium | |
CN111402293A (en) | Vehicle tracking method and device for intelligent traffic | |
CN110428438B (en) | Single-tree modeling method and device and storage medium | |
CN115060725A (en) | Double-disc appearance detection method and device | |
CN116596854A (en) | Equipment defect identification method, device, equipment and medium | |
CN116821777B (en) | Novel basic mapping data integration method and system | |
CN106778822B (en) | Image straight line detection method based on funnel transformation | |
CN112434717B (en) | Model training method and device | |
CN112581407A (en) | Distance image noise suppression method and device, electronic equipment and storage medium | |
CN114758470B (en) | Fire early warning method and system based on fire engineering | |
CN116819561A (en) | Point cloud data matching method, system, electronic equipment and storage medium | |
CN113920273B (en) | Image processing method, device, electronic equipment and storage medium | |
CN111159172B (en) | Data processing method and device and electronic equipment | |
CN112381799A (en) | Method and device for confirming broken strands of conducting wires, electronic equipment and computer readable storage medium | |
CN117215164B (en) | Photoetching simulation method and device | |
CN113706428B (en) | Image generation method and device | |
TWI807854B (en) | Method for detecting defects, computer device and storage medium | |
CN117911872A (en) | Method, device, equipment and medium for evaluating mountain fire tripping risk of power transmission line | |
CN117422649A (en) | Image processing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210330 |