Hi,
The flag is think is UVC_CONTROL_AUTO_UPDATE

and in the case of extension controls you really need to set it to
disable control caching, this is specially evident for control like
pan/tilt, that behave badly if this flag is not set.

see:
http://www.spinics.net/lists/vfl/msg38717.html

in the case of exposure however this was never a problem.
in kernel 3.0 the auto exposure menu only reports the valid menu
values (2) instead of all 4, this was a problem for tools like
guvcview that didn't expect this. I've now fix it (1.5.0) and it is
working fine, you also may want to test some other control tool like
yavta instead.

Regards,
Paulo

2011/8/12 Philip Gladstone <phi...@gladstonefamily.net>:
> In doing some digging, it also appears that the settings that I am
> interested in are also being cached by the driver, so I am not really
> getting the right values.
>
> I suspect that for UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL,
> UVC_PU_GAIN_CONTROL (at least), I want the UVC_CTRL_FLAG_AUTO_UPDATE set.
> This won't (I doubt) improve the exposure of the image, but it will improve
> the reporting.
>
> The output from v4l-ctl -l is
>
>                     brightness (int)  : min=0 max=255 step=1 default=128
> value=128
>
>                       contrast (int)  : min=0 max=255 step=1 default=32
> value=32
>
>                     saturation (int)  : min=0 max=255 step=1 default=32
> value=32
>
>  white_balance_temperature_auto (bool) : default=1 value=1
>
>                           gain (int)  : min=0 max=255 step=1 default=64
> value=64
>
>           power_line_frequency (menu) : min=0 max=2 default=2 value=2
>
>      white_balance_temperature (int)  : min=2800 max=6500 step=1
> default=4000 value=4000
>
>                      sharpness (int)  : min=0 max=255 step=1 default=72
> value=72
>
>         backlight_compensation (int)  : min=0 max=1 step=1 default=0 value=0
>
>                  exposure_auto (menu) : min=0 max=3 default=3 value=3
>
>              exposure_absolute (int)  : min=3 max=2047 step=1 default=166
> value=166
>
>         exposure_auto_priority (bool) : default=0 value=1
>
>                   pan_absolute (int)  : min=-36000 max=36000 step=3600
> default=0 value=0
>
>                  tilt_absolute (int)  : min=-36000 max=36000 step=3600
> default=0 value=0
>
>                 focus_absolute (int)  : min=0 max=255 step=17 default=68
> value=68
>
>                     focus_auto (bool) : default=1 value=1
>
>                  zoom_absolute (int)  : min=1 max=5 step=1 default=1 value=1
>
>
>
> Philip
>
>
> On 12-Aug-11 12:35 AM, Carl Michal wrote:
>>
>> Hi Philip,
>>
>> Laurent can correct me if I've got this wrong - but in the latest uvc
>> driver there are some changes in how the exposure settings are reported.
>> Before the driver would report settings that the camera wouldn't support.
>> That is now fixed, but unfortunately the way it works now seems to confuse a
>> lot of software. Both guvcview and luvcview are confused by the new driver
>> as well and won't let you properly turn on or off the auto exposure as well.
>>
>> In luvcview the fix is trivial, and apparently guvcview has been fixed
>> upstream.  There is some disscussion of this in the list archives a few
>> weeks ago.
>>
>> Carl
>>
>>
>> On Thu, 11 Aug 2011, Philip Gladstone wrote:
>>
>>> I'm running the latest UVC driver and I find that the auto-exposure
>>> doesn't work when I use the UVC driver on linux. The controls (as reported
>>> by fswebcam) are:
>>>
>>> Available Controls        Current Value   Range
>>>
>>> ------------------        -------------   -----
>>>
>>> Brightness                128 (50%)       0 - 255
>>>
>>> Contrast                  32 (12%)        0 - 255
>>>
>>> Saturation                32 (12%)        0 - 255
>>>
>>> White Balance Temperature, Auto True            True | False
>>>
>>> Gain                      64 (25%)        0 - 255
>>>
>>> Power Line Frequency      60 Hz           Disabled | 50 Hz | 60 Hz
>>>
>>> White Balance Temperature 4000 (32%)      2800 - 6500
>>>
>>> Sharpness                 72 (28%)        0 - 255
>>>
>>> Backlight Compensation    0               0 - 1
>>>
>>> Exposure, Auto            Aperture Priority Mode Manual Mode | Aperture
>>> Priority Mode
>>>
>>> Exposure (Absolute)       166 (7%)        3 - 2047
>>>
>>> Exposure, Auto Priority   True            True | False
>>>
>>> Pan (Absolute)            0 (50%)         -36000 - 36000
>>>
>>> Tilt (Absolute)           0 (50%)         -36000 - 36000
>>>
>>> Focus (absolute)          68 (26%)        0 - 255
>>>
>>> Focus, Auto               True            True | False
>>>
>>> Zoom, Absolute            1               1 - 5
>>>
>>>
>>>
>>> I'm grabbing images in MJPG format and I wonder if that fact is confusing
>>> the camera. Under windows you can watch it adjust exposure and gain until
>>> the image looks good (when in auto mode).
>>>
>>> The values above appear to be the default values after a power cycle of
>>> the camera (plug and unplug the USB).
>>>
>>> Does anyone have any idea what is going on? I'd rather not have to put
>>> the camera in the manual exposure mode and then control it in software.....
>>>
>>> Philip
>>>
>>> _______________________________________________
>>> Linux-uvc-devel mailing list
>>> Linux-uvc-devel@lists.berlios.de
>>> https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
>>>
>>>
>>
>>
>>
>
> _______________________________________________
> Linux-uvc-devel mailing list
> Linux-uvc-devel@lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
>
_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to