Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quantile filtering new #82

Open
wants to merge 3 commits into
base: ros2
Choose a base branch
from

Conversation

YBachmann
Copy link

Currently the minimum value of each column in the depthimage was used to calculate the distance values.

When dealing with noisy data it is benefitial to use e.g. the 10% quantile instead of the minimum value. This way we still get accurate data but ignore noise/outliers.

The parameter quantile_value controls which quantile should be used.

  • Setting it to 0.0 will have the effect of using the minimum value of each column (the current behavior and default value).
  • Setting it to 0.5 will use the median of each column.
  • I got quite good results with using a quantile_value of around 0.1. This way a lot of noise/outliers was removed, but the laserscan data still contained obstacles, even if they only covered a small part (>10%) of the scan_height.

…rameter to specify which quantile value to use. Updated test.
…he current behavior of using the minimum value in each row.
@YBachmann
Copy link
Author

Hello @clalancette ,

could you please take a look at this PR?

I attached a small video showing a comparison of the current state of using the minimum value in each column (orange) and my proposed approach of using quantiles/percentiles (purple). In this test a scan_height of 180 pixels was used and for my version a quantile_value of 0.35.
In my opinion using a quantile instead of the minimum of a row greatly reduces noise and more accurately reflects the position of obstacles/walls.
It is also easily adjustable. If you have very little noise or want to detect small objects that might only take up a couple pixels in each row, you can set the quantile_value parameter to a small numer (or even to 0.0 to retain the current behavior). If you want smooth and accurate laserscans and only care about larger objects you can set the value to something bigger.
depthimage_to_laserscan_quantile_comparison.webm

@YBachmann
Copy link
Author

Hello @clalancette ,
as some time passed, I just wanted to check in if you had any chance to take a look at this PR? If not, are there maybe other maintainers that you could refer this to?
Or is this functionality just not wanted?
In any case, I would be happy for a response.
Kind regards, Yannic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant