Logitech C200 auto exposure control
Question
Auto exposure doesn't work well. It seems like exposure is calibrated for light inside room, where it works good. But if i direct camera outside (through a window), image is overexposed. Almost 80 % of pixels are just white. This problem exists only on Linux, on Windows it works normally.
With uvcdynctrl command i can only set "Exposure, Auto" to Manual Mode [1] and Aperture Priority Mode [3]. If I understand correctly that is camera's own auto exposure control. Can I somehow set motion to override this, so that it can calculate average brightnes of the image and then sets absolute exposure accordingly ?
uvcdynctrl -c -v output:
Exposure, Auto Priority
ID : 0x00000010,
Type : Boolean,
Flags : { CAN_READ, CAN_WRITE },
Values : [ 0 .. 1, step size: 1 ],
Default : 0
Exposure (Absolute)
ID : 0x00000011,
Type : Dword,
Flags : { CAN_READ, CAN_WRITE },
Values : [ 1 .. 10000, step size: 1 ],
Default : 166
Exposure, Auto
ID : 0x0000000f,
Type : Choice,
Flags : { CAN_READ, CAN_WRITE },
Values : { 'Auto Mode'[0], 'Manual Mode'[1], 'Shutter Priority Mode'[2], 'Aperture Priority Mode'[3] },
Default : 3
Backlight Compensation
ID : 0x0000000c,
Type : Dword,
Flags : { CAN_READ, CAN_WRITE },
Values : [ 0 .. 1, step size: 1 ],
Default : 1
Sharpness
ID : 0x00000007,
Type : Dword,
Flags : { CAN_READ, CAN_WRITE },
Values : [ 0 .. 255, step size: 1 ],
Default : 20
White Balance Temperature
ID : 0x00000008,
Type : Dword,
Flags : { CAN_READ, CAN_WRITE },
Values : [ 0 .. 10000, step size: 10 ],
Default : 4000
Power Line Frequency
ID : 0x0000000d,
Type : Choice,
Flags : { CAN_READ, CAN_WRITE },
Values : { 'Disabled'[0], '50 Hz'[1], '60 Hz'[2] },
Default : 2
Gain
ID : 0x00000003,
Type : Dword,
Flags : { CAN_READ, CAN_WRITE },
Values : [ 0 .. 255, step size: 1 ],
Default : 0
White Balance Temperature, Auto
ID : 0x00000009,
Type : Boolean,
Flags : { CAN_READ, CAN_WRITE },
Values : [ 0 .. 1, step size: 1 ],
Default : 1
Saturation
ID : 0x00000004,
Type : Dword,
Flags : { CAN_READ, CAN_WRITE },
Values : [ 0 .. 255, step size: 1 ],
Default : 38
Contrast
ID : 0x00000002,
Type : Dword,
Flags : { CAN_READ, CAN_WRITE },
Values : [ 0 .. 255, step size: 1 ],
Default : 32
Brightness
ID : 0x00000001,
Type : Dword,
Flags : { CAN_READ, CAN_WRITE },
Values : [ 0 .. 255, step size: 1 ],
Default : 128
motion -n :
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3412993 LIBAVFORMAT_BUILD 3415808
[0] Thread 1 is from /etc/motion/motion.conf
[0] motion-httpd/3.2.12 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] Thread 1 started
[1] cap.driver: "uvcvideo"
[1] cap.card: "UVC Camera (046d:0802)"
[1] cap.bus_info: "usb-0000:00:07.2-2"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] Test palette MJPG (640x480)
[1] Using palette MJPG (640x480) bytesperlines 0 sizeimage 31466 colorspace 00000008
[1] found control 0x00980900, "Brightness", range 0,255
[1] "Brightness", default 128, current 128
[1] found control 0x00980901, "Contrast", range 0,255
[1] "Contrast", default 32, current 32
[1] found control 0x00980902, "Saturation", range 0,255
[1] "Saturation", default 38, current 38
[1] found control 0x00980913, "Gain", range 0,255
[1] "Gain", default 0, current 0
[1] mmap information:
[1] frames=4
[1] 0 length=31466
[1] 1 length=31466
[1] 2 length=31466
[1] 3 length=31466
[1] Using V4L2
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8081
Environment
Motion version: |
3.2.12 |
ffmpeg version: |
|
Libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
Debian Squeeze, kernel 2.6.32-5 |
--
UrosS - 30 Jun 2011
Answer