fix(ot128): introduce anti-flicker downsample dithering pattern #287
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Type
Related Links
Description
While the mask based pruning filter introduced in #251 works well for all supported Hesai sensors, including OT128 in standard mode, OT128's high resolution mode employs a dithering pattern that interferes with the pruning filter's one.
This results in flicker and could degrade perception performance etc.
This PR extends the
DownsampleMaskFilter
by allowing sensors to specify a transform function for azimuth/channel coordinates passed to the dithering algorithm. This allows the developer to include knowledge about the sensor's dithering/scan pattern into the mask dithering step.All sensors except OT128 are using the default transform, as before, with only OT128 using a specialized one.
For details on how OT128 dithers, see the chapter B.4. Laser firing time of each channel of the OT128 User Manual.
Basically, the pattern is repeating every 2 blocks x 4 channels, so the specialized transform ensures that the points that change within one tile are mapped to the same index for dithering.
🟢 Evaluation
Filter disabled (unaffected by this PR)
The dithering pattern causes some oscillating points but the image is overall stable.
downsample_flicker_nomask-2025-03-07_18.00.20.mp4
Filter enabled, before fix
The interference between sensor dithering and downsample filter causes strong flickering.
downsample_flicker_before-2025-03-07_17.56.40.mp4
Filter enabled, after fix
The specialized dithering pattern plays well with the sensor dithering.
Osillations are more noticeable than in the disabled case due to there being larger gaps between points.
The actual oscillation amplitude is the same.
downsample_flicker_after-2025-03-07_17.58.22.mp4
Review Procedure
Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.
Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.
Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.
CI Checks