Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

from 3.2 doc VideoCapture::set()

Even if it returns true this doesn't ensure that the property value has been accepted by the capture device

VideoCapture::get()

Reading / writing properties involves many layers. Some unexpected result might happens along this chain.

VideoCapture -> API Backend -> Operating System -> Device Driver -> Device Hardware

...Effective behaviour depends from device driver and API Backend

BRIGHTNESS, GAIN, EXPOSURE often doesn't works

in your case, you are working with Video4Linux backend using User Controls. Even if V4L2_CID_GAIN is integer, OpenCV normalizes/translates the accepted range to 0..1 as 0%..100% of accepted value by V4L thus @LBerger comment is right.

But maybe the camera doesn't accept the control, try if changing the GAIN using the v4l command line utils it works