mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 04:12:52 +08:00
Merge pull request #22635 from hzawary:4.x
Setting CAP_PROP_AUTO_EXPOSURE on VideoCapture with backend DSHOW does not change anything. Now with this implementation the property can be used with value 1 for availability.
This commit is contained in:
parent
ec7fc5adca
commit
6eb34716b8
@ -3474,6 +3474,18 @@ bool VideoCapture_DShow::setProperty(int propIdx, double propVal)
|
||||
return g_VI.isDeviceSetup(m_index);
|
||||
}
|
||||
|
||||
case CV_CAP_PROP_AUTO_EXPOSURE:
|
||||
{
|
||||
// Flags are required to toggle auto exposure or not, but the setProperty interface does not support multiple parameters
|
||||
bool enabled = cvRound(propVal) == 1;
|
||||
long minExposure, maxExposure, delta, currentExposure, flags, defaultValue;
|
||||
if (!g_VI.getVideoSettingCamera(m_index, CameraControl_Exposure, minExposure, maxExposure, delta, currentExposure, flags, defaultValue))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return g_VI.setVideoSettingCamera(m_index, CameraControl_Exposure, currentExposure, enabled ? CameraControl_Flags_Auto | CameraControl_Flags_Manual : CameraControl_Flags_Manual, enabled ? true : false);
|
||||
}
|
||||
|
||||
case CV_CAP_PROP_AUTOFOCUS:
|
||||
{
|
||||
// Flags are required to toggle autofocus or not, but the setProperty interface does not support multiple parameters
|
||||
|
Loading…
Reference in New Issue
Block a user