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

Set Camera Settings using pyrealsense2 like realsense-viewer and load_json for multiple devices Problem #9924

Closed
HasanFarag opened this issue Nov 5, 2021 · 4 comments

Comments

@HasanFarag
Copy link

Required Info
Camera Model D400
Firmware Version 05.12.15.50
Operating System & Version Ubuntu 20
Kernel Version (Linux Only) 5.11.0-38-generic
Platform PC
SDK Version 2.49.0
Language python
Segment Robot

Issue Description

Firstly, We use advanced mode in pyrealsense2 to load exported settings json from the viewer and compare the depth images from the viewer and pyrealsense2, we find out that they are not the same. ( We check the cpp files of sdk and found that librealsense does not set all settings exposed in the viewer). We tried even to use visual preset in pyrealsense2 and postprocessing but still depth images from the viewer are not the same from pyrealsense2. The viewer depth images are much better in quality. How to use the settings from the viewer properly in pyrealsense2 to get the same depth quality (at least visually for us)?

Secondly, We tried to use advanced mode in pyrealsense2 to load exported settings json for different cameras, but it only sets the settings for first device properly and ignore the rest of devices. we use advanced mode in pyrealsense2. How to use advanced mode in pyrealsense2 for multi-camera?

@MartyG-RealSense
Copy link
Collaborator

Hi @HasanFarag The RealSense Viewer applies a range of post-processing and colorization settings by default. When creating your own application, such as a Python script, these settings are not included by default and must be deliberately programmed into the application.

If you have already replicated the post-processing filters that are enabled by default in the Viewer, you could check that you have fully replicated the Viewer's default color scheme and histogram equalization settings. #7767 (comment) and #7089 (comment) provide Python scripting resources for configuring the color scheme and histogram on / off status.

A RealSense team member in #6075 (comment) describes how enabling histogram equalization provides a "nice rainbow of colors", so if histogram is disabled by default in your Python application then this may account for some of the difference between your Viewer and Python images.

In regard to applying settings for individual cameras, you could set up a separate pipeline for each camera with that camera's unique serial number, and configure an individual set of cfg instructions for each pipeline. An example of a Python script for doing this can be found in #1735 (comment)

@MartyG-RealSense
Copy link
Collaborator

Hi @HasanFarag Do you require further assistance with this case, please? Thanks!

@HasanFarag
Copy link
Author

Sorry, I do not have time to test it. I will test it soon , meanwhile, i will close the issue till further investigation. Thanks for rapid response.

@MartyG-RealSense
Copy link
Collaborator

Thanks very much @HasanFarag for the update! Please do feel free to re-open this issue or create a new one when you are ready to resume. Good luck!

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

No branches or pull requests

2 participants