View my account

Modify data of pyrealsense2 frame

Comments

3 comments

  • MartyG

    It sounds as though what you may have in mind is post-processing.  Intel have published a tutorial on setting up post-processing filters in Python.

    https://github.com/IntelRealSense/librealsense/blob/jupyter/notebooks/depth_filters.ipynb 

    More information on RealSense post-processing filters can be found here:

    https://github.com/IntelRealSense/librealsense/blob/master/doc/post-processing-filters.md 

    0
    Comment actions Permalink
  • Filip Sund

    Yes, I'm trying to do post-processing, but I was trying to implement a custom filter. Is there any way to do that with pyrealsense2?

    0
    Comment actions Permalink
  • MartyG

    The best approach may be to set multiple filter types and configure the balance of their values so that it has the overall effect on your output image that you are seeking.  The RealSense Viewer takes a multi-filter approach like this, with most of the available pre-made filters (though not all of them) enabled by default in the "Post Processing" section of its options side-panel when the Viewer program is launched.

    Another way to alter the processing priorities is to use a Custom Preset configuration (also known as a 'json').  This allows you to take a balanced approach to settings or weigh the balance in favor of a particular aspect of the image (e.g better hole filling or better accuracy) whilst reducing the priority of other aspects. 

    https://github.com/IntelRealSense/librealsense/wiki/D400-Series-Visual-Presets 

    A quick way to test different Custom Presets in the Viewer is to left-click on the drop-down menu near the top of the options panel called "Custom", which allows you to immediately select and apply other Custom Preset configuration types from the menu.

    As well as the pre-made presets, you can create your own custom preset (json).  An easy way to test this is to set values in the RealSense Viewer and then use the json file export button on the toolbar at the top of the options side-panel.  Jsons can be plain text files too if you prefer to define them that way.

    0
    Comment actions Permalink

Please sign in to leave a comment.