-
Notifications
You must be signed in to change notification settings - Fork 23
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
Enable Exposure and White Balance controls #23
base: master
Are you sure you want to change the base?
Conversation
Hmmm... update. This is working fine when using the camera with an Ubuntu PC and viewing the camera stream and controls using the qv4l2 program. However, I tried now also on Windows with the e-CAMView application, which allows you to access the UVC controls (Options -> Video Capture Filter menu). |
c294b8a
to
eef76b2
Compare
I updated the code. It now works on both Linux and Windows. At least with the qv4l2 and e-CAMView programs that I have tested with. |
The value definition for the V4L2 interface for exposure mode control does not map directly to the UVC control interface. Add some conversion and configuration fixes. This has been tested only on RaspberryPi 4B HW with the 8 Mpixel v2 camera. Signed-off-by: Soren Friis <soren.friis@intel.com>
This is a bit of a hack. The RaspberryPi V4L2 driver exposes only a menu of pre-defined color temperatures and two of those are manual and auto. This control definition does not have any corresponding equivalent in the UVC specification. Override the UVC color temperature control interface to map directly to the V4L2 AWB interface. This will allow controlling the AWB modes from the host but will only show number values with no explanation of what the numbers refer to. 0: Manual 1: Auto 2: Incandescent 3: Fluorescent 4: Fluorescent H 5: Horizon 6: Daylight 7: Flash 8: Cloudy 9: Shade This has been tested only on RaspberryPi 4B HW with the 8 Mpixel v2 camera. Signed-off-by: Soren Friis <soren.friis@intel.com>
eef76b2
to
bc23665
Compare
bc6acfd
to
bc23665
Compare
I found a RaspberryPi camera v1.3 (the 5 Mpixel one, I guess) and tried the SW with that one. Appears to work just fine. All the same controls were there and were working. @peterbay : Could you maybe review this PR and PR #24 and merge those if you are happy with the changes? |
Correctly handle Exposure mode control. The value definition for the V4L2 interface for exposure mode control does not map directly to the UVC control interface. Add some conversion and configuration fixes.
Also enable AWB control. This is a bit of a hack. The RaspberryPi V4L2 driver exposes only a menu of pre-defined color temperatures and two of those are manual and auto. This control definition does not have any corresponding equivalent in the UVC specification.
Override the UVC color temperature control interface to map directly to the V4L2 AWB interface. This will allow controlling
the AWB modes from the host but will only show number values with no explanation of what the numbers refer to.
I don't have any other HW than the RPi 4B + v2 camera so I don't know if these changes are completely valid on other HW combinations.
NOTE: In order to make the exposure and white balance controls visible to the host, changes are needed also for the configuration values for the f_uvc.c kernel driver, as defined by the patch included in the showmewebcam project.
showmewebcam/showmewebcam#167