-
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
How to get Left and Right image pairs from RealSense D455 #7934
Comments
Hi @changchenliang To access both the left and right IR streams with scripting, you should give each stream its own index number in order to differentiate between the two. The discussion in the link below has an example Python script for doing so. If you find that you need to control the on-off state of the IR emitter with Python, the resources in this link should be helpful: If you need to make use of OpenCV, the discussion linked to below is for C++ but contains cv code for the IR frames that could be converted to your Python project. |
Thanks to your reply. However, when I try to use import pyrealsense2 as rs, I have a problem: when I run the code and it comes to pipeline.start(config), there is an error "Runtime error: no device connected", I am using D455 on a RK3399 ARM platform. |
May I ask which method you used to build the Python wrapper please? (pip install, or building the wrapper from source code or building librealsense and the wrapper from source code at the same time) On the most recent occasion that there was a Python issue on an RK3399 system, Intel advised building the wrapper from source code. |
Thank you for your help. Actually it's solved now. I build the librealsense and wrapper from the source code at the same time. I think the problem is because I did not do some of the pre-requisites on https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md Now I just come to the last step, and find another problem. When I use python script to capture the left IR image under color "RGB8" format, the image looks strange. The white scene appears very pink and not correct, as shown below: The right image is captured from the RGB camera which is normal, but in the left image captured from the left IR camera under "rgb8" format, the white lamp looks very pink and is not correct. (I find that when somewhere is very bright, it will look very "pink" in the image...) So how to solve this and set parameters in python script to correct the IR camera stream in color? |
The pink-purple hue is expected for an RGB8 image from the left IR sensor. The image below compares RGB from the RGB sensor (upper) to RGB8 from the Left IR sensor (lower) on the D455. The D415 model, which also supports RGB8 from the left IR sensor, renders color smilarly. If you need left and right IR images though, Y8 monochrome would likely be the best option. This is because the D455 and D415 can only output color such as RGB8 from the left IR sensor. Otherwise, if you need matching IR images then use Y8 IR for both left and right and use RGB for color. |
Got it. So I will just use the left and right IR sensor in y8 mono type. Thank you for your time to help me. |
Thanks very much @changchenliang |
Hi. I am using the D455 camera on my Arm Platform (RK3399 + Linux + Python 3.7).
In my work I need to get Left and Right image pairs in python from the D455 camera. However, when connected to the ARM platform, I can only capture one RGB image and one IR image (with dots pattern on it). So my question is how to get Left and Right image pairs (RGB image pairs or clean IR image pairs without laser dots are both OK for me) ?
Actually the clean left and right raw IR image pairs can be shown in RealSense Viewer app by changing settings in "Stereo depth" item, but when I close RealSense Viewer it can not remember this settings, is there any way to permanently save/write this settings to the camera in order for me to capture two IR images in python using opencv? ..
Thank you for your time to my questions
The text was updated successfully, but these errors were encountered: