ATV modulator: make OpenCV code objects compatible with OpenCV version in Ubuntu 20.04. Fixes issue #511

This commit is contained in:
f4exb 2020-04-27 14:41:02 +02:00
parent b04b81816b
commit 9029a7f24f
1 changed files with 3 additions and 3 deletions

View File

@ -316,7 +316,7 @@ void ATVModSource::pullVideo(Real& sample)
mixImageAndText(colorFrame);
}
cv::cvtColor(colorFrame, m_videoframeOriginal, cv::COLOR_BGR2GRAY);
cv::cvtColor(colorFrame, m_videoframeOriginal, cv::COLOR_RGB2GRAY);
resizeVideo();
}
}
@ -443,7 +443,7 @@ void ATVModSource::pullVideo(Real& sample)
mixImageAndText(colorFrame);
}
cv::cvtColor(colorFrame, camera.m_videoframeOriginal, cv::COLOR_BGR2GRAY);
cv::cvtColor(colorFrame, camera.m_videoframeOriginal, cv::COLOR_RGB2GRAY);
resizeCamera();
}
@ -648,7 +648,7 @@ void ATVModSource::applyStandard(const ATVModSettings& settings)
void ATVModSource::openImage(const QString& fileName)
{
m_imageFromFile = cv::imread(qPrintable(fileName), cv::IMREAD_GRAYSCALE);
m_imageFromFile = cv::imread(qPrintable(fileName), cv::ImreadModes::IMREAD_GRAYSCALE);
m_imageOK = m_imageFromFile.data != 0;
if (m_imageOK)