Post processing / filters with Python wrapper
| Required Info | |
|---|---|
| Camera Model | D415 |
| Firmware Version | 05.08.15.00 |
| Operating System & Version | Linux (Ubuntu 16.04.4) |
| Kernel Version (Linux Only) | 4.14.13-041413-generic |
| Platform | PC |
| SDK Version | v2.10.0 |
| Language | Python |
Issue Description
It seems like the post processing steps / filters are not available to the python wrapper, any plans on porting it?
Hi @TheMikeyR Yes, we should add it.
[Realsense Customer Engineering Team Comment] Hello @TheMikeyR, the post-processing via Python API has been added in release v2.11.0.
Thanks @RealSense-Customer-Engineering
Hello @TheMikeyR and @RealSense-Customer-Engineering ,
Could you please point me to the v.2.11.0 release, where the filters have been added? I don't seem to be able to find it.
Many thanks!
@phojjat https://github.com/IntelRealSense/librealsense/blob/a8e38426bf2bf0fc4233bca054cec32caaf60bc8/wrappers/python/python.cpp#L534-L544
Thank you for this! However, in here it doesn’t seem that those filters take any input but can only be initialized, as opposed to “align”, for instance. What I want to do is to apply the filters to the aligned frames. Could you please let me know how that should look?
Many thanks! Parsa
py::class_<rs2::align, rs2::processing_block> align(m, "align"); align.def(py::init<rs2_stream>(), "align_to"_a) .def("process", &rs2::align::process, "frames"_a);
This is what I have tried: aligned_frames = align.process(frames) decimated=rs.decimation_filter(aligned_frames)
but I get a TypeError: init(): incompatible constructor arguments.
@phojjat - did you figure out how to use these filters in python? I am having a similar issue.
EDIT: I found this which was helpful to me: https://github.com/IntelRealSense/librealsense/blob/jupyter/notebooks/depth_filters.ipynb
@phojjat - did you figure out how to use these filters in python? I am having a similar issue.
EDIT: I found this which was helpful to me: https://github.com/IntelRealSense/librealsense/blob/jupyter/notebooks/depth_filters.ipynb
Yes, I implemented a similar script. Thank you!