- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am able to enable auto exposure on the Intel Realsense Viewer and able to adjust other properties. Is there a function or code which enable me to add auto-exposure to my program. I am using Intel realsense d435 with pyrealsense2 library for python.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello NeuroGalaxy,
Great news! I am attaching a code that can help you set the exposure.
import pyrealsense2 as rs
pipeline = rs.pipeline()
config = rs.config()
profile = pipeline.start(config) # Start streaming
sensor_dep = profile.get_device().first_depth_sensor()
print "Trying to set Exposure"
exp = sensor_dep.get_option(rs.option.exposure)
print "exposure = %d" % exp
print "Setting exposure to new value"
exp = sensor_dep.set_option(rs.option.exposure, 25000)
exp = sensor_dep.get_option(rs.option.exposure)
print "New exposure = %d" % exp
profile = pipeline.stop
Thank you and best regards,
Eliza
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried it, but there is no module 'pybackend2'. Does this support D435 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. I will build it in Cmake. Is there any pre-build files for pyrealsense2.pyd and realsense.dll available? I am using python 3.6.6 with pyrealsense2.17.1.457.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now, i am getting an Import Error. 'ImportError: generic_type: type "USB_TYPE" is already registered!'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes thats correct
I am using Anaconda to run all the packages from.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you. I will try this method.
Alternatively, I was able to display the values using just pyrealsense2. See code below.
import pyrealsense2 as rs
pipeline = rs.pipeline()
config = rs.config()
profile = pipeline.start(config)
dev = profile.get_device()
for i in range(len(dev.sensors)):
if dev.sensors[i].is_depth_sensor() == False :
sens=dev.sensors[i]
break
print (sens.get_option(rs.option.brightness))
print (sens.get_option(rs.option.contrast))
print (sens.get_option(rs.option.exposure))
print (sens.get_option(rs.option.gain))
print (sens.get_option(rs.option.gamma))
print (sens.get_option(rs.option.hue))
print (sens.get_option(rs.option.saturation))
print (sens.get_option(rs.option.sharpness))
print (sens.get_option(rs.option.white_balance))
print (sens.get_option(rs.option.enable_auto_exposure))
pipeline.stop()
Do you know how I could set the values for these parameters?
The example I was trying to do was: https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/pybackend_example_1_general.py
pybackend_example_1_general.py
Purpose is to enable/disable auto exposure from code and not from intel viewer.
python-tutorial-1-depth.py program is working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello NeuroGalaxy,
Great news! I am attaching a code that can help you set the exposure.
import pyrealsense2 as rs
pipeline = rs.pipeline()
config = rs.config()
profile = pipeline.start(config) # Start streaming
sensor_dep = profile.get_device().first_depth_sensor()
print "Trying to set Exposure"
exp = sensor_dep.get_option(rs.option.exposure)
print "exposure = %d" % exp
print "Setting exposure to new value"
exp = sensor_dep.set_option(rs.option.exposure, 25000)
exp = sensor_dep.get_option(rs.option.exposure)
print "New exposure = %d" % exp
profile = pipeline.stop
Thank you and best regards,
Eliza
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The example I was trying to do was: https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/pybackend_example_1_general.py
pybackend_example_1_general.py
Purpose is to enable/disable auto exposure from code and not from intel viewer.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page