Skip to content

Commit c61dab9

Browse files
update document
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
1 parent 5a436e0 commit c61dab9

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

sensing/pointcloud_preprocessor/docs/ring-outlier-filter.md

+34-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,39 @@ A method of operating scan in chronological order and removing noise based on th
1010

1111
![ring_outlier_filter](./image/outlier_filter-ring.drawio.svg)
1212

13-
Another feature of this node is that it calculates visibility based on outlier pointcloud and publish score as a topic. With this function, for example, in heavy rain, the sensing module can notify that the processing performance has reached its limit, which can lead to ensuring the safety of the vehicle.
13+
Another feature of this node is that it calculates visibility score based on outlier pointcloud and publish score as a topic.
14+
15+
### visibility score calculation algorithm
16+
17+
The pointcloud is divided into vertical bins (rings) and horizontal bins (azimuth divisions).
18+
The algorithm starts by splitting the input point cloud into separate rings based on the ring value of each point. Then, for each ring, it iterates through the points and calculates the frequency of points within each horizontal bin. The frequency is determined by incrementing a counter for the corresponding bin based on the point's azimuth value.
19+
The frequency values are stored in a frequency image matrix, where each cell represents a specific ring and azimuth bin. After calculating the frequency image, the algorithm applies a noise threshold to create a binary image. Points with frequency values above the noise threshold are considered valid, while points below the threshold are considered noise.
20+
Finally, the algorithm calculates the visibility score by counting the number of non-zero pixels in the frequency image and dividing it by the total number of pixels (vertical bins multiplied by horizontal bins).
21+
22+
```plantuml
23+
@startuml
24+
start
25+
26+
:Convert input point cloud to PCL format;
27+
28+
:Initialize vertical and horizontal bins;
29+
30+
:Split point cloud into rings;
31+
32+
while (For each ring) is (not empty)
33+
:Calculate frequency of points in each azimuth bin;
34+
:Update frequency image matrix;
35+
endwhile
36+
37+
:Apply noise threshold to create binary image;
38+
39+
:Count non-zero pixels in frequency image;
40+
41+
:Calculate visibility score as complement of filled pixel ratio;
42+
43+
stop
44+
@enduml
45+
```
1446

1547
## Inputs / Outputs
1648

@@ -37,7 +69,7 @@ This implementation inherits `pointcloud_preprocessor::Filter` class, please ref
3769
| `max_distance` | float | 12.0 | The limit distance for visibility score calculation |
3870
| `vertical_bins` | int | 128 | The number of vertical bin for visibility histogram |
3971
| `horizontal_bins` | int | 36 | The number of horizontal bin for visibility histogram |
40-
| `noise_threshold` | int | 2 | The parameter for determining whether it is noise |
72+
| `noise_threshold` | int | 2 | The threshold value for distinguishing noise from valid points in the frequency image |
4173

4274
## Assumptions / Known limits
4375

0 commit comments

Comments
 (0)