Comments (10)
Hmm. We already have an inline comment for this as well https://github.com/IntelRealSense/librealsense/blob/master/src/uvc-v4l2.cpp#L459
It works for F200, R200, and SR300 on our Windows backend, so we'll look into it more deeply.
from librealsense.
I'll also give it a try on my Arch laptop this weekend and let you know about the results.
from librealsense.
Confirming this works fine on Windows but throws an error on Ubuntu 14.04.
from librealsense.
UVC controls across the backends have slightly inconsistent interfaces when it comes to exposure. There is some additional logic that will need to be added to the V4L2 backend. Just noting here that we acknowledge color exposure is broken on Linux but at the moment it's lower priority to fix.
from librealsense.
I aslo can not set this option in Windows10,but I can get it,I used:
dev->set_option(rs::option::color_exposure, 100);
but it is not worked
from librealsense.
I confirm this happens on 14.04 when using the Realsense ROS package and setting R200_LR_AUTO_EXPOSURE_ENABLED to 1. That makes the IR and depth images stall until I reconnect the device.
What's also interesting: the cpp-enumerate-devices example shows the following:
COLOR_ENABLE_AUTO_EXPOSURE : 0 .. 0, 1
Which I understand as the color auto exposure having range 0-0. That's strange.
from librealsense.
As I noted before, it is possible to toggle auto exposure and adjust exposure time using v4l2-ctl
command-line tool. I had a look inside the source code, and it turns out they use different control IDs. For auto exposure it is V4L2_CID_EXPOSURE_AUTO
, and for exposure time it is V4L2_CID_EXPOSURE_ABSOLUTE
.
So this patch fixes the issue for me:
diff --git a/src/uvc-v4l2.cpp b/src/uvc-v4l2.cpp
index 9c1b01b..05a94f5 100644
--- a/src/uvc-v4l2.cpp
+++ b/src/uvc-v4l2.cpp
@@ -462,14 +462,14 @@ namespace rsimpl
case RS_OPTION_COLOR_BACKLIGHT_COMPENSATION: return V4L2_CID_BACKLIGHT_COMPENSATION;
case RS_OPTION_COLOR_BRIGHTNESS: return V4L2_CID_BRIGHTNESS;
case RS_OPTION_COLOR_CONTRAST: return V4L2_CID_CONTRAST;
- case RS_OPTION_COLOR_EXPOSURE: return V4L2_CID_EXPOSURE; // Is this actually valid? I'm getting a lot of VIDIOC error 22s...
+ case RS_OPTION_COLOR_EXPOSURE: return V4L2_CID_EXPOSURE_ABSOLUTE;
case RS_OPTION_COLOR_GAIN: return V4L2_CID_GAIN;
case RS_OPTION_COLOR_GAMMA: return V4L2_CID_GAMMA;
case RS_OPTION_COLOR_HUE: return V4L2_CID_HUE;
case RS_OPTION_COLOR_SATURATION: return V4L2_CID_SATURATION;
case RS_OPTION_COLOR_SHARPNESS: return V4L2_CID_SHARPNESS;
case RS_OPTION_COLOR_WHITE_BALANCE: return V4L2_CID_WHITE_BALANCE_TEMPERATURE;
- case RS_OPTION_COLOR_ENABLE_AUTO_EXPOSURE: return V4L2_CID_AUTOGAIN; // Automatic gain/exposure control
+ case RS_OPTION_COLOR_ENABLE_AUTO_EXPOSURE: return V4L2_CID_EXPOSURE_AUTO;
case RS_OPTION_COLOR_ENABLE_AUTO_WHITE_BALANCE: return V4L2_CID_AUTO_WHITE_BALANCE;
default: throw std::runtime_error(to_string() << "no v4l2 cid for option " << option);
}
Tested with all (R200, F200, SR300) cameras. Note that V4L2_CID_EXPOSURE_AUTO
encodes modes with enum, where 1 is manual mode, and 3 is aperture priority. This means that to disable auto exposure one needs to call device->set_option(rs::options::color_enable_auto_exposure, 1)
, and to enable it device->set_option(rs::options::color_enable_auto_exposure, 3)
.
from librealsense.
I've been using librealsense
with this patch for over a month now on Ubuntu 14.04 and 16.04 without any problems. Should I submit a pull request?
from librealsense.
Thank you, this does seem to solve the problem.
This fix is also available on the development branch and will be merged to master.
from librealsense.
Auto exposure should be functional now on all platforms
from librealsense.
Related Issues (20)
- Depth Quality Tool for Intel RealSense Cameras Execution error HOT 16
- D435i + problem with topic imu (orientation) + urdf HOT 6
- D455 - Stopped Working HOT 2
- Orin nano failed to read USB config descriptor HOT 10
- Realsense-viewer crashes while opening on MacOS sonoma HOT 3
- Announcement: RealSense SDK version 2.55.1 now available HOT 3
- 90 degree turn HOT 3
- How can I get an object's location coordinates with simple python code from D435i? HOT 3
- Some D455 not woring as slave in sync system HOT 13
- Left and Right RGB Images HOT 3
- How to use API to get internal and external parameters for depth map and color map alignment? HOT 2
- can I get depthmap from recorded bag file (left / right IR images) by using SDK? HOT 7
- USB 3 Hub bandwidth and power requirement for depth and tracking task
- How to map outdoor environment using realsense D455 camera HOT 4
- linux, using d435i in pycharm, possible usb issues HOT 3
- modprobe: FATAL: Module videodev is in use HOT 7
- How do i install Pyrealsense2-aarch64 into my Raspberry pi 4 8Gb version HOT 13
- Shallow depth information at edge of objects HOT 9
- D435i Low Framerate when using 2 or more USB-Cameras HOT 4
- Problem D345i HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from librealsense.