Add RealSense post-processing filters to RSBagReader - #7519
Conversation
6d2dca4 to
acc8f3d
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds libRealSense depth post-processing support to o3d.t.io.RSBagReader() bag playback, allowing callers to configure an ordered filter chain (e.g., decimation/spatial/temporal/hole-filling) applied before depth-to-color alignment.
Changes:
- Add C++
RSBagReader::Open(filename, filters)API and apply configured filters during playback. - Add Python
RSBagReader.open(filename, filters_dict)overload with dict-to-filter-config conversion and updated docstrings. - Add tutorial documentation, changelog entry, and a Python test covering the new behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| python/test/t/io/test_realsense.py | Adds a Python test exercising filter configuration during bag playback. |
| docs/tutorial/sensor/realsense.rst | Documents the new filters argument and supported filters/options. |
| cpp/pybind/t/io/sensor.cpp | Adds Python binding overload and dict→C++ filter config conversion. |
| cpp/open3d/t/io/sensor/realsense/RSBagReader.h | Introduces PostProcessingFilter config type and new Open() overload. |
| cpp/open3d/t/io/sensor/realsense/RSBagReader.cpp | Implements filter validation/creation and applies filters before alignment. |
| CHANGELOG.md | Notes the new RSBagReader depth post-processing feature. |
| namespace { | ||
|
|
||
| #ifdef BUILD_LIBREALSENSE | ||
| std::vector<RSBagReader::PostProcessingFilter> PyDictToPostProcessingFilters( |
There was a problem hiding this comment.
Can you avoid or simplify this adapter by directly binding RSBagReader::PostProcessingFilter in python?
|
Hi @aekanman thanks for this PR. Looks good, other than that one comment above. Also, can you post comparative images? Say one screenshot with the hole filling filter tuned on, and one with it turned off), to demonstrate that the filter works. We can't test this PR in CI. |
Add RealSense post-processing filters to RSBagReader
Type
Motivation and Context
This adds libRealSense depth post-processing support to
o3d.t.io.RSBagReader()playback.RealSense bag playback already reads and aligns depth/color frames, but users could not apply the standard libRealSense depth filters during bag reading. This PR adds an ordered Python
filtersargument toRSBagReader.open()so depth post-processing can be configured before depth is aligned to color. This resolves #6164 by adding libRealSense depth post-processing support too3d.t.io.RSBagReader()playback.Checklist:
python util/check_style.py --applyto apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
Changes:
RSBagReader::Open(filename, filters)for ordered RealSense depth post-processing filters.reader.open(filename, {"decimation": {"filter_magnitude": 2}}).decimation,spatial,temporal, andhole_filling.filter_magnitude,filter_smooth_alpha,filter_smooth_delta, andholes_fill.SampleL515Bag.Test results: