diff --git a/modules/videoio/src/cap_ueye.cpp b/modules/videoio/src/cap_ueye.cpp index eadba15546..efc2cb990e 100644 --- a/modules/videoio/src/cap_ueye.cpp +++ b/modules/videoio/src/cap_ueye.cpp @@ -171,6 +171,13 @@ double VideoCapture_uEye::getProperty(int property_id) const case CAP_PROP_FPS: value = fps; break; + case CAP_PROP_EXPOSURE: + ASSERT_UEYE(is_Exposure(cam_id, IS_EXPOSURE_CMD_GET_EXPOSURE, (void*)&value, sizeof(value))); + break; + case CAP_PROP_GAIN: + auto gain = is_SetHWGainFactor(cam_id, IS_GET_MASTER_GAIN_FACTOR, 100); + value = static_cast(gain)/100.0; + break; } return value; } @@ -201,6 +208,12 @@ bool VideoCapture_uEye::setProperty(int property_id, double value) break; ASSERT_UEYE(is_SetFrameRate(cam_id, value, &fps)); break; + case CAP_PROP_EXPOSURE: + ASSERT_UEYE(is_Exposure(cam_id, IS_EXPOSURE_CMD_SET_EXPOSURE, (void*)&value, sizeof(value))); + break; + case CAP_PROP_GAIN: + is_SetHWGainFactor(cam_id, IS_SET_MASTER_GAIN_FACTOR, static_cast(value)); + break; } if(set_format) {