- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I would like to disable the emitter in order to retrieve clean IR data. By far I was only able to find this:
and several examples in c++ but I still can't find a solution
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not know of a Python version of code to toggle the emitter, but there is Python code to control the laser power. As the visibility of the IR pattern reduces as the Laser Power setting is reduced, setting laser power to '0' should have the same effect as turning it off.
https://github.com/IntelRealSense/librealsense/issues/1258?language=en_US
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you, I already saw that post and I managed to modify it to find a workaround for what i needed:
import pyrealsense2 as rs
pipeline = rs.pipeline()
config = rs.config()
pipeline_profile = pipeline.start(config)
device = pipeline_profile.get_device()
depth_sensor = device.query_sensors()[0]
emitter = depth_sensor.get_option(rs.option.emitter_enabled)
print("emitter = ", emitter)
set_emitter = 0
depth_sensor.set_option(rs.option.emitter_enabled, set_emitter)
emitter1 = depth_sensor.get_option(rs.option.emitter_enabled)
print("new emitter = ", emitter1)
Hope this can be useful for other users!^^
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much.
The script works well for D435i but I get the below error for SR300.
line 8, in <module>
emitter = depth_sensor.get_option(rs.option.emitter_enabled)
RuntimeError: object doesn't support option #18
How can I fix it? Does this script even work for SR300?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks so much for sharing your script with the community! :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This was a big help, thank you.
So what would be the addition for turning on both IR projectors for a d435?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The 400 Series USB cameras only have one IR emitter (the IR emitter is not the same as the two IR imager components). The purpose of the emitter is to project a semi-random pattern of dots onto the scene observed by the camera to aid analysis of the depth of surfaces in the scene. If the location is well lit though then the emitter does not need to be enabled, as the cameras can alternatively use ambient light to analyse surface depth instead.
In case what you meant to ask was to how to turn on both the left and right IR streams, the link below has a script for doing so. Use the script under the 'Librealsense2' heading.
I am off-shift now but if you require further help, please leave a comment below and I will be happy to help when I am back in 7 hours from the time of writing this. Good luck!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page