-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
multi-camera rendering depth and color images #9462
Comments
Hi @dohyeonYoon A tutorial in the link below describes how to create a multi-camera version of a pyrealsense2 stream viewer program like opencv_viewer_example. Scroll down the article to the section titled Now lets write a test code for Multiple Camera Setup to find the scripting. The tutorial is focused around Windows 10 but the code should be usable in any pyrealsense2 installation. A RealSense user also recently shared their own Python multiple-camera stream viewer project. https://github.com/ivomarvan/samples_and_experiments/tree/master/Multiple_realsense_cameras |
Thanks for your help! ps: I already add the realsense_device_manager.py at the same directory :(Exception has occurred: KeyError
|
Taking the realsense_device_manager.py code out of box_dimensioner_multicam and integrating it into your own project can be achieved but it can be difficult and can results in errors at first. Would it be possible to post your script in a comment below, please? |
If I run the following code,
Thanks for your help while you're busy |
It's no trouble at all. :) The first difference between your script and the Rahul Vishwakarma article is that in the text_str line you place 'device' in quotation marks: Whilst the article does not use quotation marks around 'device': A more significant difference is in the conversion of the config streams for L515 resolutions. You have set depth, infrared and color to all use the same resolution and FPS. However, 1024x768 is not supported on L515 for the RGB stream. I recommend 1280x720 instead. Also, the only FPS supported for depth and infrared on L515 is 30, so the depth and infrared FPS should not be set to 15. I would recommend using 30 for depth, infrared and color. The rest of the script looks fine compared to the Rahul Vishwakarma original. |
May I confirm please that you have set depth and infrared to 1024x768 and color to 1280x720, please? 1280x720 is not supported for depth and infrared on L515. Your code could look like this, defining separate variables for storing the color resolution:
|
this is my total code I still suffering same problem that 3 camera frames appearing take turns in one window. so the frame displayed by >>>>> visualise_measurements(frames)<<<< code
how about add cv2.namedwindow and cv2.imshow one by one? |
Does the error go away if you use device_manager.poll_for_frames() instead of poll_frames() |
Okay, thanks for trying. Going back to the original poll_frames version, then. I guess that the error occurs when inserting a 'for' because it is looking for the code block called 'poll_frames()' in realsense_device_manager.py. Maybe it is looking in the folder that your script is in for the script file realsense_device_manager.py from the box_dimensioner_multicam project and cannot find it, so is erroring on the device_manager.poll_frames() command. I appreciate your patience as we work through this problem! |
Hi @dohyeonYoon Do you require further assistance with this case, please? Thanks! |
oh, I solve the problem whit this issues code! thank you for your help ! :) |
Excellent news @dohyeonYoon - you are very welcome. Thanks very much for the update :) |
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
<Describe your issue / question / feature request / etc..>
Previously, "camera rendering depth and color images using the help of OpenCV and Numpy" was performed with only one L515 depth camera.
I am going to do camera rendering depth and color images with a total of 3 L515 cameras.
https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/opencv_viewer_example.py
I proceeded with camera rendering referring to the code above. To perform rendering with 3 cameras at the same time, how to modify the code compared with the code above?
thank you :)
The text was updated successfully, but these errors were encountered: