Merge pull request #20475 from nibeh:patch-1

* Added exposure and gain props, maximized pixel clk

* removed pixel clock maximization

pixel clock maximization is not suitable for all use cases, so I removed it from PR.
pull/20616/head
Nicolai Behmann 3 years ago committed by GitHub
parent 6fbfc58602
commit fdaa6ff9e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      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<double>(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<int>(value));
break;
}
if(set_format)
{

Loading…
Cancel
Save