|
|
|
|
@ -426,6 +426,19 @@ bool CameraControl::setSoftwareTrigger(const QString& serialNumber)
|
|
|
|
|
return m_vecPCamera[index]->setTriggerSource(SOFTWARE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool CameraControl::setExposure(const QString& serialNumber, int exposure)
|
|
|
|
|
{
|
|
|
|
|
QMap<QString, int>::iterator iter = m_mapSNIndex.find(serialNumber);
|
|
|
|
|
if (iter == m_mapSNIndex.end())
|
|
|
|
|
{
|
|
|
|
|
qWarning() << "Do not find " << serialNumber;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
int index = iter.value();
|
|
|
|
|
return m_vecPCamera[index]->setExposure(exposure);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CameraControl::capture(const QString& serialNumber, cv::Mat& img, cv::Mat& img3D, int exposure)
|
|
|
|
|
{
|
|
|
|
|
QMap<QString, int>::iterator iter = m_mapSNIndex.find(serialNumber);
|
|
|
|
|
@ -549,29 +562,26 @@ void CameraControl::capture(const QStringList& serialNumberList, int location, i
|
|
|
|
|
rotationAngle = m_mapIdCameraInfoSide.value(id).rotationAngle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
////现在1和2巷道都是用的下三层(1-3层)曝光值250000ms/增益20,
|
|
|
|
|
////中三层(4-6层)曝光值150000ms/增益20,
|
|
|
|
|
////上三层(7-9层)曝光值50000ms/增益20
|
|
|
|
|
//if (floor!=0)
|
|
|
|
|
//{
|
|
|
|
|
// int exposure = 0;
|
|
|
|
|
// double gain = 0;
|
|
|
|
|
// if (floor >= 1 && floor <= 3)
|
|
|
|
|
// {
|
|
|
|
|
// exposure = 250000;
|
|
|
|
|
// }
|
|
|
|
|
// else if (floor >= 7 && floor <= 9)
|
|
|
|
|
// {
|
|
|
|
|
// exposure = 50000;
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// exposure = 150000;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//现在1和2巷道都是用的下三层(1-3层)曝光值250000ms/增益20,
|
|
|
|
|
//中三层(4-6层)曝光值150000ms/增益20,
|
|
|
|
|
//上三层(7-9层)曝光值50000ms/增益20
|
|
|
|
|
int exposure = 0;
|
|
|
|
|
if (floor!=0)
|
|
|
|
|
{
|
|
|
|
|
if (floor >= 1 && floor <= 3)
|
|
|
|
|
{
|
|
|
|
|
exposure = 250000;
|
|
|
|
|
}
|
|
|
|
|
else if (floor >= 7 && floor <= 9)
|
|
|
|
|
{
|
|
|
|
|
exposure = 50000;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
exposure = 150000;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
setExposure(serialNumber, exposure);
|
|
|
|
|
|
|
|
|
|
if (!capture(serialNumber, imgInfo.image, imgInfo.image3D, floor))
|
|
|
|
|
{
|
|
|
|
|
|